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)
|
||||
|
||||
+5
-5
@@ -64,11 +64,7 @@ const helpText = `[yellow]Global[-]
|
||||
t retry a failed download (history)
|
||||
r refresh now
|
||||
|
||||
[yellow]Log (F6)[-]
|
||||
Popups fade away by themselves; everything they said is kept here.
|
||||
↑↓, PgUp/PgDn scroll G follow new entries c clear
|
||||
|
||||
[yellow]Config (F7)[-]
|
||||
[yellow]Config (F6)[-]
|
||||
Edit the settings of the config file: service addresses and API keys, add-form
|
||||
defaults, refresh interval, posters, notifications.
|
||||
↑↓ move, Tab next section, Space toggles, Enter presses a button
|
||||
@@ -76,6 +72,10 @@ const helpText = `[yellow]Global[-]
|
||||
Save writes the file and applies everything at once; Revert discards edits
|
||||
Letters such as q and ? are typed here; F9 opens this help
|
||||
|
||||
[yellow]Log (F7)[-]
|
||||
Popups fade away by themselves; everything they said is kept here.
|
||||
↑↓, PgUp/PgDn scroll G follow new entries c clear
|
||||
|
||||
[yellow]Connections[-]
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user