diff --git a/src/Login.vue b/src/Login.vue
index 5ede32b6..818a8258 100644
--- a/src/Login.vue
+++ b/src/Login.vue
@@ -39,7 +39,7 @@
diff --git a/src/components/rightBox/settings/UserBox.vue b/src/components/rightBox/settings/UserBox.vue
index 8b1097ac..ae6d24cb 100644
--- a/src/components/rightBox/settings/UserBox.vue
+++ b/src/components/rightBox/settings/UserBox.vue
@@ -54,6 +54,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
import rightBoxMixin from '@/mixins/right-box'
import { get, post, put } from '@/utils/http'
+import { themeData, langData } from '@/utils/constants'
export default {
name: 'UserBox',
mixins: [rightBoxMixin],
@@ -137,7 +168,9 @@ export default {
{ type: 'email', message: this.$t('validate.email') }
]
},
- roleData: []
+ roleData: [],
+ themeData,
+ langData
}
},
setup () {
diff --git a/src/utils/constants.js b/src/utils/constants.js
index bd3cc13e..d118344c 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -7,6 +7,8 @@ export const storageKey = {
languages: 'cn-languages',
language: 'cn-language',
timezone: 'cn-timezone',
+ theme: 'cn-theme',
+ dateFormat: 'cn-date-format',
timezoneOffset: 'cn-timezone-offset',
timezoneLocalOffset: 'cn-timezone-local-offset',
token: 'cn-token',
@@ -195,6 +197,16 @@ export const dnsServerRole = {
RTDNSM: 'RTDNSM'
}
+export const themeData = [
+ { value: 'light', label: 'light' },
+ { value: 'dark', label: 'dark' }
+]
+
+export const langData = [
+ { value: 'zh', label: 'zh' },
+ { value: 'en', label: 'en' }
+]
+
export const performanceMetricMapping = {
'dns error': 'DNS Error Rate',
'http error': 'HTTP Error Rate',