From 44ad86eea7957e70e1fd341c171f6a5034aa537e Mon Sep 17 00:00:00 2001 From: dalaolala Date: Tue, 10 Feb 2026 15:24:40 +0800 Subject: [PATCH] muti terminal management --- .gitignore | 1 + frontend/src/router/index.js | 6 + frontend/src/views/Dashboard.vue | 69 +- frontend/src/views/TerminalNew.vue | 1108 ++++++++++++++++++++++++++++ 4 files changed, 1169 insertions(+), 15 deletions(-) create mode 100644 frontend/src/views/TerminalNew.vue diff --git a/.gitignore b/.gitignore index 3c3629e..2d6243f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +prompt.txt diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index bb02bb1..a88d4c0 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -31,6 +31,12 @@ const routes = [ name: 'QuickConnect', component: () => import('@/views/QuickConnect.vue'), meta: { requiresAuth: true } + }, + { + path: '/terminal-new', + name: 'TerminalNew', + component: () => import('@/views/TerminalNew.vue'), + meta: { requiresAuth: true } } ] diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 6e90c79..24f430f 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -53,8 +53,10 @@ - {{ data.label }} - {{ data.host }}:{{ data.port }} +
+
{{ data.label }}
+
{{ data.host }}:{{ data.port }}
+
@@ -95,27 +97,34 @@
- -
+ +
-

SSH 终端

-

支持标准SSH协议,提供完整的终端体验

+

Web 终端

+

多页签终端管理,支持同时连接多个服务器

- +

安全加密

AES-256加密存储,保障服务器信息安全

- +

分组管理

支持服务器分组,方便管理和快速访问

+ +
+ +

快速连接

+

无需保存服务器信息,快速建立SSH连接

+
+
@@ -355,16 +364,32 @@ onMounted(async () => { margin-bottom: 20px; } +/* 树形组件样式调整 */ +:deep(.el-tree-node__content) { + height: 56px !important; + padding: 0 16px !important; + margin-bottom: 0 !important; + transition: all 0.3s ease !important; +} + +:deep(.el-tree-node) { + margin-bottom: 0 !important; +} + .tree-node { display: flex; align-items: center; width: 100%; - padding: 4px 0; + padding: 6px 0; + min-height: 48px; + box-sizing: border-box; } .group-node { font-weight: 600; color: #333; + padding: 8px 0; + min-height: 40px; } .server-node { @@ -372,25 +397,39 @@ onMounted(async () => { justify-content: space-between; align-items: center; width: 100%; - padding: 4px 8px; + padding: 8px; border-radius: 4px; transition: all 0.3s; + min-height: 56px; + box-sizing: border-box; } .server-node:hover { background-color: #f5f7fa; } -.server-name { +.server-info-wrapper { flex: 1; margin: 0 8px; - font-weight: 500; + min-width: 0; } -.server-info { - font-size: 12px; +.server-name { + font-weight: 500; + font-size: 14px; + color: #333; + cursor: pointer; + margin-bottom: 2px; +} + +.server-name:hover { + color: #409eff; +} + +.server-address { + font-size: 11px; color: #999; - margin-right: 8px; + opacity: 0.8; } .server-actions { diff --git a/frontend/src/views/TerminalNew.vue b/frontend/src/views/TerminalNew.vue new file mode 100644 index 0000000..45169bc --- /dev/null +++ b/frontend/src/views/TerminalNew.vue @@ -0,0 +1,1108 @@ + + + + + \ No newline at end of file