fix: help dialog cleanup + theme selector polish
Help dialog (F1): - Rename title 'Keyboard and Mouse Help' → 'Keyboard Help' - Remove entire 'Dialogs and Transfers' section (all keys r, a, n, x shown in footer bar) - Remove 'o', 's', 'q' entries (shown in footer as F9/o, F12/s, F10/q) - Update 't' from 'cycle theme' → 'select theme' Theme selector dialog (t): - Move navigation hint to bottom of dialog - Color 'Enter' green / 'Esc' red via renderModalHintTokens
This commit is contained in:
parent
92e72bc8c6
commit
c4707d9300
1 changed files with 16 additions and 21 deletions
|
|
@ -3089,10 +3089,9 @@ func (m *Model) openHelpModal() {
|
||||||
" Ctrl+r refresh both panes",
|
" Ctrl+r refresh both panes",
|
||||||
"",
|
"",
|
||||||
"View and Panels",
|
"View and Panels",
|
||||||
" o toggle preview/info pane",
|
|
||||||
" i show text caret in preview pane",
|
" i show text caret in preview pane",
|
||||||
" v start visual selection from caret",
|
" v start visual selection from caret",
|
||||||
" Esc / q close view/info/caret mode",
|
" Esc close view/info/caret mode",
|
||||||
" yy copy current line in caret mode",
|
" yy copy current line in caret mode",
|
||||||
" y copy visual selection to clipboard",
|
" y copy visual selection to clipboard",
|
||||||
" h / l move caret left/right",
|
" h / l move caret left/right",
|
||||||
|
|
@ -3100,23 +3099,14 @@ func (m *Model) openHelpModal() {
|
||||||
" Ctrl+t mouse selection mode in text preview pane",
|
" Ctrl+t mouse selection mode in text preview pane",
|
||||||
" Space calculate selected directory size",
|
" Space calculate selected directory size",
|
||||||
" p mirror current path to opposite pane",
|
" p mirror current path to opposite pane",
|
||||||
" s toggle SSH host list",
|
|
||||||
" g cycle sort mode",
|
" g cycle sort mode",
|
||||||
" . toggle hidden files",
|
" . toggle hidden files",
|
||||||
" t cycle theme",
|
" t select theme",
|
||||||
"",
|
|
||||||
"Dialogs and Transfers",
|
|
||||||
" x delete selected entry",
|
|
||||||
" a archive selected entry",
|
|
||||||
" r rename selected entry",
|
|
||||||
" n create new directory",
|
|
||||||
" Enter / y confirm action",
|
|
||||||
" Esc / n cancel action",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m.modal = modalState{
|
m.modal = modalState{
|
||||||
kind: modalHelp,
|
kind: modalHelp,
|
||||||
title: "Keyboard and Mouse Help",
|
title: "Keyboard Help",
|
||||||
body: strings.Join(sections, "\n"),
|
body: strings.Join(sections, "\n"),
|
||||||
note: version + " — F1/? or Esc to close",
|
note: version + " — F1/? or Esc to close",
|
||||||
}
|
}
|
||||||
|
|
@ -3906,12 +3896,6 @@ func renderThemeSelectModal(m Model, palette theme.Palette, width int) string {
|
||||||
Background(palette.Selection).
|
Background(palette.Selection).
|
||||||
Foreground(palette.Accent)
|
Foreground(palette.Accent)
|
||||||
|
|
||||||
instructions := lipgloss.NewStyle().
|
|
||||||
Width(contentWidth).
|
|
||||||
Background(palette.Panel).
|
|
||||||
Foreground(palette.Muted).
|
|
||||||
Render("↑/↓ navigate · Enter apply · Esc cancel")
|
|
||||||
|
|
||||||
box := lipgloss.NewStyle().
|
box := lipgloss.NewStyle().
|
||||||
Width(contentWidth).
|
Width(contentWidth).
|
||||||
Padding(1, 2).
|
Padding(1, 2).
|
||||||
|
|
@ -3926,8 +3910,6 @@ func renderThemeSelectModal(m Model, palette theme.Palette, width int) string {
|
||||||
lines := []string{
|
lines := []string{
|
||||||
titleStyle.Render("Select Theme"),
|
titleStyle.Render("Select Theme"),
|
||||||
spacer,
|
spacer,
|
||||||
instructions,
|
|
||||||
spacer,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, name := range themeNames {
|
for i, name := range themeNames {
|
||||||
|
|
@ -3981,6 +3963,19 @@ func renderThemeSelectModal(m Model, palette theme.Palette, width int) string {
|
||||||
lines = append(lines, row)
|
lines = append(lines, row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Instruction line at the bottom with colored Enter/Esc tokens
|
||||||
|
lines = append(lines, spacer)
|
||||||
|
hintRaw := "↑/↓ navigate · Enter apply · Esc cancel"
|
||||||
|
if highlighted, ok := renderModalHintTokens(hintRaw, contentWidth, palette, palette.Muted); ok {
|
||||||
|
lines = append(lines, highlighted)
|
||||||
|
} else {
|
||||||
|
noteStyle := lipgloss.NewStyle().
|
||||||
|
Width(contentWidth).
|
||||||
|
Background(palette.Panel).
|
||||||
|
Foreground(palette.Muted)
|
||||||
|
lines = append(lines, noteStyle.Render(hintRaw))
|
||||||
|
}
|
||||||
|
|
||||||
return box.Render(strings.Join(lines, "\n"))
|
return box.Render(strings.Join(lines, "\n"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue