Skip to content

Commit 026c7c6

Browse files
committed
fix: 自测问题修复
1 parent 056eb50 commit 026c7c6

7 files changed

Lines changed: 104 additions & 50 deletions

File tree

web-ui/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<meta name="description" content="GLKVM Cloud Platform provides secure, high-performance remote device access capabilities, seamlessly enabling remote work, IT operations, and centralized device management - delivering local-like control experience across geographical boundaries." />
8-
<title>GLKVM - 轻量级远程访问平台</title>
8+
<title>GLKVM</title>
99
</head>
1010
<body>
1111
<div id="app"></div>

web-ui/src/lang/locales/en.json

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
"copyFailed": "Copy Failed",
1111
"detail": "Detail",
1212
"success": "Success",
13-
"failed": "Failed"
13+
"failed": "Failed",
14+
"cancel": "Cancel",
15+
"ok": "OK",
16+
"close": "Close",
17+
"about": "About"
1418
},
1519
"login": {
1620
"authorizationRequired": "Authorization Required",
@@ -57,6 +61,30 @@
5761
"standardOutput": "Standard output",
5862
"standardErrorOutput": "Standard error output"
5963
},
64+
"rtty": {
65+
"requestingDeviceToCreateTerminal": "Requesting device to create terminal...",
66+
"uploadFileToDevice": "Upload file to device",
67+
"selectFile": "Select file",
68+
"copyTips": "Copy - Ctrl+Insert",
69+
"pasteTips": "Paste - Shift+Insert",
70+
"clearScrollBack": "Clear Scrollback",
71+
"fontUp": "Increase font size",
72+
"fontDown": "Decrease font size",
73+
"uploadFile": "Upload file",
74+
"downloadFile": "Download file",
75+
"splitLeft": "Split: Left",
76+
"splitRight": "Split: Right",
77+
"splitUp": "Split: Up",
78+
"splitDown": "Split: Down",
79+
"copiedToClipboard": "Copied to clipboard",
80+
"executeCommandR": "Please execute command \"rtty -R\" in current terminal!",
81+
"executeCommandS": "Please execute command \"rtty -S file\" in current terminal!",
82+
"useShortcutSI": "Please use shortcut \"Shift+Insert\"",
83+
"pastedFromClipboard": "Pasted from clipboard",
84+
"clipboardPermissionRequired": "Clipboard Permission Required",
85+
"clipboardInstructions": "To enable clipboard permissions, click the site information icon on the left of address bar to access permission settings, or configure clipboard permissions for this site in browser privacy settings. You can also use Shift+Insert keyboard shortcut to paste.",
86+
"fileTooLargeTips": "The file you will upload is too large(> 4294967295 Byte)"
87+
},
6088
"errorPage": {
6189
"sorry": "Sorry!",
6290
"backHome": "Back Home",
@@ -153,4 +181,4 @@
153181
"CLOUD_EMAIL_NOT_MATCH_USER": "The email not match the user.",
154182
"CLOUD_USER_NOT_EXIST": "The user does not exist."
155183
}
156-
}
184+
}

