Explorar o código

feat(locales, views): add new translations and update demo view

- Added new localized strings for "active", "hold", and "dead" in English and Chinese locale files to enhance user interface clarity.
- Updated the demo view to display these new translations, improving the overall user experience and consistency across the application.
yb hai 3 días
pai
achega
b3c611c306
Modificáronse 4 ficheiros con 16 adicións e 2 borrados
  1. 3 0
      src/locales/en.json
  2. 3 0
      src/locales/zh-cn.json
  3. 3 0
      src/views/demo.vue
  4. 7 2
      src/views/lss/index.vue

+ 3 - 0
src/locales/en.json

@@ -24,6 +24,7 @@
   "Video ID": "Video ID",
   "WebRTC 流": "WebRTC Stream",
   "ably": "ably",
+  "active": "active",
   "button.cancel": "Cancel",
   "button.confirm": "Confirm",
   "button.disable": "Disable",
@@ -31,7 +32,9 @@
   "button.enable": "Enable",
   "button.selectedSsers": "Selected Users",
   "button.whether": "Whether",
+  "dead": "dead",
   "errorCode.0": "Success",
+  "hold": "hold",
   "iframe 模式": "iframe Mode",
   "input.SelectAll": "Select All",
   "login.confirmPassword": "Confirm Password",

+ 3 - 0
src/locales/zh-cn.json

@@ -24,6 +24,7 @@
   "Video ID": "Video ID",
   "WebRTC 流": "WebRTC 流",
   "ably": "ably",
+  "active": "活跃",
   "button.cancel": "button.cancel",
   "button.confirm": "button.confirm",
   "button.disable": "button.disable",
@@ -31,7 +32,9 @@
   "button.enable": "button.enable",
   "button.selectedSsers": "button.selectedSsers",
   "button.whether": "button.whether",
+  "dead": "离线",
   "errorCode.0": "errorCode.0",
+  "hold": "待机",
   "iframe 模式": "iframe 模式",
   "input.SelectAll": "input.SelectAll",
   "login.confirmPassword": "login.confirmPassword",

+ 3 - 0
src/views/demo.vue

@@ -28,6 +28,9 @@ const { t } = useI18n()
     {{ t('启用') }}
     {{ t('创建时间') }}
     {{ t('操作') }}
+    {{ t('active') }}
+    {{ t('hold') }}
+    {{ t('dead') }}
   </div>
 </template>
 

+ 7 - 2
src/views/lss/index.vue

@@ -59,7 +59,7 @@
         <el-table-column :label="t('心跳')" width="220" align="center">
           <template #default="{ row }">
             <span :class="getHeartbeatClass(row.status)">
-              {{ row.status || '-' }}
+              {{ t(row.status) || '-' }}
             </span>
             | {{ formatTime(row.lastHeartbeatAt) }}
           </template>
@@ -465,7 +465,7 @@
       destroy-on-close
       class="camera-edit-drawer"
     >
-      <el-form ref="cameraFormRef" :model="cameraForm" :rules="cameraRules" label-width="100px">
+      <el-form ref="cameraFormRef" :model="cameraForm" :rules="cameraRules" label-width="auto">
         <!-- <el-form-item label="IP 地址" prop="ip">
           <el-input v-model="cameraForm.ip" :disabled="isEditCamera" placeholder="请输入 IP 地址" />
         </el-form-item> -->
@@ -537,7 +537,12 @@
             :placeholder="t('设备运行参数 (JSON)')"
           />
         </el-form-item>
+
+        <el-form-item :label="t('添加时间') + ':'">
+          {{ formatTime(cameraForm.createdAt) }}
+        </el-form-item>
       </el-form>
+
       <template #footer>
         <div class="drawer-footer">
           <el-button @click="cameraDialogVisible = false">{{ t('取消') }}</el-button>