Swap the Config and Log views (F6 Config, F7 Log)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+4
-4
@@ -96,7 +96,7 @@ type overlay struct {
|
||||
page string
|
||||
focus tview.Primitive
|
||||
hints string
|
||||
full bool // full-screen view (can be left with F1-F6), as opposed to a dialog
|
||||
full bool // full-screen view (can be left with F1-F7), as opposed to a dialog
|
||||
close func() // optional cleanup when the overlay is removed
|
||||
}
|
||||
|
||||
@@ -159,8 +159,8 @@ func New(cfg *config.Config) *App {
|
||||
{key: '3', name: "Library", body: library.root, onShow: library.activate, hints: libraryHints},
|
||||
{key: '4', name: "Downloads", body: downloads.root, onShow: downloads.activate, onHide: downloads.deactivate, hints: downloads.hints},
|
||||
{key: '5', name: "Calendar", body: calendar.root, onShow: calendar.activate, hints: calendarHints},
|
||||
{key: '6', name: "Log", body: a.logs.root, onShow: a.logs.onShow, hints: logHints},
|
||||
{key: '7', name: "Config", body: settings.root, onShow: settings.activate, hints: settingsHints, captureKeys: true},
|
||||
{key: '6', name: "Config", body: settings.root, onShow: settings.activate, hints: settingsHints, captureKeys: true},
|
||||
{key: '7', name: "Log", body: a.logs.root, onShow: a.logs.onShow, hints: logHints},
|
||||
}
|
||||
for i, v := range a.views {
|
||||
a.pages.AddPage(v.name, v.body, true, i == 0)
|
||||
@@ -502,7 +502,7 @@ func (a *App) handleKey(ev *tcell.EventKey) *tcell.EventKey {
|
||||
return ev
|
||||
}
|
||||
|
||||
// viewShortcut returns the view index for F1-F6, or -1.
|
||||
// viewShortcut returns the view index for F1-F7, or -1.
|
||||
func (a *App) viewShortcut(ev *tcell.EventKey) int {
|
||||
if ev.Key() >= tcell.KeyF1 && ev.Key() <= tcell.KeyF12 {
|
||||
return int(ev.Key() - tcell.KeyF1)
|
||||
|
||||
Reference in New Issue
Block a user