From 6ac99b692d5590e72d4f90abd386e515b83ad056 Mon Sep 17 00:00:00 2001 From: lijiahang Date: Thu, 25 Jan 2024 17:43:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=91=BD=E4=BB=A4=E5=8F=B3=E9=94=AE?= =?UTF-8?q?=E8=8F=9C=E5=8D=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/modules/terminal/types.ts | 10 +- .../host/terminal/assets/styles/layout.less | 6 + .../components/snippet/snippet-drawer.vue | 2 +- .../components/snippet/snippet-group.vue | 18 +- .../components/snippet/snippet-item.vue | 173 +++++++++++++----- .../xterm/terminal-context-menu.vue | 7 +- .../handler/terminal-output-processor.ts | 2 +- .../handler/terminal-session-handler.ts | 40 +++- .../host/terminal/handler/terminal-session.ts | 5 +- .../host/terminal/types/terminal.type.ts | 2 + 10 files changed, 203 insertions(+), 62 deletions(-) diff --git a/orion-ops-ui/src/store/modules/terminal/types.ts b/orion-ops-ui/src/store/modules/terminal/types.ts index 0dd78839..99624442 100644 --- a/orion-ops-ui/src/store/modules/terminal/types.ts +++ b/orion-ops-ui/src/store/modules/terminal/types.ts @@ -75,15 +75,19 @@ export interface TerminalShortcutSetting { } // 终端快捷键 -export interface TerminalShortcutKey { - item: string; - enabled: boolean; +export interface ShortcutKey { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; code: string; } +// 终端快捷键 +export interface TerminalShortcutKey extends ShortcutKey { + item: string; + enabled: boolean; +} + // 终端快捷键编辑 export interface TerminalShortcutKeyEditable extends TerminalShortcutKey { editable: boolean; diff --git a/orion-ops-ui/src/views/host/terminal/assets/styles/layout.less b/orion-ops-ui/src/views/host/terminal/assets/styles/layout.less index 6619e3db..557501a6 100644 --- a/orion-ops-ui/src/views/host/terminal/assets/styles/layout.less +++ b/orion-ops-ui/src/views/host/terminal/assets/styles/layout.less @@ -294,4 +294,10 @@ body[terminal-theme='dark'] .arco-modal-container { align-items: center; } } + + &-icon { + font-size: 16px; + margin: 0 8px 0 4px; + } + } diff --git a/orion-ops-ui/src/views/host/terminal/components/snippet/snippet-drawer.vue b/orion-ops-ui/src/views/host/terminal/components/snippet/snippet-drawer.vue index 1fa20adb..045fdc72 100644 --- a/orion-ops-ui/src/views/host/terminal/components/snippet/snippet-drawer.vue +++ b/orion-ops-ui/src/views/host/terminal/components/snippet/snippet-drawer.vue @@ -5,7 +5,7 @@ @close="onClose">