📝 修改文档.

This commit is contained in:
lijiahangmax
2024-03-22 01:46:18 +08:00
parent 1e9805c99f
commit 5d9fcf7265
31 changed files with 7236 additions and 4542 deletions

View File

@@ -1,4 +1,4 @@
VITE_API_BASE_URL= 'http://127.0.0.1:9200/orion/api'
VITE_WS_BASE_URL= 'ws://127.0.0.1:9200/orion/keep-alive'
VITE_APP_VERSION= '1.0.1'
VITE_APP_VERSION= '1.0.2'
VITE_SFTP_PREVIEW_MB= 2

View File

@@ -1,4 +1,4 @@
VITE_API_BASE_URL= '/orion/api'
VITE_WS_BASE_URL= '/orion/keep-alive'
VITE_APP_VERSION= '1.0.1'
VITE_APP_VERSION= '1.0.2'
VITE_SFTP_PREVIEW_MB= 2

View File

@@ -35,6 +35,7 @@ export default defineConfig({
},
define: {
'process.env': {},
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: JSON.stringify(true),
},
css: {
preprocessorOptions: {

View File

@@ -1,7 +1,7 @@
{
"name": "orion-ops-pro-ui",
"description": "Orion Ops Pro for Vue",
"version": "1.0.1",
"version": "1.0.2",
"private": true,
"author": "Jiahang Li",
"license": "Apache 2.0",
@@ -29,7 +29,7 @@
]
},
"dependencies": {
"@arco-design/web-vue": "^2.53.3",
"@arco-design/web-vue": "^2.55.0",
"@dangojs/a-query-header": "^0.0.31",
"@sanqi377/arco-vue-icon-picker": "^1.0.7",
"@vueuse/core": "^9.3.0",

11622
orion-ops-ui/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
import type { IDisposable, ITerminalInitOnlyOptions, ITerminalOptions, Terminal } from 'xterm';
import type { FitAddon } from 'xterm-addon-fit';
import type { SearchAddon } from 'xterm-addon-search';
import type { CanvasAddon } from 'xterm-addon-canvas';
import type { WebLinksAddon } from 'xterm-addon-web-links';
import type { WebglAddon } from 'xterm-addon-webgl';
// appender 配置
export const AppenderOptions: ITerminalOptions & ITerminalInitOnlyOptions = {
@@ -42,7 +42,7 @@ export interface LogAppenderConf {
// appender 插件
export interface LogAddons extends Record<string, IDisposable> {
fit: FitAddon;
canvas: CanvasAddon;
webgl: WebglAddon;
search: SearchAddon;
weblink: WebLinksAddon;
}

View File

@@ -11,8 +11,8 @@ import { copy as copyText } from '@/hooks/copy';
import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import { SearchAddon } from 'xterm-addon-search';
import { CanvasAddon } from 'xterm-addon-canvas';
import { WebLinksAddon } from 'xterm-addon-web-links';
import { WebglAddon } from 'xterm-addon-webgl';
// 执行日志 appender 实现
export default class LogAppender implements ILogAppender {
@@ -76,26 +76,48 @@ export default class LogAppender implements ILogAppender {
if (e.type !== 'keydown') {
return true;
}
if (e.ctrlKey && e.code === 'KeyC') {
// 复制
if (e.code === 'Enter') {
// 新起一行
e.preventDefault();
this.copy();
return false;
} else if (e.ctrlKey && e.code === 'KeyL') {
// 清空
terminal.write('\r\n');
} else if (e.code === 'ArrowUp') {
e.preventDefault();
this.clear();
return false;
if (e.ctrlKey) {
// 上移一页
terminal.scrollPages(-1);
} else {
// 上移
terminal.scrollLines(-1);
}
} else if (e.code === 'ArrowDown') {
e.preventDefault();
if (e.ctrlKey) {
// 下移一页
terminal.scrollPages(1);
} else {
// 下移
terminal.scrollLines(1);
}
} else if (e.ctrlKey && e.code === 'KeyA') {
// 全选
e.preventDefault();
this.selectAll();
return false;
} else if (e.ctrlKey && e.code === 'KeyC') {
// 复制
e.preventDefault();
this.copy();
return false;
} else if (e.ctrlKey && e.code === 'KeyF') {
// 搜索
e.preventDefault();
this.current.openSearch();
return false;
} else if (e.ctrlKey && e.code === 'KeyL') {
// 清空
e.preventDefault();
this.clear();
return false;
}
return true;
});
@@ -105,16 +127,16 @@ export default class LogAppender implements ILogAppender {
initAddons(terminal: Terminal): LogAddons {
const fit = new FitAddon();
const search = new SearchAddon();
const canvas = new CanvasAddon();
const webgl = new WebglAddon();
const weblink = new WebLinksAddon();
terminal.loadAddon(fit);
terminal.loadAddon(search);
terminal.loadAddon(canvas);
terminal.loadAddon(webgl);
terminal.loadAddon(weblink);
return {
fit,
search,
canvas,
webgl,
weblink
};
}