diff --git a/frontend/src/components/PageHeader.vue b/frontend/src/components/PageHeader.vue new file mode 100644 index 0000000..3735208 --- /dev/null +++ b/frontend/src/components/PageHeader.vue @@ -0,0 +1,58 @@ + + + + {{ title }} + {{ description }} + + + + + + + + + + + diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json index fc510b3..b84b12c 100644 --- a/frontend/src/locales/en-US.json +++ b/frontend/src/locales/en-US.json @@ -230,7 +230,9 @@ "viewTasks": "View Tasks", "noTasks": "No task history", "trafficTrend": "Traffic Trend", - "noTrafficData": "No traffic data yet (waiting for samples…)" + "noTrafficData": "No traffic data yet (waiting for samples…)", + "pageDescription": "Manage VPN tunnels and runtime status", + "title": "Tunnels" }, "oidcGuide": { "title": "Feishu / OIDC browser authentication", @@ -648,7 +650,19 @@ "loadFailed": "Could not load identity settings", "saved": "Identity settings saved", "saveFailed": "Could not save identity settings", - "pageDescription": "Configure Feishu or OIDC identity (app credentials, tenant, callbacks, and directory sync). Per-tunnel admission stays on the tunnel editor." + "pageDescription": "Configure Feishu app credentials, OIDC issuer, and directory sync.", + "credentialsTitle": "Credentials", + "addressSyncTitle": "Addresses & sync", + "tagEnabled": "Enabled", + "tagDisabled": "Disabled", + "tagTlsOk": "Entry ready", + "tagTlsPending": "Entry pending", + "tagGatewayOk": "Gateway synced", + "tagGatewayPending": "Gateway pending", + "tagDirSynced": "Directory synced", + "tagDirIdle": "Directory idle", + "retryGateway": "Retry gateway sync", + "goPublicEntry": "Open public entry" }, "settings": { "pageDescription": "Manage account security, the public gateway, and server setup.", diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json index 1b39ae5..5b2cb52 100644 --- a/frontend/src/locales/zh-CN.json +++ b/frontend/src/locales/zh-CN.json @@ -230,7 +230,9 @@ "viewTasks": "查看任务", "noTasks": "暂无任务记录", "trafficTrend": "流量趋势", - "noTrafficData": "暂无流量数据(等待采样中…)" + "noTrafficData": "暂无流量数据(等待采样中…)", + "pageDescription": "管理 VPN 专线与运行状态", + "title": "专线" }, "oidcGuide": { "title": "飞书 / OIDC 浏览器认证配置", @@ -648,7 +650,19 @@ "loadFailed": "读取身份配置失败", "saved": "身份配置已保存", "saveFailed": "保存身份配置失败", - "pageDescription": "配置飞书或 OIDC 身份源(App 凭据、租户、回调与通讯录同步)。专线准入名单仍在对应专线编辑页配置。" + "pageDescription": "配置飞书应用凭据,管理 OIDC 发行者与通讯录同步。", + "credentialsTitle": "应用凭据", + "addressSyncTitle": "地址与同步", + "tagEnabled": "已启用", + "tagDisabled": "未启用", + "tagTlsOk": "入口就绪", + "tagTlsPending": "入口待配", + "tagGatewayOk": "网关已同步", + "tagGatewayPending": "网关待同步", + "tagDirSynced": "通讯录已同步", + "tagDirIdle": "通讯录未同步", + "retryGateway": "重试同步网关", + "goPublicEntry": "去公网入口" }, "settings": { "pageDescription": "管理个人安全、公网认证入口与服务器环境。", diff --git a/frontend/src/views/Identity.vue b/frontend/src/views/Identity.vue index d6f6984..38678e1 100644 --- a/frontend/src/views/Identity.vue +++ b/frontend/src/views/Identity.vue @@ -1,18 +1,28 @@ - - {{ $t('identity.pageDescription') }} - - + + + {{ $t('tls.refresh') }} + + + diff --git a/frontend/src/views/Tunnels.vue b/frontend/src/views/Tunnels.vue index 74948ca..6693592 100644 --- a/frontend/src/views/Tunnels.vue +++ b/frontend/src/views/Tunnels.vue @@ -1,27 +1,27 @@ - - - - - - - - - - - - - - - - - - - {{ $t('tunnels.createTunnel') }} - - - + + + + {{ $t('common.refresh') }} + + + {{ $t('tunnels.createTunnel') }} + + + + + + + + + + + + + + + {{ $t('common.refresh') }} @@ -34,7 +34,7 @@ {{ $t('tunnels.batchDelete') }} - + @@ -79,17 +79,17 @@ {{ row.node?.name || $t('tunnels.localNode') }} - + - + {{ $t('tunnels.start') }} {{ $t('tunnels.stop') }} - {{ $t('common.edit') }} onMoreCommand(cmd, row)"> {{ $t('tunnels.more') }} {{ $t('tunnels.detail') }} + {{ $t('common.edit') }} {{ $t('tunnels.viewLogs') }} {{ $t('tunnels.downloadConfig') }} {{ $t('tunnels.showQrCode') }} @@ -110,6 +110,7 @@ + @@ -127,6 +128,7 @@ import api from '../api' import { fmtBytes } from '../utils/format' import ProtocolIcon from '../components/ProtocolIcon.vue' import TaskProgress from '../components/TaskProgress.vue' +import PageHeader from '../components/PageHeader.vue' import TunnelDetailDrawer from './tunnels/components/TunnelDetailDrawer.vue' import TunnelLogDialog from './tunnels/components/TunnelLogDialog.vue' import { protocolDisplay, protocolColor } from '../protocols' @@ -219,8 +221,12 @@ async function load() { } // 更多操作下拉命令分发 +function openDetail(row) { + detailDrawer.value?.open(row) +} function onMoreCommand(cmd, row) { if (cmd === 'detail') detailDrawer.value?.open(row) + else if (cmd === 'edit') router.push(`/tunnels/${row.id}/edit`) else if (cmd === 'delete') remove(row) else if (cmd === 'download') download(row) else if (cmd === 'qrcode') detailDrawer.value?.showQr(row) @@ -296,11 +302,10 @@ onUnmounted(() => clearInterval(timer)) diff --git a/frontend/src/views/tunnels/components/TunnelDetailDrawer.vue b/frontend/src/views/tunnels/components/TunnelDetailDrawer.vue index 79850ed..4486f65 100644 --- a/frontend/src/views/tunnels/components/TunnelDetailDrawer.vue +++ b/frontend/src/views/tunnels/components/TunnelDetailDrawer.vue @@ -1,7 +1,7 @@ - + {{ $t(protocolDisplay(detail.tunnel.protocol)) }} @@ -43,6 +43,7 @@ + {{ $t('common.edit') }} {{ $t('tunnels.savePolicy') }}
{{ description }}
{{ $t('identity.pageDescription') }}