From 34ebad0b5f1449af2942148f538a556a09af5a22 Mon Sep 17 00:00:00 2001 From: lijiahangmax Date: Thu, 11 Jan 2024 01:25:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=BE=E7=BD=AE=E4=B8=BB=E6=9C=BA?= =?UTF-8?q?=E5=88=86=E7=BB=84=E5=86=85=E5=85=83=E7=B4=A0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/TerminalPreferenceModel.java | 5 +-- .../strategy/TerminalPreferenceStrategy.java | 3 +- .../layout/terminal-left-sidebar.vue | 22 +++++++-- .../host/terminal/types/terminal.const.ts | 45 +++++++++++++++++-- 4 files changed, 62 insertions(+), 13 deletions(-) diff --git a/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/model/TerminalPreferenceModel.java b/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/model/TerminalPreferenceModel.java index c60c254e..f057e517 100644 --- a/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/model/TerminalPreferenceModel.java +++ b/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/model/TerminalPreferenceModel.java @@ -21,9 +21,6 @@ import lombok.NoArgsConstructor; @AllArgsConstructor public class TerminalPreferenceModel implements PreferenceModel { - @Schema(description = "暗色主题") - private String darkTheme; - @Schema(description = "新建连接类型") private String newConnectionType; @@ -34,7 +31,7 @@ public class TerminalPreferenceModel implements PreferenceModel { private JSONObject backgroundSetting; @Schema(description = "终端主题") - private JSONObject themeSchema; + private JSONObject theme; @Data @Builder diff --git a/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/strategy/TerminalPreferenceStrategy.java b/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/strategy/TerminalPreferenceStrategy.java index 916c2c0b..bd06c406 100644 --- a/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/strategy/TerminalPreferenceStrategy.java +++ b/orion-ops-module-infra/orion-ops-module-infra-service/src/main/java/com/orion/ops/module/infra/handler/preference/strategy/TerminalPreferenceStrategy.java @@ -17,7 +17,6 @@ public class TerminalPreferenceStrategy implements IPreferenceStrategy = [ + { + icon: 'icon-drive-file', + content: InnerTabs.SFTP_SETTING.title, + click: () => tabManager.openTab(InnerTabs.SFTP_SETTING) + }, { icon: 'icon-command', content: InnerTabs.SHORTCUT_SETTING.title, - visible: false, click: () => tabManager.openTab(InnerTabs.SHORTCUT_SETTING) }, { - icon: 'icon-tool', - content: InnerTabs.TOOL_SETTING.title, - click: () => tabManager.openTab(InnerTabs.TOOL_SETTING) + icon: 'icon-desktop', + content: InnerTabs.DISPLAY_SETTING.title, + click: () => tabManager.openTab(InnerTabs.DISPLAY_SETTING) + }, + { + icon: 'icon-stamp', + content: InnerTabs.INTERACT_SETTING.title, + click: () => tabManager.openTab(InnerTabs.INTERACT_SETTING) }, { icon: 'icon-palette', content: InnerTabs.THEME_SETTING.title, click: () => tabManager.openTab(InnerTabs.THEME_SETTING) }, + { + icon: 'icon-settings', + content: InnerTabs.TERMINAL_SETTING.title, + click: () => tabManager.openTab(InnerTabs.TERMINAL_SETTING) + }, ]; diff --git a/orion-ops-ui/src/views/host/terminal/types/terminal.const.ts b/orion-ops-ui/src/views/host/terminal/types/terminal.const.ts index 82b30e5e..a9b56089 100644 --- a/orion-ops-ui/src/views/host/terminal/types/terminal.const.ts +++ b/orion-ops-ui/src/views/host/terminal/types/terminal.const.ts @@ -24,14 +24,24 @@ export const InnerTabs = { title: '新建连接', type: TabType.SETTING }, + SFTP_SETTING: { + key: 'sftpSetting', + title: 'sftp设置', + type: TabType.SETTING + }, SHORTCUT_SETTING: { key: 'shortcutSetting', title: '快捷键设置', type: TabType.SETTING }, - TOOL_SETTING: { - key: 'toolSetting', - title: '终端设置', + DISPLAY_SETTING: { + key: 'displaySetting', + title: '显示设置', + type: TabType.SETTING + }, + INTERACT_SETTING: { + key: 'interactSetting', + title: '交互设置', type: TabType.SETTING }, THEME_SETTING: { @@ -39,8 +49,37 @@ export const InnerTabs = { title: '主题设置', type: TabType.SETTING }, + TERMINAL_SETTING: { + key: 'terminalSetting', + title: '终端设置', + type: TabType.SETTING + }, }; +// TODO +// 显示设置 +// 显示基础设置 +// 右侧栏 + +// 交互设置 +// 右键选中词条 +// 右键粘贴 +// 启用右键菜单 +// 自动将选中内容复制到剪切板 +// 粘贴时删除空格 +// 复制时删除空格 +// 分隔符 /\()"'-.,:;<>~!@#$%^&*|+=[]{}~?│ 在终端中双击文本将使用到这些符号 +// 自动检测 url 并可以点击 +// 支持显示图片 使用 sixel 打开图片 + +// 终端设置 +// bell sound +// terminal emulation type: xterm 256color +// 回滚(ScrollBack) +// 保存在缓冲区的行数 + + + // 新建连接类型 export const NewConnectionType = { GROUP: 'group',