mirror of
https://github.com/silenty4ng/k5web
synced 2025-01-07 20:33:28 +00:00
update
This commit is contained in:
parent
6911c02cef
commit
31aa5c33b5
9 changed files with 76 additions and 18 deletions
|
@ -23,6 +23,7 @@
|
|||
import { ChatIcon, QrcodeIcon, FishIcon } from 'tdesign-icons-vue-next';
|
||||
import { computed, h } from 'vue';
|
||||
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
|
||||
import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
|
||||
import GlobalSetting from '@/components/global-setting/index.vue';
|
||||
import useLocale from '@/hooks/locale';
|
||||
import Aegis from 'aegis-web-sdk';
|
||||
|
@ -66,7 +67,7 @@
|
|||
case 'zh-CN':
|
||||
return zhCN;
|
||||
default:
|
||||
return zhCN;
|
||||
return enUS;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -20,10 +20,39 @@
|
|||
</div>
|
||||
<ul class="right-side">
|
||||
<li>
|
||||
<t-link href="https://txc.qq.com/products/647342" target="_blank">问题反馈</t-link>
|
||||
<t-link href="https://txc.qq.com/products/647342" target="_blank">{{ $t('navbar.qa') }}</t-link>
|
||||
</li>
|
||||
<li>
|
||||
<a-button type="primary" @click="connectIt">{{ appStore.connectState ? '断开' : '连接' }}</a-button>
|
||||
<a-button type="primary" @click="connectIt">{{ appStore.connectState ? $t('navbar.disconnect') : $t('navbar.connect') }}</a-button>
|
||||
</li>
|
||||
<li>
|
||||
<a-tooltip :content="$t('settings.language')">
|
||||
<a-button
|
||||
class="nav-btn"
|
||||
type="outline"
|
||||
:shape="'circle'"
|
||||
@click="setDropDownVisible"
|
||||
>
|
||||
<template #icon>
|
||||
<icon-language />
|
||||
</template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-dropdown trigger="click" @select="changeLocale as any">
|
||||
<div ref="triggerBtn" class="trigger-btn"></div>
|
||||
<template #content>
|
||||
<a-doption
|
||||
v-for="item in locales"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
>
|
||||
<template #icon>
|
||||
<icon-check v-show="item.value === currentLocale" />
|
||||
</template>
|
||||
{{ item.label }}
|
||||
</a-doption>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
</li>
|
||||
<li>
|
||||
<a-tooltip
|
||||
|
|
|
@ -29,11 +29,13 @@ import localeUserSetting from '@/views/user/setting/locale/en-US';
|
|||
import localeSettings from './en-US/settings';
|
||||
|
||||
export default {
|
||||
'menu.dashboard': 'Dashboard',
|
||||
'menu.dashboard': 'CPS',
|
||||
'menu.cps.channel': 'Channel',
|
||||
'menu.cps.settings': 'Settings',
|
||||
'menu.server.dashboard': 'Dashboard-Server',
|
||||
'menu.server.workplace': 'Workplace-Server',
|
||||
'menu.server.monitor': 'Monitor-Server',
|
||||
'menu.list': 'List',
|
||||
'menu.list': 'Tools',
|
||||
'menu.result': 'Result',
|
||||
'menu.exception': 'Exception',
|
||||
'menu.form': 'Form',
|
||||
|
@ -44,6 +46,10 @@ export default {
|
|||
'menu.faq': 'FAQ',
|
||||
'navbar.docs': 'Docs',
|
||||
'navbar.action.locale': 'Switch to English',
|
||||
'navbar.author': 'Author: BD8DFN',
|
||||
'navbar.connect': 'Connect',
|
||||
'navbar.disconnect': 'Disconnect',
|
||||
'navbar.qa': 'Feedback',
|
||||
...localeSettings,
|
||||
...localeMessageBox,
|
||||
...localeLogin,
|
||||
|
|
|
@ -30,6 +30,8 @@ import localeSettings from './zh-CN/settings';
|
|||
|
||||
export default {
|
||||
'menu.dashboard': '写频',
|
||||
'menu.cps.channel': '信道管理',
|
||||
'menu.cps.settings': '设置管理',
|
||||
'menu.server.dashboard': '仪表盘-服务端',
|
||||
'menu.server.workplace': '工作台-服务端',
|
||||
'menu.server.monitor': '实时监控-服务端',
|
||||
|
@ -44,6 +46,10 @@ export default {
|
|||
'menu.faq': '常见问题',
|
||||
'navbar.docs': '文档中心',
|
||||
'navbar.action.locale': '切换为中文',
|
||||
'navbar.author': '作者:BD8DFN',
|
||||
'navbar.connect': '连接',
|
||||
'navbar.disconnect': '断开',
|
||||
'navbar.qa': '问题反馈',
|
||||
...localeSettings,
|
||||
...localeMessageBox,
|
||||
...localeLogin,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
export default {
|
||||
path: 'https://www.vicicode.com/',
|
||||
name: '作者:BD8DFN',
|
||||
name: 'BD8DFN',
|
||||
meta: {
|
||||
locale: '作者:BD8DFN',
|
||||
locale: 'navbar.author',
|
||||
requiresAuth: true,
|
||||
order: 8,
|
||||
},
|
||||
|
|
|
@ -27,7 +27,7 @@ const DASHBOARD: AppRouteRecordRaw = {
|
|||
name: 'Channel',
|
||||
component: () => import('@/views/list/search-table/index.vue'),
|
||||
meta: {
|
||||
locale: '信道管理',
|
||||
locale: 'menu.cps.channel',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
},
|
||||
|
@ -37,7 +37,7 @@ const DASHBOARD: AppRouteRecordRaw = {
|
|||
name: 'Settings',
|
||||
component: () => import('@/views/list/settings/index.vue'),
|
||||
meta: {
|
||||
locale: '设置管理',
|
||||
locale: 'menu.cps.settings',
|
||||
requiresAuth: true,
|
||||
roles: ['*'],
|
||||
},
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
<a-col class="banner">
|
||||
<a-col>
|
||||
<a-typography-title :heading="5" style="margin-top: 0">
|
||||
{{ appStore.connectState ? "欢迎你~,连接成功!" : "欢迎你~,点击右上角“连接”按钮连接手台。" }}
|
||||
{{ appStore.connectState ? $t('workplace.welcomeSuc') : $t('workplace.welcome') }}
|
||||
</a-typography-title>
|
||||
</a-col>
|
||||
<a-divider class="panel-border" />
|
||||
<a-space>
|
||||
<a-card v-show="appStore.connectState" :style="{ marginTop: '2em', marginBottom: '2em' }" title="手台信息">
|
||||
当前固件版本:{{ appStore.firmwareVersion }} <br />
|
||||
匹配写频配置:{{ appStore.configuration?.name }} <br />
|
||||
存储大小:{{ state.eepromSize }} <a-button size="mini" type="primary" @click="checkEeprom">检测</a-button>
|
||||
<a-card v-show="appStore.connectState" :style="{ marginTop: '2em', marginBottom: '2em' }" :title="$t('workplace.info')">
|
||||
{{ $t('workplace.current') }}{{ appStore.firmwareVersion }} <br />
|
||||
{{ $t('workplace.writeconfig') }}{{ appStore.configuration?.name }} <br />
|
||||
{{ $t('workplace.eepromSize') }}{{ state.eepromSize }} <a-button size="mini" type="primary" @click="checkEeprom">{{ $t('workplace.checkIt') }}</a-button>
|
||||
</a-card>
|
||||
</a-space>
|
||||
<div>
|
||||
|
@ -23,11 +23,13 @@
|
|||
import { reactive } from 'vue';
|
||||
import { useAppStore } from '@/store';
|
||||
import { eeprom_write, eeprom_reboot, eeprom_init, eeprom_read } from '@/utils/serial.js';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
|
||||
const appStore = useAppStore();
|
||||
|
||||
const state = reactive({
|
||||
eepromSize: "点击检测按钮检测"
|
||||
eepromSize: t('workplace.clickCheck')
|
||||
})
|
||||
|
||||
const checkEeprom = async () => {
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
export default {
|
||||
'menu.dashboard.workplace': 'Workplace',
|
||||
'workplace.welcome': 'Welcome!',
|
||||
'menu.dashboard.workplace': 'Basic Information',
|
||||
'workplace.welcome': 'Welcome~, click the "Connect" button in the upper right corner to connect the UV-K5.',
|
||||
'workplace.welcomeSuc': 'Welcome~, connection successful.',
|
||||
'workplace.info': 'Information',
|
||||
'workplace.current': 'Current Firmware Version: ',
|
||||
'workplace.writeconfig': 'Write Configuration: ',
|
||||
'workplace.eepromSize': 'EEPROM Size: ',
|
||||
'workplace.clickCheck': 'Click the TEST button to test',
|
||||
'workplace.checkIt': 'TEST',
|
||||
'workplace.balance': 'Balance (CNY)',
|
||||
'workplace.order.pending': 'Pending',
|
||||
'workplace.order.pendingRenewal': 'Renewal Order',
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
export default {
|
||||
'menu.dashboard.workplace': '基础信息',
|
||||
'workplace.welcome': '欢迎回来!',
|
||||
'workplace.welcome': '欢迎你~,点击右上角“连接”按钮连接手台。',
|
||||
'workplace.welcomeSuc': '欢迎你~,连接成功!',
|
||||
'workplace.info': '手台信息',
|
||||
'workplace.current': '当前固件版本:',
|
||||
'workplace.writeconfig': '匹配写频配置:',
|
||||
'workplace.eepromSize': '存储大小:',
|
||||
'workplace.clickCheck': '点击检测按钮检测',
|
||||
'workplace.checkIt': '检测',
|
||||
'workplace.balance': '余额(元)',
|
||||
'workplace.order.pending': '待支付',
|
||||
'workplace.order.pendingRenewal': '待续费订单',
|
||||
|
|
Loading…
Reference in a new issue