|
|
@@ -19,43 +19,43 @@
|
|
|
>
|
|
|
<el-menu-item index="/machine">
|
|
|
<el-icon><Monitor /></el-icon>
|
|
|
- <template #title>机器管理</template>
|
|
|
+ <template #title>{{ t('机器管理') }}</template>
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="/camera">
|
|
|
<el-icon><VideoCamera /></el-icon>
|
|
|
- <template #title>摄像头管理</template>
|
|
|
+ <template #title>{{ t('摄像头管理') }}</template>
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-menu-item index="/user">
|
|
|
<el-icon><UserFilled /></el-icon>
|
|
|
- <template #title>用户管理</template>
|
|
|
+ <template #title>{{ t('用户管理') }}</template>
|
|
|
</el-menu-item>
|
|
|
<el-menu-item index="/video-demo">
|
|
|
<el-icon><VideoPlay /></el-icon>
|
|
|
- <template #title>视频测试</template>
|
|
|
+ <template #title>{{ t('视频测试') }}</template>
|
|
|
</el-menu-item>
|
|
|
|
|
|
<el-sub-menu index="/stream">
|
|
|
<template #title>
|
|
|
<el-icon><Film /></el-icon>
|
|
|
- <span>Cloudflare Stream</span>
|
|
|
+ <span>{{ t('Cloudflare Stream') }}</span>
|
|
|
</template>
|
|
|
<el-menu-item index="/stream/videos">
|
|
|
<el-icon><Film /></el-icon>
|
|
|
- <template #title>视频管理</template>
|
|
|
+ <template #title>{{ t('视频管理') }}</template>
|
|
|
</el-menu-item>
|
|
|
<el-menu-item index="/stream/live">
|
|
|
<el-icon><VideoCameraFilled /></el-icon>
|
|
|
- <template #title>直播管理</template>
|
|
|
+ <template #title>{{ t('直播管理') }}</template>
|
|
|
</el-menu-item>
|
|
|
<el-menu-item index="/stream/config">
|
|
|
<el-icon><Setting /></el-icon>
|
|
|
- <template #title>Stream 配置</template>
|
|
|
+ <template #title>{{ t('Stream 配置') }}</template>
|
|
|
</el-menu-item>
|
|
|
<el-menu-item index="/stream-test">
|
|
|
<el-icon><Monitor /></el-icon>
|
|
|
- <template #title>快速测试</template>
|
|
|
+ <template #title>{{ t('快速测试') }}</template>
|
|
|
</el-menu-item>
|
|
|
</el-sub-menu>
|
|
|
</el-menu>
|
|
|
@@ -85,8 +85,8 @@
|
|
|
</span>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
- <el-dropdown-item command="changePassword">修改密码</el-dropdown-item>
|
|
|
- <el-dropdown-item command="logout">退出登录</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="changePassword">{{ t('修改密码') }}</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="logout">{{ t('退出登录') }}</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
|
@@ -103,26 +103,26 @@
|
|
|
</el-container>
|
|
|
|
|
|
<!-- 修改密码弹窗 -->
|
|
|
- <el-dialog v-model="passwordDialogVisible" title="修改密码" width="400px" :close-on-click-modal="false">
|
|
|
+ <el-dialog v-model="passwordDialogVisible" :title="t('修改密码')" width="400px" :close-on-click-modal="false">
|
|
|
<el-form ref="passwordFormRef" :model="passwordForm" :rules="passwordRules" label-width="80px">
|
|
|
- <el-form-item label="原密码" prop="oldPassword">
|
|
|
+ <el-form-item :label="t('原密码')" prop="oldPassword">
|
|
|
<el-input v-model="passwordForm.oldPassword" type="password" show-password placeholder="请输入原密码" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="新密码" prop="newPassword">
|
|
|
+ <el-form-item :label="t('新密码')" prop="newPassword">
|
|
|
<el-input v-model="passwordForm.newPassword" type="password" show-password placeholder="请输入新密码" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="确认密码" prop="confirmPassword">
|
|
|
+ <el-form-item :label="t('确认密码')" prop="confirmPassword">
|
|
|
<el-input
|
|
|
v-model="passwordForm.confirmPassword"
|
|
|
type="password"
|
|
|
show-password
|
|
|
- placeholder="请再次输入新密码"
|
|
|
+ :placeholder="t('请再次输入新密码')"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
- <el-button @click="passwordDialogVisible = false">取消</el-button>
|
|
|
- <el-button type="primary" :loading="passwordLoading" @click="handleChangePassword">确定</el-button>
|
|
|
+ <el-button @click="passwordDialogVisible = false">{{ t('取消') }}</el-button>
|
|
|
+ <el-button type="primary" :loading="passwordLoading" @click="handleChangePassword">{{ t('确定') }}</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</el-container>
|
|
|
@@ -182,20 +182,20 @@ const passwordForm = reactive({
|
|
|
|
|
|
const validateConfirmPassword = (_rule: any, value: string, callback: any) => {
|
|
|
if (value !== passwordForm.newPassword) {
|
|
|
- callback(new Error('两次输入的密码不一致'))
|
|
|
+ callback(new Error(t('两次输入的密码不一致')))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const passwordRules: FormRules = {
|
|
|
- oldPassword: [{ required: true, message: '请输入原密码', trigger: 'blur' }],
|
|
|
+ oldPassword: [{ required: true, message: t('请输入原密码'), trigger: 'blur' }],
|
|
|
newPassword: [
|
|
|
- { required: true, message: '请输入新密码', trigger: 'blur' },
|
|
|
- { min: 6, message: '密码长度不能少于6位', trigger: 'blur' }
|
|
|
+ { required: true, message: t('请输入新密码'), trigger: 'blur' },
|
|
|
+ { min: 6, message: t('密码长度不能少于6位'), trigger: 'blur' }
|
|
|
],
|
|
|
confirmPassword: [
|
|
|
- { required: true, message: '请再次输入新密码', trigger: 'blur' },
|
|
|
+ { required: true, message: t('请再次输入新密码'), trigger: 'blur' },
|
|
|
{ validator: validateConfirmPassword, trigger: 'blur' }
|
|
|
]
|
|
|
}
|