feat(ui): add keybinding usage tips and shortcut conflict guidance to about page

This commit is contained in:
TomZz
2026-08-28 03:37:26 +08:00
parent 7b410afea7
commit 2e279e206f
3 changed files with 98 additions and 0 deletions
+4
View File
@@ -262,6 +262,10 @@ scroll: "Scroll ↓"
clone: "Clone"
about_feedback_hint: "If you encounter a problem or have a suggestion, please report it on our GitHub project."
about_description: "A GPUI Component based SSH and local terminal client"
about_tips_title: "Shortcuts & Usage Tips:"
about_tip_backspace: "Unbinding Shortcuts: Press Backspace while recording a shortcut in Settings -> Keybindings to clear/unbind it."
about_tip_close_shortcuts: "Default Close Shortcuts: macOS uses ⌘+Q (Quit App) / ⌘+W (Close Tab); Windows/Linux uses Alt+F4 or Ctrl+Q (Quit App) / Ctrl+W (Close Tab)."
about_tip_conflict_shortcuts: "Potential Shortcut Conflicts: On Linux/Windows, default Ctrl shortcuts (e.g. Ctrl+W to close tab, Ctrl+L to focus pane) will intercept terminal Shell bindings (e.g. Ctrl+W to backward-kill-word, Ctrl+L to clear screen). Rebind to Ctrl+Shift+W or press Backspace to unbind in Settings -> Keybindings."
version: "Version"
close: "Close"
menu_about_ashell: "About Ashell"
+4
View File
@@ -262,6 +262,10 @@ scroll: "滑动查看 ↓"
clone: "克隆"
about_feedback_hint: "如果遇到问题或者有什么建议,请前往我们的 GitHub 项目中反馈。"
about_description: "基于 GPUI Component 的 SSH 与本地终端客户端"
about_tips_title: "快捷键与使用提示:"
about_tip_backspace: "快捷键解绑:在“设置 -> 快捷键”中录制按键时按 Backspace (退格键) 即可置空/解绑该快捷键。"
about_tip_close_shortcuts: "默认关闭快捷键:macOS 为 ⌘+Q (退出应用) / ⌘+W (关闭标签)Windows / Linux 为 Alt+F4 或 Ctrl+Q (退出应用) / Ctrl+W (关闭标签)。"
about_tip_conflict_shortcuts: "潜在快捷键冲突:Linux / Windows 默认修饰键为 Ctrl,应用默认快捷键(如 Ctrl+W 关闭标签、Ctrl+L 切换窗格等)会挡住终端 Shell 的原生快捷键(如 Bash/Zsh 中 Ctrl+W 清除单词、Ctrl+L 清屏)。建议在“设置 -> 快捷键”中改为 Ctrl+Shift+W 或按 Backspace 置空解绑。"
version: "版本"
close: "关闭"
menu_about_ashell: "关于 Ashell"
+90
View File
@@ -3285,6 +3285,51 @@ impl Ashell {
);
}
}),
)
.child(
v_flex()
.w_full()
.mt_2()
.p_3()
.gap_2()
.rounded_md()
.bg(cx.theme().secondary.opacity(0.4))
.border_1()
.border_color(cx.theme().border)
.child(
div()
.text_size(ui_rems(0.85))
.font_weight(FontWeight::BOLD)
.text_color(cx.theme().foreground)
.child(t!("about_tips_title")),
)
.child(
v_flex()
.gap_2()
.text_size(ui_rems(0.8))
.text_color(cx.theme().muted_foreground)
.child(
h_flex()
.gap_2()
.items_start()
.child(div().flex_none().child(""))
.child(div().flex_1().min_w(px(0.)).child(t!("about_tip_backspace"))),
)
.child(
h_flex()
.gap_2()
.items_start()
.child(div().flex_none().child(""))
.child(div().flex_1().min_w(px(0.)).child(t!("about_tip_close_shortcuts"))),
)
.child(
h_flex()
.gap_2()
.items_start()
.child(div().flex_none().child(""))
.child(div().flex_1().min_w(px(0.)).child(t!("about_tip_conflict_shortcuts"))),
),
),
),
)
})
@@ -4429,6 +4474,51 @@ impl Ashell {
let _ = open::that("https://github.com/rust-kotlin/ashell");
}),
)
.child(
v_flex()
.w_full()
.mt_3()
.p_3()
.gap_2()
.rounded_md()
.bg(cx.theme().secondary.opacity(0.4))
.border_1()
.border_color(cx.theme().border)
.child(
div()
.text_size(ui_rems(0.85))
.font_weight(FontWeight::BOLD)
.text_color(cx.theme().foreground)
.child(t!("about_tips_title")),
)
.child(
v_flex()
.gap_2()
.text_size(ui_rems(0.8))
.text_color(cx.theme().muted_foreground)
.child(
h_flex()
.gap_2()
.items_start()
.child(div().flex_none().child(""))
.child(div().flex_1().min_w(px(0.)).child(t!("about_tip_backspace"))),
)
.child(
h_flex()
.gap_2()
.items_start()
.child(div().flex_none().child(""))
.child(div().flex_1().min_w(px(0.)).child(t!("about_tip_close_shortcuts"))),
)
.child(
h_flex()
.gap_2()
.items_start()
.child(div().flex_none().child(""))
.child(div().flex_1().min_w(px(0.)).child(t!("about_tip_conflict_shortcuts"))),
),
),
)
}))
)
)