🔨 命令发送.

This commit is contained in:
lijiahangmax
2024-12-16 23:20:57 +08:00
parent 1227ed1770
commit 786d07907d
13 changed files with 116 additions and 73 deletions

View File

@@ -65,7 +65,10 @@ export default defineStore('terminal', {
keys: []
} as TerminalShortcutSetting,
},
commandBarVisible: false,
layoutState: {
commandBar: false,
fullscreen: false,
},
hosts: {} as AuthorizedHostQueryResponse,
tabManager: new TerminalTabManager(),
panelManager: new TerminalPanelManager(),
@@ -125,11 +128,6 @@ export default defineStore('terminal', {
}
},
// 修改命令发送显示
setCommandBarVisible(visible: boolean) {
this.commandBarVisible = visible;
},
// 加载主机列表
async loadHosts() {
if (this.hosts.hostList?.length) {

View File

@@ -4,7 +4,7 @@ import type { TerminalTheme } from '@/api/asset/terminal';
export interface TerminalState {
preference: TerminalPreference;
commandBarVisible: boolean;
layoutState: TerminalLayoutState;
hosts: AuthorizedHostQueryResponse;
tabManager: ITerminalTabManager;
panelManager: ITerminalPanelManager;
@@ -99,3 +99,9 @@ export interface TerminalShortcutKeyEditable extends TerminalShortcutKey {
type: number;
shortcutKey?: string;
}
// 终端布局状态
export interface TerminalLayoutState {
commandBar: boolean;
fullscreen: boolean;
}