Files
Nexus/docs/changelog/2026-06-01-terminal-quick-commands-settings.md
T
2026-07-08 22:31:31 +08:00

39 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-06-01 终端快捷命令与布局修正
## 摘要
- 移除终端页左侧「服务器列表」抽屉,避免与全局运维侧栏菜单混淆;新建会话仍通过标签栏「新建会话」与空状态选择服务器。
- 终端页快捷命令改为只读执行;添加/编辑/删除/排序迁移至 **系统设置 → 终端快捷命令**(锚点 `#terminal-quick-commands`)。
- 命令输入区加高约 3 倍(`ShellHighlightField` large + multiline);快捷命令区字号加大;Enter 发送、Shift+Enter 换行。
- 后端:自定义命令 `sort_order` 优先于内置(内置 `sort_order` 基值 1000+);新增 `PUT /api/terminal/quick-commands/reorder`
## 动机
用户反馈终端页误将左侧改为服务器列表、未充分验证;要求在终端不可直接增删命令,统一全局菜单,并在系统设置中管理顺序(自定义排最前)。
## 涉及文件
- `frontend/src/pages/TerminalPage.vue`
- `frontend/src/pages/SettingsPage.vue`
- `frontend/src/components/TerminalQuickCommandsSettings.vue`
- `frontend/src/composables/useTerminalQuickCommands.ts`
- `frontend/src/components/ShellHighlightField.vue`
- `server/api/terminal.py`
## 迁移 / 重启
- 前端:重新 `vite build` 并部署 `web/app/`
- 后端:拉取代码后 `supervisorctl restart nexus`reorder 端点)。
## 后续(同日)
- 终端右下角「快捷键」区改为中文大按钮(中断/EOF/补全);工具栏字号/回滚/全屏中文化。
- 右键菜单加大(comfortable 密度)、靠近底部时向上弹出;命令栏右键同样显示中文菜单。
## 验证
1. 打开 `https://api.synaglobal.vip/app/#/terminal`:左侧仍为全局运维菜单,无第二列服务器列表。
2. 快捷命令仅可点击执行,无删除/添加按钮;「管理」跳转设置页锚点。
3. `https://api.synaglobal.vip/app/#/settings#terminal-quick-commands`:可添加、编辑、删除、上/下移自定义命令。
4. 终端底部输入框明显加高;Enter 发送、Shift+Enter 换行。