web-ui/src/lang/locales/zh.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
"copyFailed": "复制失败",
1111
"detail": "详情",
1212
"success": "成功",
13-
"failed": "失败"
13+
"failed": "失败",
14+
"cancel": "取消",
15+
"ok": "确定",
16+
"close": "关闭",
17+
"about": "关于"
1418
},
1519
"login": {
1620
"authorizationRequired": "需要授权",
@@ -57,6 +61,30 @@
5761
"standardOutput": "标准输出",
5862
"standardErrorOutput": "标准错误输出"
5963
},
64+
"rtty": {
65+
"requestingDeviceToCreateTerminal": "正在请求设备创建终端...",
66+
"uploadFileToDevice": "上传文件到设备",
67+
"selectFile": "选择文件",
68+
"copyTips": "复制 - Ctrl+Insert",
69+
"pasteTips": "粘贴 - Shift+Insert",
70+
"clearScrollBack": "清除回滚",
71+
"fontUp": "增大字号",
72+
"fontDown": "减小字号",
73+
"uploadFile": "上传文件",
74+
"downloadFile": "下载文件",
75+
"splitLeft": "拆分窗格: 左",
76+
"splitRight": "拆分窗格: 右",
77+
"splitUp": "拆分窗格: 上",
78+
"splitDown": "拆分窗格: 下",
79+
"copiedToClipboard": "已复制到剪切板",
80+
"executeCommandR": "请在当前终端中执行命令 \"rtty -R\"",
81+
"executeCommandS": "请在当前终端中执行命令 \"rtty -S file\"",
82+
"useShortcutSI": "请使用快捷键 \"Shift+Insert\"",
83+
"pastedFromClipboard": "已从剪切板粘贴",
84+
"clipboardPermissionRequired": "需要剪切板权限",
85+
"clipboardInstructions": "要启用剪切板权限,请点击地址栏左侧的站点信息图标进入权限设置,或在浏览器设置的隐私安全选项中配置此网站的剪切板权限。也可使用快捷键 Shift+Insert 进行粘贴。",
86+
"fileTooLargeTips": "您要上传的文件太大了(> 4294967295 Byte)"
87+
},
6088
"errorPage": {
6189
"sorry": "抱歉!",
6290
"backHome": "返回首页",

web-ui/src/stores/modules/device.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: shufei.han
33
* @Date: 2025-06-10 16:46:00
44
* @LastEditors: LPY
5-
* @LastEditTime: 2025-08-26 09:30:15
5+
* @LastEditTime: 2025-08-26 17:18:56
66
* @FilePath: \glkvm-cloud\web-ui\src\stores\modules\device.ts
77
* @Description: 设备有关的状态管理
88
*/
@@ -68,7 +68,10 @@ export const useDeviceStore = defineStore('device', () => {
6868
state.hasDevice = true
6969
}
7070
pageLink.value.setTotal(res.info.length)
71-
state.deviceList = res.info || []
71+
state.deviceList = res.info.filter(d => {
72+
return d.id.toLowerCase().indexOf(computedDeviceQuery.value.searchText) > -1
73+
|| d.description.toLowerCase().indexOf(computedDeviceQuery.value.searchText) > -1
74+
}) || []
7275
state.completeDeviceList = res.info || []
7376
!isPolling && (state.getDeviceLoading = false)
7477
} catch (error) {
@@ -99,13 +102,8 @@ export const useDeviceStore = defineStore('device', () => {
99102
}, GET_DEVICE_POLLING_INTERVAL)
100103
}
101104
/** 监听设备列表的查询条件变化 */
102-
watch(computedDeviceQuery, (newQuery) => {
103-
console.log('Device query changed:', newQuery)
104-
// pageLink.value.resetPage()
105-
// getDeviceList()
106-
state.deviceList = state.completeDeviceList.filter(d => {
107-
return d.id.toLowerCase().indexOf(newQuery.searchText) > -1 || d.description.toLowerCase().indexOf(newQuery.searchText) > -1
108-
})
105+
watch(computedDeviceQuery, () => {
106+
getDeviceList()
109107
})
110108

111109
return {

web-ui/src/views/device/components/rttyTerm.vue

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
* @Author: LPY
33
* @Date: 2025-08-26 11:55:49
44
* @LastEditors: LPY
5-
* @LastEditTime: 2025-08-26 14:42:10
5+
* @LastEditTime: 2025-08-26 17:45:17
66
* @FilePath: \glkvm-cloud\web-ui\src\views\device\components\rttyTerm.vue
77
* @Description:
88
-->
99
<template>
10-
<a-spin :tip="$t('Requesting device to create terminal...')">
10+
<a-spin :tip="$t('rtty.requestingDeviceToCreateTerminal')">
1111
<div class="terminal-container">
1212
<div ref="terminal" class="terminal" @contextmenu.prevent="showContextmenu"></div>
1313
<BaseButton
@@ -18,14 +18,14 @@
1818
circle
1919
class="keyboard-toggle-btn">⌨</BaseButton>
2020
<RttyKeyboard v-show="showKeyboard" @keypress="handleKeypress" @close="hideKeyboard" class="floating-keyboard"/>
21-
<BaseModal v-model:open="fileCtx.modal" :title="$t('Upload file to device')" @close="onUploadDialogClosed" :width="400">
21+
<BaseModal v-model:open="fileCtx.modal" :title="$t('rtty.uploadFileToDevice')" @close="onUploadDialogClosed" :width="400">
2222
<a-upload :beforeUpload="beforeUpload" action="#">
23-
<BaseButton type="primary">{{ $t("Select file") }}</BaseButton>
23+
<BaseButton type="primary">{{ $t("rtty.selectFile") }}</BaseButton>
2424
</a-upload>
2525
<p v-if="fileCtx.file !== null"> {{ fileCtx.file.name }}</p>
2626
<template #footer>
27-
<BaseButton @click="fileCtx.modal = false">{{ $t('Cancel') }}</BaseButton>
28-
<BaseButton type="primary" @click="doUploadFile">{{ $t('OK') }}</BaseButton>
27+
<BaseButton @click="fileCtx.modal = false">{{ $t('common.cancel') }}</BaseButton>
28+
<BaseButton type="primary" @click="doUploadFile">{{ $t('common.ok') }}</BaseButton>
2929
</template>
3030
</BaseModal>
3131
<ContextMenu v-model="contextmenuPos" :menus="contextmenus" @click="onContextmenuClick"/>
@@ -36,7 +36,6 @@
3636
<script setup lang="ts">
3737
import { ref, reactive, onMounted, onUnmounted, nextTick, useTemplateRef } from 'vue'
3838
import { useRoute, useRouter } from 'vue-router'
39-
import { useI18n } from 'vue-i18n'
4039
import useClipboard from 'vue-clipboard3'
4140
import { Terminal } from '@xterm/xterm'
4241
import { FitAddon } from '@xterm/addon-fit'
@@ -47,6 +46,7 @@ import ContextMenu from './components/contextMenu.vue'
4746
import RttyKeyboard from './components/rttyKeyboard.vue'
4847
import { BaseModal } from '@gl/main/components'
4948
import { message, Modal } from 'ant-design-vue'
49+
import { t } from '@/hooks/useLanguage'
5050
5151
const LoginErrorOffline = 4000
5252
const LoginErrorBusy = 4001
@@ -66,26 +66,25 @@ const props = defineProps({
6666
const emit = defineEmits(['split', 'close'])
6767
6868
const router = useRouter()
69-
const { t } = useI18n()
7069
const { toClipboard } = useClipboard()
7170
7271
const terminal = useTemplateRef('terminal')
7372
const contextmenuPos = ref(null)
7473
7574
const contextmenus = [
76-
{name: 'copy', caption: t('Copy - Ctrl+Insert')},
77-
{name: 'paste', caption: t('Paste - Shift+Insert')},
78-
{name: 'clear', caption: t('Clear Scrollback')},
79-
{name: 'font+', caption: t('font+')},
80-
{name: 'font-', caption: t('font-')},
81-
{name: 'upload', caption: t('Upload file') + ' - rtty -R'},
82-
{name: 'download', caption: t('Download file') + ' - rtty -S file'},
83-
{name: 'split-left', caption: t('split-left')},
84-
{name: 'split-right', caption: t('split-right')},
85-
{name: 'split-up', caption: t('split-up')},
86-
{name: 'split-down', caption: t('split-down')},
87-
{name: 'close', caption: t('Close')},
88-
{name: 'about', caption: t('About')},
75+
{name: 'copy', caption: t('rtty.copyTips')},
76+
{name: 'paste', caption: t('rtty.pasteTips')},
77+
{name: 'clear', caption: t('rtty.clearScrollBack')},
78+
{name: 'font+', caption: t('rtty.fontUp')},
79+
{name: 'font-', caption: t('rtty.fontDown')},
80+
{name: 'upload', caption: t('rtty.uploadFile') + ' - rtty -R'},
81+
{name: 'download', caption: t('rtty.downloadFile') + ' - rtty -S file'},
82+
{name: 'split-left', caption: t('rtty.splitLeft')},
83+
{name: 'split-right', caption: t('rtty.splitRight')},
84+
{name: 'split-up', caption: t('rtty.splitUp')},
85+
{name: 'split-down', caption: t('rtty.splitDown')},
86+
{name: 'close', caption: t('common.close')},
87+
{name: 'about', caption: t('common.about')},
8988
]
9089
9190
const fileCtx = reactive({
@@ -130,7 +129,7 @@ const onContextmenuClick = (name) => {
130129
if (name === 'copy') {
131130
const text = term.getSelection()
132131
if (text)
133-
copyText(text).then(() => message.success(t('Copied to clipboard')))
132+
copyText(text).then(() => message.success(t('rtty.copiedToClipboard')))
134133
} else if (name === 'paste') {
135134
pasteFromClipboard()
136135
} else if (name === 'clear') {
@@ -140,9 +139,9 @@ const onContextmenuClick = (name) => {
140139
} else if (name === 'font-') {
141140
updateFontSize(-1)
142141
} else if (name === 'upload') {
143-
message.success(t('Please execute command "rtty -R" in current terminal!'))
142+
message.success(t('rtty.executeCommandR'))
144143
} else if (name === 'download') {
145-
message.success(t('Please execute command "rtty -S file" in current terminal!'))
144+
message.success(t('rtty.executeCommandS'))
146145
} else if (name === 'split-left') {
147146
emit('split', props.panelId, 'left')
148147
} else if (name === 'split-right') {
@@ -163,23 +162,23 @@ const onContextmenuClick = (name) => {
163162
const pasteFromClipboard = async () => {
164163
try {
165164
if (!navigator.clipboard || !navigator.clipboard.readText) {
166-
message.info(t('Please use shortcut "Shift+Insert"'))
165+
message.info(t('rtty.useShortcutSI"'))
167166
return
168167
}
169168
170169
const text = await navigator.clipboard.readText()
171170
if (text) {
172171
sendTermData(text)
173-
message.success(t('Pasted from clipboard'))
172+
message.success(t('rtty.pastedFromClipboard'))
174173
}
175174
} catch (error) {
176175
if (error.name === 'NotAllowedError') {
177176
Modal.warning({
178-
title: t('Clipboard Permission Required'),
179-
content: t('clipboard_instructions'),
177+
title: t('rtty.clipboardPermissionRequired'),
178+
content: t('rtty.clipboardInstructions'),
180179
})
181180
} else {
182-
message.info(t('Please use shortcut "Shift+Insert"'))
181+
message.info(t('rtty.useShortcutSI"'))
183182
}
184183
}
185184
}
@@ -222,7 +221,7 @@ const doUploadFile = () => {
222221
term.focus()
223222
224223
if (fileCtx.file.size > 0xffffffff) {
225-
message.error(t('The file you will upload is too large(> 4294967295 Byte)'))
224+
message.error(t('rtty.fileTooLargeTips'))
226225
return
227226
}
228227

web-ui/src/views/layout/layHeader/layHeader.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: LPY
33
* @Date: 2025-05-30 15:21:14
44
* @LastEditors: LPY
5-
* @LastEditTime: 2025-08-26 10:22:35
5+
* @LastEditTime: 2025-08-26 17:57:09
66
* @FilePath: \glkvm-cloud\web-ui\src\views\layout\layHeader\layHeader.vue
77
* @Description: 顶部集成页
88
-->
@@ -16,21 +16,21 @@
1616
<ATooltip>
1717
<template #title>{{ githubLink }}</template>
1818
<a :href="githubLink" target="_blank" rel="noopener noreferrer" class="icon-area">
19-
<BaseSvg name="gl-icon-github" style="font-size: 16px;" />
19+
<BaseSvg name="gl-icon-github" :size="24" />
2020
</a>
2121
</ATooltip>
2222
<!-- 问题指引 -->
2323
<ATooltip>
2424
<template #title>{{ helpLink }}</template>
2525
<a :href="helpLink" target="_blank" rel="noopener noreferrer" class="icon-area">
26-
<BaseSvg name="gl-icon-help" style="font-size: 16px;" />
26+
<BaseSvg name="gl-icon-help" :size="24" />
2727
</a>
2828
</ATooltip>
2929
<!-- 竖线 -->
3030
<div class="vertical-line" />
3131

3232
<a href="javascript:;" class="log-out" @click="userStore.manualLogout">
33-
<BaseSvg name="gl-icon-logout" style="margin-right: 12px;"></BaseSvg>
33+
<BaseSvg name="gl-icon-logout" style="margin-right: 12px;" :size="24"></BaseSvg>
3434
{{ $t('login.signOut') }}
3535
</a>
3636
</div>
@@ -82,7 +82,7 @@ const helpLink = 'https://www.gl-inet.com'
8282
justify-content: center;
8383
align-items: center;
8484
border-radius: 4px;
85-
color: var(--gl-color-text-level2);
85+
color: var(--gl-color-text-level3);
8686
cursor: pointer;
8787
8888
&:hover {
@@ -100,7 +100,7 @@ const helpLink = 'https://www.gl-inet.com'
100100
.log-out {
101101
display: flex;
102102
align-items: center;
103-
color: var(--gl-color-text-level2);
103+
color: var(--gl-color-text-level3);
104104
}
105105
106106
}

web-ui/src/views/login/loginPage.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: LPY
33
* @Date: 2025-05-30 10:48:43
44
* @LastEditors: LPY
5-
* @LastEditTime: 2025-08-25 19:21:32
5+
* @LastEditTime: 2025-08-26 17:11:12
66
* @FilePath: \glkvm-cloud\web-ui\src\views\login\loginPage.vue
77
* @Description: 登录页面
88
-->
@@ -83,6 +83,7 @@ const handleLogin = () => {
8383
router.push(redirect)
8484
} catch (error) {
8585
console.log(error)
86+
state.loading = false
8687
message.error(t('login.incorrectPwd'))
8788
}
8889
})

0 commit comments

Comments
 (0)