diff --git a/nezha-fronted/src/assets/css/components/common/intro.scss b/nezha-fronted/src/assets/css/components/common/intro.scss new file mode 100644 index 000000000..932c2245f --- /dev/null +++ b/nezha-fronted/src/assets/css/components/common/intro.scss @@ -0,0 +1,46 @@ +.is-intro.el-dialog{ + max-height: unset; + max-width: unset; + height: 100%; + .el-dialog__header{ + display: none; + } + .el-dialog__body{ + height: 100%; + padding: 0; + > div{ + height: 100%; + } + } +} +.dc-img{ + width: 100%; + height: 100%; + background: url("~@/assets/img/jj.png") no-repeat; + background-size:cover; +} +.dc-img1{ + width: 100%; + height: 100%; + background: url("~@/assets/img/jj1.png") no-repeat; + background-size:cover; +} +.dc-img2{ + width: 100%; + height: 100%; + background: url("~@/assets/img/jj3.png") no-repeat; + background-size:cover; +} +.dc-img3{ + width: 100%; + height: 100%; + background: url("~@/assets/img/dc3.png") no-repeat; + background-size:cover; +} +.intro-bottom{ + position: fixed; + right: 20px; + bottom: 20px; + display: flex; + flex-direction: column; +} diff --git a/nezha-fronted/src/assets/css/components/index.scss b/nezha-fronted/src/assets/css/components/index.scss index 17add18bb..63f21c1d0 100644 --- a/nezha-fronted/src/assets/css/components/index.scss +++ b/nezha-fronted/src/assets/css/components/index.scss @@ -67,6 +67,7 @@ @import './common/elementSet.scss'; @import './common/loading.scss'; @import './common/login.scss'; +@import './common/intro.scss'; @import './common/multipleTime.scss'; @import './common/nezhaColor.scss'; @import './common/nzTransfer.scss'; diff --git a/nezha-fronted/src/assets/img/dc.png b/nezha-fronted/src/assets/img/dc.png new file mode 100644 index 000000000..53bd7fc95 Binary files /dev/null and b/nezha-fronted/src/assets/img/dc.png differ diff --git a/nezha-fronted/src/assets/img/dc1.png b/nezha-fronted/src/assets/img/dc1.png new file mode 100644 index 000000000..722e69b16 Binary files /dev/null and b/nezha-fronted/src/assets/img/dc1.png differ diff --git a/nezha-fronted/src/assets/img/dc2.png b/nezha-fronted/src/assets/img/dc2.png new file mode 100644 index 000000000..77553a22d Binary files /dev/null and b/nezha-fronted/src/assets/img/dc2.png differ diff --git a/nezha-fronted/src/assets/img/dc3.png b/nezha-fronted/src/assets/img/dc3.png new file mode 100644 index 000000000..e8859fa13 Binary files /dev/null and b/nezha-fronted/src/assets/img/dc3.png differ diff --git a/nezha-fronted/src/assets/img/jj.png b/nezha-fronted/src/assets/img/jj.png new file mode 100644 index 000000000..99cea293c Binary files /dev/null and b/nezha-fronted/src/assets/img/jj.png differ diff --git a/nezha-fronted/src/assets/img/jj1.png b/nezha-fronted/src/assets/img/jj1.png new file mode 100644 index 000000000..f57d4e7a1 Binary files /dev/null and b/nezha-fronted/src/assets/img/jj1.png differ diff --git a/nezha-fronted/src/assets/img/jj3.png b/nezha-fronted/src/assets/img/jj3.png new file mode 100644 index 000000000..55bf6fb1c Binary files /dev/null and b/nezha-fronted/src/assets/img/jj3.png differ diff --git a/nezha-fronted/src/components/common/detailView/list/userDetail/userDetail.vue b/nezha-fronted/src/components/common/detailView/list/userDetail/userDetail.vue index 122dce97b..daf701152 100644 --- a/nezha-fronted/src/components/common/detailView/list/userDetail/userDetail.vue +++ b/nezha-fronted/src/components/common/detailView/list/userDetail/userDetail.vue @@ -109,7 +109,7 @@ export default { show: true, width: 150 }, { - label: this.$t('overall.enable'), + label: this.$t('overall.enabled'), prop: 'status', show: true, width: 100 diff --git a/nezha-fronted/src/components/common/i18n.js b/nezha-fronted/src/components/common/i18n.js index 1165394f8..a4c930eca 100644 --- a/nezha-fronted/src/components/common/i18n.js +++ b/nezha-fronted/src/components/common/i18n.js @@ -3,6 +3,8 @@ import locale from 'element-ui/lib/locale' import VueI18n from 'vue-i18n' import { get } from '@/http' import messages from './language' +import enLocale from 'element-ui/lib/locale/lang/en' // 引入element语言包 +import zhLocale from 'element-ui/lib/locale/lang/zh-CN' // 引入element语言包 Vue.use(VueI18n) // 从localStorage获取语言选择。 const i18n = new VueI18n({ @@ -14,7 +16,12 @@ locale.i18n((key, value) => i18n.t(key, value)) // 兼容element export function loadI18n (i18nData) { if (i18nData) { Object.keys(i18nData).forEach(lang => { - i18n.setLocaleMessage(lang, i18nData[lang]) + if (lang === 'zh') { + Object.assign(i18nData[lang], { ...zhLocale }) + } else if (lang === 'en') { + Object.assign(i18nData[lang], { ...enLocale }) + } + i18n.setLocaleMessage(lang, { ...i18nData[lang] }) }) } } diff --git a/nezha-fronted/src/components/common/intro.vue b/nezha-fronted/src/components/common/intro.vue new file mode 100644 index 000000000..86a7d25ce --- /dev/null +++ b/nezha-fronted/src/components/common/intro.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/nezha-fronted/src/components/common/language/newen.js b/nezha-fronted/src/components/common/language/newen.js index 357de2c2f..fd30a31f0 100644 --- a/nezha-fronted/src/components/common/language/newen.js +++ b/nezha-fronted/src/components/common/language/newen.js @@ -97,5 +97,4 @@ const newen = { }, ...enLocale } - export default newen diff --git a/nezha-fronted/src/components/common/latlngPicker.vue b/nezha-fronted/src/components/common/latlngPicker.vue index c194d9179..33c6b269c 100644 --- a/nezha-fronted/src/components/common/latlngPicker.vue +++ b/nezha-fronted/src/components/common/latlngPicker.vue @@ -3,7 +3,7 @@
diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index 78fc8a14e..5312f7aeb 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -2,7 +2,7 @@
-
{{$t("overall.createEndpoint")}}
+
{{$t("config.system.basic.lnglatll.createEndpoint")}}
diff --git a/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue b/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue index 078040f89..585a9df72 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/backupsBox.vue @@ -127,7 +127,7 @@ diff --git a/nezha-fronted/src/components/common/rightBox/administration/userBox.vue b/nezha-fronted/src/components/common/rightBox/administration/userBox.vue index 1c1cf3411..996d4fea2 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/userBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/userBox.vue @@ -184,7 +184,7 @@ export default { roles: [], mfaLevelList: [ { value: 0, label: this.$t('profile.close') }, - { value: 1, label: this.$t('overall.enable') }, + { value: 1, label: this.$t('overall.enabled') }, { value: 2, label: this.$t('config.user.forceEnable') } ], languageList: [ diff --git a/nezha-fronted/src/components/common/rightBox/dcBox.vue b/nezha-fronted/src/components/common/rightBox/dcBox.vue index 9d2362b34..38d4a94b8 100644 --- a/nezha-fronted/src/components/common/rightBox/dcBox.vue +++ b/nezha-fronted/src/components/common/rightBox/dcBox.vue @@ -27,7 +27,7 @@ - +
{{scope.row[item.prop]}} diff --git a/nezha-fronted/src/components/layout/header.vue b/nezha-fronted/src/components/layout/header.vue index 5d3ac88a4..24ea30f62 100644 --- a/nezha-fronted/src/components/layout/header.vue +++ b/nezha-fronted/src/components/layout/header.vue @@ -66,6 +66,7 @@
+ @@ -76,16 +77,19 @@ import bus from '../../libs/bus' import { mapActions } from 'vuex' import guide from '@/components/common/popBox/guide' +import intro from '@/components/common/intro' export default { name: 'Header', components: { - guide + guide, + intro }, data () { return { username: '', name: '', language: 'en', + showIntro: 'true', // 顶部菜单相关 createMenu: [ // 新增按钮内容 { @@ -228,32 +232,6 @@ export default { this.getLinkData() } window.addEventListener('visibilitychange', this.testUser) - // setTimeout(() => { - // this.$intro() - // .setOptions({ - // // 我给看的效果图是英⽂的(默认英⽂),这⾥是更换成中⽂ - // prevLabel: '上⼀步', - // nextLabel: '下⼀步', - // skipLabel: '跳过', - // doneLabel: '完成', - // // steps步骤,可以写个⼯具类保存起来 - // steps: this.steps, - // dontShowAgain: true - // }) - // .oncomplete(() => { - // // 需要注意的是,这⾥⽤了箭头函数 - // // 点击结束按钮后执⾏的事件 - // }) - // .onexit(() => { - // // 点击跳过按钮后执⾏的事件 - // }) - // .onbeforeexit(() => { - // // 确认完毕之后执⾏的事件 - // // return confirm('Are you sure?') - // }) - // // this.$intro('#personal').start() // start the guide - // // this.$intro('#personal').showHints() // show hints - // }, 1000) }, computed: { linkData () { diff --git a/nezha-fronted/src/components/page/config/backups.vue b/nezha-fronted/src/components/page/config/backups.vue index 392c74eae..c8a4e26a7 100644 --- a/nezha-fronted/src/components/page/config/backups.vue +++ b/nezha-fronted/src/components/page/config/backups.vue @@ -72,7 +72,7 @@ export default { customTableTitle: [ { label: this.$t('alert.config.schedEnable'), prop: 'schedule' }, { label: this.$t('backup.backupRetention'), prop: 'retention' }, - { label: this.$t('overall.enable'), prop: 'state' } + { label: this.$t('overall.enabled'), prop: 'state' } ], customTableTitle2: [ { label: this.$t('config.assetLabel.date'), prop: 'time', minwidth: 228 }, diff --git a/nezha-fronted/src/components/page/config/basic.vue b/nezha-fronted/src/components/page/config/basic.vue index 09564ca97..f2d6a54fe 100644 --- a/nezha-fronted/src/components/page/config/basic.vue +++ b/nezha-fronted/src/components/page/config/basic.vue @@ -60,7 +60,7 @@
- +
diff --git a/nezha-fronted/src/components/page/config/monitor.vue b/nezha-fronted/src/components/page/config/monitor.vue index df8883669..d47506631 100644 --- a/nezha-fronted/src/components/page/config/monitor.vue +++ b/nezha-fronted/src/components/page/config/monitor.vue @@ -70,7 +70,7 @@
- + diff --git a/nezha-fronted/src/components/page/config/profile.vue b/nezha-fronted/src/components/page/config/profile.vue index 9337f2949..b42dbb359 100644 --- a/nezha-fronted/src/components/page/config/profile.vue +++ b/nezha-fronted/src/components/page/config/profile.vue @@ -50,7 +50,7 @@