Repository navigation
Conversation
- 新增 AppSettings::tab_double_click_action(无 / 复制标签页 / 重命名 / 关闭)及通用设置项与双击事件响应 - 扩展 connection-import-protocol 支持 keybinding 记录类型,WASM 宿主通过 NAVOP_IMPORT_CAPABILITIES=keybinding 向后兼容协商能力 - 导入的 SSH 连接在密码/用户名为空时自动启用 prompt_password / prompt_username,并在首页后台主机资源探测中跳过需交互输入凭据的连接
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
本 PR 包含三项关联改进(配合插件仓 PR feigeCode/navop-extensions#19 使用,也可独立生效):
1. 可配置双击标签页动作
crates/core/src/settings.rs新增TabDoubleClickAction枚举(None/DuplicateTab/RenameTab/CloseTab)及AppSettings::tab_double_click_action(默认None,兼容旧版配置反序列化)。crates/core/src/tab_container.rs识别普通标签页双击事件(click_count() == 2),重命名输入态下自动忽略,复用现有duplicate_tab/start_rename_tab/close_tab逻辑。crates/navop_app/src/setting_tab.rs)及多语言文件(crates/navop_app/locales/main.yml)中新增「标签栏 / 双击标签页动作」配置项。2. 连接导入协议支持快捷键导入(向后兼容能力协商)
crates/connection-import-protocol新增ImportRecordKind::Keybinding与KeybindingImportRecord,并更新载荷形状校验。crates/extension-wasm/src/connection_import.rs创建 WASI 上下文时注入环境变量NAVOP_IMPORT_CAPABILITIES=keybinding,供导入器 WASM 插件按宿主能力决定是否输出keybinding记录(实现单个插件同时兼容新旧版本宿主)。crates/navop_app的导入预览与保存流程中支持展示并写入AppSettings::custom_keybindings(同时刷新快捷键与窗口)。3. 导入空密码 SSH 连接自动启用连接时提示 & 跳过无效后台探测
crates/navop_app/src/home/connection_import_draft_conversion.rs中,当迁移源未导出明文密码/用户名(留空)时,自动设置prompt_password = Some(true)/prompt_username = Some(true),避免首次连接直接拿空密码报认证失败的误导,改为连接时交互提示输入。crates/navop_app/src/home_tab/host_metrics.rs中跳过需要交互输入用户名/密码的 SSH 连接,避免首页后台资源探测对这类连接反复尝试空密码登录。测试验证
cargo test -p connection-import-protocol --lib:20/20 通过cargo test -p one-core --lib tab_double_click:全部通过cargo test -p navop_app --lib connection_import:51/51 通过(含新增空密码 SSH 导入自动设prompt_password回归测试)cargo test -p extension-wasm --lib:27/31 通过(其余 4 个依赖外部wasm-toolsCLI 的既有 fixture 测试未在本地安装工具)