瀏覽代碼

增加中英文切换功能

liujintao 2 周之前
父節點
當前提交
7ebe92026c
共有 5 個文件被更改,包括 33 次插入37 次删除
  1. 9 0
      src/lang/en.ts
  2. 9 0
      src/lang/zh.ts
  3. 4 26
      src/views/login/index.vue
  4. 3 3
      src/views/setting/netSetting/index.vue
  5. 8 8
      src/views/setting/systemSetting/index.vue

+ 9 - 0
src/lang/en.ts

@@ -7,6 +7,15 @@ export default {
         save: 'Save',
         execute: 'Execute'
     },
+    popup: {
+        warning: 'Warning',
+        note: 'Note',
+        confirm: 'OK',
+        cancel: 'Cancel',
+        reset_tips:'This operation will modify the camera configuration and restart it. Continue?',
+        reboot_tips:'This operation will restart the camera. Continue?',
+        network_tips:'Changing the network configuration will restart the device. ',
+    },
     login: {
         title: 'Welcome to Camera Management System',
         account: 'Account',

+ 9 - 0
src/lang/zh.ts

@@ -7,6 +7,15 @@ export default {
         save: '保存',
         execute: '执行'
     },
+    popup: {
+        warning: '警告',
+        note: '提示',
+        confirm: '确认',
+        cancel: '取消',
+        reset_tips:'此操作将修改摄像头配置并重新启动,要继续吗?',
+        reboot_tips:'此操作将重启摄像头,要继续吗?',
+        network_tips:'更改网络配置将会重启设备,要继续吗?',
+    },
     login: {
         title: '欢迎使用摄像头管理系统',
         account: '账号',

+ 4 - 26
src/views/login/index.vue

@@ -63,7 +63,7 @@
     >
       <div class="forgot-password-dialog">
 
-        <!--        <div class="device-password-title">Device Password</div>-->
+        <!--<div class="device-password-title">Device Password</div>-->
         <div class="qrcode-container">
           <qrcode-vue
               :value="devicePassword"
@@ -86,6 +86,8 @@
               v-model="superPassword"
               :placeholder="t('forgot_password.input_tip')"
               size="default"
+              type="password"
+              show-password
           />
         </div>
       </div>
@@ -128,7 +130,7 @@ const loginFormData: LoginRequestData = reactive({
   code: ''
 })
 
-const devicePassword = ref('二维码获取失败')
+const devicePassword = ref('Failed to get QR code')
 const superPassword = ref('')
 const level = ref('H')
 
@@ -462,30 +464,6 @@ const handleLogin = () => {
   }
 }
 
-/* 对话框关闭按钮 - 关键修复 */
-:deep(.el-dialog__close) {
-  color: white;
-  font-size: 25px;
-  cursor: pointer;
-  transition: all 0.3s ease;
-  position: relative;
-  width: auto;
-  height: auto;
-  padding: 0px;
-  border: none;
-  background: none;
-  outline: none;
-
-  &:hover {
-    opacity: 0.8;
-    transform: rotate(90deg);
-  }
-
-  &:focus {
-    outline: none;
-  }
-}
-
 :deep(.el-dialog__body) {
   padding: 24px 0 0;
   background-color: #fff;

+ 3 - 3
src/views/setting/netSetting/index.vue

@@ -189,9 +189,9 @@ fetchData()
 const handleSave = () => {
     settingFormRef.value?.validate((valid: boolean, fields) => {
       if (valid) {
-        ElMessageBox.confirm('Changing the network configuration will restart the device', 'Note', {
-          confirmButtonText: 'OK',
-          cancelButtonText: 'Cancel',
+        ElMessageBox.confirm(t('popup.network_tips'), t('popup.note'), {
+          confirmButtonText: t('popup.confirm'),
+          cancelButtonText: t('popup.cancel'),
           type: 'warning',
           confirmButtonClass: 'el-button--danger'
         }).then(() => {

+ 8 - 8
src/views/setting/systemSetting/index.vue

@@ -74,11 +74,11 @@ const FormData = reactive({ reset: 0 })
 const handleReset = async () => {
   try {
     await ElMessageBox.confirm(
-      'This operation will modify the camera configuration and restart it. Continue?',
-      'Warning',
+        t('popup.reset_tips'),
+        t('popup.warning'),
       {
-        confirmButtonText: 'OK',
-        cancelButtonText: 'Cancel',
+        confirmButtonText: t('popup.confirm'),
+        cancelButtonText: t('popup.cancel'),
         type: 'warning',
         confirmButtonClass: 'el-button--danger'
       }
@@ -116,11 +116,11 @@ const handleReset = async () => {
 const handleRestart = async () => {
   try {
     await ElMessageBox.confirm(
-      'This operation will restart the camera. Continue?',
-      'Note',
+        t('popup.reboot_tips'),
+        t('popup.note'),
       {
-        confirmButtonText: 'OK',
-        cancelButtonText: 'Cancel',
+        confirmButtonText: t('popup.confirm'),
+        cancelButtonText: t('popup.cancel'),
         type: 'warning',
         confirmButtonClass: 'el-button--danger'
       }