diff --git a/ui/src/components/login-layout/index.vue b/ui/src/components/login-layout/index.vue
index 9d9b87dca..af27148bb 100644
--- a/ui/src/components/login-layout/index.vue
+++ b/ui/src/components/login-layout/index.vue
@@ -6,6 +6,33 @@
+
+
+
+
+ {{
+ lang.label
+ }}
+
+
+
+
+
+
+
+
+ {{ currentLanguage }}
+
+
@@ -16,10 +43,20 @@
import { computed } from 'vue'
import { getThemeImg } from '@/utils/theme'
import useStore from '@/stores'
-import { request } from '@/request'
+import { useLocalStorage } from '@vueuse/core'
+import { langList, localeConfigKey, getBrowserLang } from '@/locales/index'
defineOptions({ name: 'LoginLayout' })
const { user } = useStore()
+const changeLang = (lang: string) => {
+ useLocalStorage(localeConfigKey, getBrowserLang()).value = lang
+ window.location.reload()
+}
+
+const currentLanguage = computed(() => {
+ return langList.value?.filter((v: any) => v.value === user.getLanguage())[0].label
+})
+
const fileURL = computed(() => {
if (user.themeInfo?.loginImage) {
if (typeof user.themeInfo?.loginImage === 'string') {
@@ -52,5 +89,13 @@ const loginImage = computed(() => {
width: 100%;
height: 100%;
}
+ .right-container {
+ position: relative;
+ .lang {
+ position: absolute;
+ right: 20px;
+ top: 20px;
+ }
+ }
}
diff --git a/ui/src/components/markdown/MdEditor.vue b/ui/src/components/markdown/MdEditor.vue
index 6a4abb8a4..6a621a04e 100644
--- a/ui/src/components/markdown/MdEditor.vue
+++ b/ui/src/components/markdown/MdEditor.vue
@@ -9,13 +9,13 @@