diff --git a/internal/ui/app.go b/internal/ui/app.go index b0d5175..344b13f 100644 --- a/internal/ui/app.go +++ b/internal/ui/app.go @@ -214,6 +214,11 @@ func (a *App) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } ds, deploying := a.cur().(*deployScreen) switch m.String() { + case "?": + if !a.cur().typing() { + a.sheetOpen = true + return a, nil + } case "ctrl+c": if deploying && ds.running { ds.abort() @@ -312,7 +317,7 @@ func (a *App) View() (out string) { if a.compact() { return a.compactView() } - a.menuOpen, a.sheetOpen = false, false + a.menuOpen = false // the compact layout's; ? opens the sheet here too header := a.header(a.w) footer := a.footer(a.w) // With the menu open, it shows the steps; the stepper line is only @@ -341,7 +346,12 @@ func (a *App) View() (out string) { inner := w - 2 - 2*padX title := sTitle.Render(a.cur().title()) contentH := max(3, bodyH-2*padY-2) - content := a.screenView(inner, contentH) + var content string + if a.sheetOpen { + title, content = sTitle.Render("Keys")+sMuted.Render(" any key closes this"), a.sheetView(inner, contentH) + } else { + content = a.screenView(inner, contentH) + } if lines := strings.Split(content, "\n"); len(lines) > contentH { content = strings.Join(lines[:contentH], "\n") // never push the header off screen } @@ -444,6 +454,9 @@ func (a *App) footer(w int) string { } else if a.step > 0 && !a.escListed() { keys = append(keys, [2]string{"esc", "back"}) } + if !a.cur().typing() { + keys = append(keys, [2]string{"?", "all keys"}) // ? types itself in a form + } keys = append(keys, [2]string{"ctrl+c", "quit"}) join := func(sep string) string { var parts []string @@ -465,6 +478,11 @@ func (a *App) footer(w int) string { keys = slices.DeleteFunc(keys, func(k [2]string) bool { return k[0] == drop }) line = join(" · ") } + // Still: the screen's last keys give way, before "? all keys". + for lipgloss.Width(line) > w && len(keys) > 2 && keys[len(keys)-1][0] == "?" { + keys = slices.Delete(keys, len(keys)-2, len(keys)-1) + line = join(" · ") + } if a.status != "" { line = " " + a.status } diff --git a/internal/ui/compact_test.go b/internal/ui/compact_test.go index 1e25123..fe832d8 100644 --- a/internal/ui/compact_test.go +++ b/internal/ui/compact_test.go @@ -173,3 +173,18 @@ func TestMenuKeys(t *testing.T) { t.Errorf("the selected tile isn't marked:\n%s", v) } } + +// ? lists every key, Manage's action shortcuts too, and any key closes it. +func TestQuestionMarkSheet(t *testing.T) { + a := demoApp(t, 120, 36) + a.jump(a.index("Manage")) + a.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune("?")}) + view := ansi.Strip(a.View()) + if !a.sheetOpen || !strings.Contains(view, "Anywhere") || !strings.Contains(view, "Vacuum the database") { + t.Fatalf("? should list the keys:\n%s", view) + } + a.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune("x")}) + if a.sheetOpen { + t.Error("a key left the sheet open") + } +} diff --git a/internal/ui/layout.go b/internal/ui/layout.go index 387cb63..b1eb37a 100644 --- a/internal/ui/layout.go +++ b/internal/ui/layout.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/charmbracelet/lipgloss" + "github.com/charmbracelet/x/ansi" zone "github.com/lrstanley/bubblezone" "interzone/internal/config" @@ -118,7 +119,7 @@ func (a *App) compactView() string { case a.menuOpen: content = a.menuScrolled(a.menuTiles(inner)+"\n"+a.menuLink("app:layout", "◫", a.layoutName(), "")+" "+a.menuLink("app:theme", "◐", themeName, ""), bodyH) case a.sheetOpen: - content = a.sheetView(inner) + content = a.sheetView(inner, bodyH) default: gap := "\n\n" if tight { @@ -297,7 +298,31 @@ func boolInt(b bool) int { // sheetView lists every key the screen takes, each a row to tap, plus the // ones that work everywhere. -func (a *App) sheetView(inner int) string { +func (a *App) sheetView(inner, h int) string { + lines, mine := a.sheetLines(inner) + // Too long for the wide layout's panel: side by side. + if cols := (len(lines) + h - 1) / max(1, h); !a.compact() && cols > 1 && inner/cols >= 30 { + lines, _ = a.sheetLines(inner/cols - 2) + per := (len(lines) + cols - 1) / cols + if cols == 2 && mine <= h && len(lines)-mine-1 <= h { + per = mine + 1 // each section its own column + } + var blocks []string + for i := 0; i < len(lines); i += per { + col := slices.Clone(lines[i:min(len(lines), i+per)]) + for j := range col { + col[j] = ansi.Truncate(col[j], inner/cols-2, "…") + } + blocks = append(blocks, lipgloss.NewStyle().Width(inner/cols).Render(strings.Join(col, "\n"))) + } + return lipgloss.JoinHorizontal(lipgloss.Top, blocks...) + } + return strings.Join(lines, "\n") +} + +// sheetLines are the sheet's rows, w wide, and how many are this screen's. +func (a *App) sheetLines(inner int) ([]string, int) { + spaced := a.compact() && !tight // a row each to tap row := func(key, desc string) []string { label := sKey.Render(fmt.Sprintf("%-8s", key)) + " " + sTitle.Render(desc) if _, ok := keyMsg(key); !ok { @@ -307,21 +332,31 @@ func (a *App) sheetView(inner int) string { } var lines []string lines = append(lines, sSection.Render("On this screen")) - for _, k := range a.cur().keys() { - if k[0] == "enter" || k[0] == "esc" { + keys := a.cur().keys() + if mk, ok := a.cur().(interface{ moreKeys() [][2]string }); ok && !a.compact() { // a phone taps them + keys = append(slices.Clone(keys), mk.moreKeys()...) + } + for _, k := range keys { + if a.compact() && (k[0] == "enter" || k[0] == "esc") { continue // on the bar } lines = append(lines, row(k[0], k[1])...) - if !tight { + if spaced { lines = append(lines, "") } } + mine := len(lines) lines = append(lines, "", sSection.Render("Anywhere")) - for _, k := range [][2]string{{"ctrl+s", "save answers"}, {"ctrl+l", "layout: " + a.layoutName()}, {"ctrl+y", "theme: " + themeName}, {"ctrl+c", "quit"}} { + anywhere := [][2]string{{"ctrl+b", "the menu"}, {"esc", "back"}, {"?", "these keys"}, {"ctrl+s", "save answers"}, + {"ctrl+l", "layout: " + a.layoutName()}, {"ctrl+y", "theme: " + themeName}, {"q", "quit, when not typing"}, {"ctrl+c", "quit"}} + if a.compact() { + anywhere = slices.DeleteFunc(anywhere, func(k [2]string) bool { return k[0] == "esc" || k[0] == "?" }) + } + for _, k := range anywhere { lines = append(lines, row(k[0], k[1])...) - if !tight { + if spaced { lines = append(lines, "") } } - return strings.Join(lines, "\n") + return lines, mine } diff --git a/internal/ui/layout_test.go b/internal/ui/layout_test.go index 11669d3..01f0c4e 100644 --- a/internal/ui/layout_test.go +++ b/internal/ui/layout_test.go @@ -91,9 +91,7 @@ func TestLayout(t *testing.T) { }}, {"sheet", func(a *App) { a.jump(a.index("Manage")) - if a.compact() { - a.sheetOpen = true - } + a.sheetOpen = true }}, {"dashboard", openDashboard}, {"mirrors", openMirrors}, diff --git a/internal/ui/screens_manage.go b/internal/ui/screens_manage.go index 0e616ee..24bcaca 100644 --- a/internal/ui/screens_manage.go +++ b/internal/ui/screens_manage.go @@ -76,7 +76,10 @@ var runsAtOnce = map[string]bool{"update": true, "check": true, "restart": true, var hotkeys = map[string]string{"update": "u", "check": "c", "restart": "r", "user": "a", "registration": "g", "users": "m", "tokens": "t", "dashboard": "d", "changes": "n", "images": "i", "backup": "b", "schedule": "s", "restore": "e", "rollback": "z", "logs": "l", "tuning": "f", "setup": "w", "migrate": "v", "servers": "o", - "services": "p", "tags": "x"} + "services": "p", "tags": "x", + // No lowercase letter left that means them: the capital of their name. + "alerts": "A", "rooms": "R", "selfupdate": "U", "disk": "D", "vacuum": "V", "pgupgrade": "P", "compress": "C", + "psql": "$", "uninstall": "X"} type manageScreen struct { cfg *config.Config @@ -126,6 +129,20 @@ func (s *manageScreen) keys() [][2]string { return [][2]string{{"↑↓", "select"}, {"enter", "run"}, {"a–z", "shortcuts"}} } +// moreKeys are the action shortcuts, for the ? sheet. +func (s *manageScreen) moreKeys() [][2]string { + if s.mode != modeList { + return nil + } + var out [][2]string + for _, a := range s.actions() { + if k := hotkeys[a.id]; k != "" && a.disabled == "" { + out = append(out, [2]string{k, a.title}) + } + } + return out +} + // inSubview reports whether esc should return to the action list rather // than leave the screen. func (s *manageScreen) inSubview() bool { return s.mode != modeList } diff --git a/internal/ui/testdata/layout/components-120x36.txt b/internal/ui/testdata/layout/components-120x36.txt index bd6ebc7..f7901dc 100644 --- a/internal/ui/testdata/layout/components-120x36.txt +++ b/internal/ui/testdata/layout/components-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ←→ category · ↑↓ move · space toggle · / search · p save as preset · enter next · esc back · ctrl+c quit \ No newline at end of file + ←→ category · ↑↓ move · space toggle · / search · p save as preset · enter next · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/dashboard-120x36.txt b/internal/ui/testdata/layout/dashboard-120x36.txt index b9eb480..3051927 100644 --- a/internal/ui/testdata/layout/dashboard-120x36.txt +++ b/internal/ui/testdata/layout/dashboard-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ ↓ 20 more lines · ↑↓ scroll │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - r refresh · ↑↓ scroll · esc back · ctrl+c quit \ No newline at end of file + r refresh · ↑↓ scroll · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/dashboard-180x50.txt b/internal/ui/testdata/layout/dashboard-180x50.txt index 1ba9454..7c81dca 100644 --- a/internal/ui/testdata/layout/dashboard-180x50.txt +++ b/internal/ui/testdata/layout/dashboard-180x50.txt @@ -47,4 +47,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ - r refresh · ↑↓ scroll · esc back · ctrl+c quit \ No newline at end of file + r refresh · ↑↓ scroll · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/homeserver-120x36.txt b/internal/ui/testdata/layout/homeserver-120x36.txt index 537702f..8b0bcbe 100644 --- a/internal/ui/testdata/layout/homeserver-120x36.txt +++ b/internal/ui/testdata/layout/homeserver-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · enter choose · s save as preset · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · enter choose · s save as preset · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/maintenance-120x36.txt b/internal/ui/testdata/layout/maintenance-120x36.txt index 7d25f8e..b0b66ec 100644 --- a/internal/ui/testdata/layout/maintenance-120x36.txt +++ b/internal/ui/testdata/layout/maintenance-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ←→ task · ↑↓ move · enter run · esc back · ctrl+c quit \ No newline at end of file + ←→ task · ↑↓ move · enter run · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/manage-120x36.txt b/internal/ui/testdata/layout/manage-120x36.txt index 3701664..049394d 100644 --- a/internal/ui/testdata/layout/manage-120x36.txt +++ b/internal/ui/testdata/layout/manage-120x36.txt @@ -13,24 +13,24 @@ │ ↺ Restore ││ ↯ Restart all services r │ │ ↶ Rollback ││ ± See what an update brings n │ │ ✎ Fine-tune ││ ▣ Check container images i │ -│ ⚒ Maintenance ││ ⚑ Alerts │ +│ ⚒ Maintenance ││ ⚑ Alerts A │ │ ⇢ Move server ││ ⏻ Start, stop or reinstall services p │ -│ ▤ Servers ││ ⇪ Update interzone │ +│ ▤ Servers ││ ⇪ Update interzone U │ │ ││ │ │ ▸ Mirrors ││ People ─────────────────────────────────────────────────────────────────────────────── │ │ ││ + Add a user a │ │ ▸ Test ││ @ Manage users m │ -│ ││ # Manage rooms │ +│ ││ # Manage rooms R │ │ ▾ Servers ││ │ │ ● example.org ││ Data ───────────────────────────────────────────────────────────────────────────────── │ │ ││ ⇩ Back up the database b │ │ ││ ◷ Scheduled backups s │ │ ││ ↺ Restore a backup e │ │ ││ ↶ Roll back z │ -│ ││ ◔ Disk space │ -│ ││ ⌫ Vacuum the database │ -│ ◫ auto (wide) ctrl+l ││ ⇡ Upgrade Postgres │ +│ ││ ◔ Disk space D │ +│ ││ ⌫ Vacuum the database V │ +│ ◫ auto (wide) ctrl+l ││ ⇡ Upgrade Postgres P │ │ ◐ interzone ctrl+y ││ ▼ more below │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · enter run · a–z shortcuts · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · enter run · a–z shortcuts · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/manage-46x40.txt b/internal/ui/testdata/layout/manage-46x40.txt index 02da6c5..506ea87 100644 --- a/internal/ui/testdata/layout/manage-46x40.txt +++ b/internal/ui/testdata/layout/manage-46x40.txt @@ -13,24 +13,24 @@ ↯ Restart all services r ± See what an update brings n ▣ Check container images i - ⚑ Alerts + ⚑ Alerts A ⏻ Start, stop or reinstall servic… p - ⇪ Update interzone + ⇪ Update interzone U People ───────────────────────────────────── + Add a user a @ Manage users m - # Manage rooms + # Manage rooms R Data ─────────────────────────────────────── ⇩ Back up the database b ◷ Scheduled backups s ↺ Restore a backup e ↶ Roll back z - ◔ Disk space - ⌫ Vacuum the database - ⇡ Upgrade Postgres - ⇲ Compress Synapse's state + ◔ Disk space D + ⌫ Vacuum the database V + ⇡ Upgrade Postgres P + ⇲ Compress Synapse's state C Look closer ──────────────────────────────── ▦ Server dashboard d diff --git a/internal/ui/testdata/layout/manage-48x20.txt b/internal/ui/testdata/layout/manage-48x20.txt index 7ee143d..f541fd7 100644 --- a/internal/ui/testdata/layout/manage-48x20.txt +++ b/internal/ui/testdata/layout/manage-48x20.txt @@ -9,12 +9,12 @@ ↯ Restart all services r ± See what an update brings n ▣ Check container images i - ⚑ Alerts + ⚑ Alerts A ⏻ Start, stop or reinstall services p - ⇪ Update interzone + ⇪ Update interzone U People ─────────────────────────────────────── + Add a user a @ Manage users m - # Manage rooms + # Manage rooms R ▼ more below ‹ back ≡ menu run › ⋯ \ No newline at end of file diff --git a/internal/ui/testdata/layout/manage-armed-120x36.txt b/internal/ui/testdata/layout/manage-armed-120x36.txt index 83f9568..8753eed 100644 --- a/internal/ui/testdata/layout/manage-armed-120x36.txt +++ b/internal/ui/testdata/layout/manage-armed-120x36.txt @@ -12,25 +12,25 @@ │ ⚑ Alerts ││ ╰────────────────────────────────────────────────────────────────────────────────────╯ │ │ ↺ Restore ││ ± See what an update brings n │ │ ↶ Rollback ││ ▣ Check container images i │ -│ ✎ Fine-tune ││ ⚑ Alerts │ +│ ✎ Fine-tune ││ ⚑ Alerts A │ │ ⚒ Maintenance ││ ⏻ Start, stop or reinstall services p │ -│ ⇢ Move server ││ ⇪ Update interzone │ +│ ⇢ Move server ││ ⇪ Update interzone U │ │ ▤ Servers ││ │ │ ││ People ─────────────────────────────────────────────────────────────────────────────── │ │ ▸ Mirrors ││ + Add a user a │ │ ││ @ Manage users m │ -│ ▸ Test ││ # Manage rooms │ +│ ▸ Test ││ # Manage rooms R │ │ ││ │ │ ▾ Servers ││ Data ───────────────────────────────────────────────────────────────────────────────── │ │ ● example.org ││ ⇩ Back up the database b │ │ ││ ◷ Scheduled backups s │ │ ││ ↺ Restore a backup e │ │ ││ ↶ Roll back z │ -│ ││ ◔ Disk space │ -│ ││ ⌫ Vacuum the database │ -│ ││ ⇡ Upgrade Postgres │ -│ ◫ auto (wide) ctrl+l ││ ⇲ Compress Synapse's state │ +│ ││ ◔ Disk space D │ +│ ││ ⌫ Vacuum the database V │ +│ ││ ⇡ Upgrade Postgres P │ +│ ◫ auto (wide) ctrl+l ││ ⇲ Compress Synapse's state C │ │ ◐ interzone ctrl+y ││ ▼ more below │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · enter run · a–z shortcuts · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · enter run · a–z shortcuts · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/manage-armed-46x40.txt b/internal/ui/testdata/layout/manage-armed-46x40.txt index 358f43f..be6ed0f 100644 --- a/internal/ui/testdata/layout/manage-armed-46x40.txt +++ b/internal/ui/testdata/layout/manage-armed-46x40.txt @@ -10,30 +10,30 @@ ╰──────────────────────────────────────────╯ ± See what an update brings n ▣ Check container images i - ⚑ Alerts + ⚑ Alerts A ⏻ Start, stop or reinstall servic… p - ⇪ Update interzone + ⇪ Update interzone U People ───────────────────────────────────── + Add a user a @ Manage users m - # Manage rooms + # Manage rooms R Data ─────────────────────────────────────── ⇩ Back up the database b ◷ Scheduled backups s ↺ Restore a backup e ↶ Roll back z - ◔ Disk space - ⌫ Vacuum the database - ⇡ Upgrade Postgres - ⇲ Compress Synapse's state + ◔ Disk space D + ⌫ Vacuum the database V + ⇡ Upgrade Postgres P + ⇲ Compress Synapse's state C Look closer ──────────────────────────────── ▦ Server dashboard d ≡ View logs l ✎ Fine-tune the roles f - $ Database shell + $ Database shell $ # Run playbook tags x ▼ more below diff --git a/internal/ui/testdata/layout/manage-armed-48x20.txt b/internal/ui/testdata/layout/manage-armed-48x20.txt index 3094cbf..36cafaf 100644 --- a/internal/ui/testdata/layout/manage-armed-48x20.txt +++ b/internal/ui/testdata/layout/manage-armed-48x20.txt @@ -9,12 +9,12 @@ ╰────────────────────────────────────────────╯ ± See what an update brings n ▣ Check container images i - ⚑ Alerts + ⚑ Alerts A ⏻ Start, stop or reinstall services p - ⇪ Update interzone + ⇪ Update interzone U People ─────────────────────────────────────── + Add a user a @ Manage users m - # Manage rooms + # Manage rooms R ▼ more below ‹ back ≡ menu run › ⋯ \ No newline at end of file diff --git a/internal/ui/testdata/layout/menu-120x36.txt b/internal/ui/testdata/layout/menu-120x36.txt index 1fe3dff..15c9774 100644 --- a/internal/ui/testdata/layout/menu-120x36.txt +++ b/internal/ui/testdata/layout/menu-120x36.txt @@ -13,24 +13,24 @@ │ ↺ Restore ││ ↯ Restart all services r │ │ ↶ Rollback ││ ± See what an update brings n │ │ ✎ Fine-tune ││ ▣ Check container images i │ -│ ⚒ Maintenance ││ ⚑ Alerts │ +│ ⚒ Maintenance ││ ⚑ Alerts A │ │ ⇢ Move server ││ ⏻ Start, stop or reinstall services p │ -│ ▤ Servers ││ ⇪ Update interzone │ +│ ▤ Servers ││ ⇪ Update interzone U │ │ ││ │ │ ▸ Mirrors ││ People ─────────────────────────────────────────────────────────────────────────────── │ │ ││ + Add a user a │ │ ▸ Test ││ @ Manage users m │ -│ ││ # Manage rooms │ +│ ││ # Manage rooms R │ │ ▾ Servers ││ │ │ ● example.org ││ Data ───────────────────────────────────────────────────────────────────────────────── │ │ ││ ⇩ Back up the database b │ │ ││ ◷ Scheduled backups s │ │ ││ ↺ Restore a backup e │ │ ││ ↶ Roll back z │ -│ ││ ◔ Disk space │ -│ ││ ⌫ Vacuum the database │ -│ ◫ auto (wide) ctrl+l ││ ⇡ Upgrade Postgres │ +│ ││ ◔ Disk space D │ +│ ││ ⌫ Vacuum the database V │ +│ ◫ auto (wide) ctrl+l ││ ⇡ Upgrade Postgres P │ │ ◐ interzone ctrl+y ││ ▼ more below │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · enter run · a–z shortcuts · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · enter run · a–z shortcuts · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/mirrors-120x36.txt b/internal/ui/testdata/layout/mirrors-120x36.txt index 13dbebb..95356ba 100644 --- a/internal/ui/testdata/layout/mirrors-120x36.txt +++ b/internal/ui/testdata/layout/mirrors-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ←→ repos · mirrors · images · r check again · ↑↓ scroll · esc back · ctrl+c quit \ No newline at end of file + ←→ repos · mirrors · images · r check again · ↑↓ scroll · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/mirrors-180x50.txt b/internal/ui/testdata/layout/mirrors-180x50.txt index f92c805..91560fb 100644 --- a/internal/ui/testdata/layout/mirrors-180x50.txt +++ b/internal/ui/testdata/layout/mirrors-180x50.txt @@ -47,4 +47,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ - ←→ repos · mirrors · images · r check again · ↑↓ scroll · esc back · ctrl+c quit \ No newline at end of file + ←→ repos · mirrors · images · r check again · ↑↓ scroll · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/presets-120x36.txt b/internal/ui/testdata/layout/presets-120x36.txt index 6b51317..e51ea44 100644 --- a/internal/ui/testdata/layout/presets-120x36.txt +++ b/internal/ui/testdata/layout/presets-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ ▼ more below │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · enter choose · s save as preset · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · enter choose · s save as preset · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/review-120x36.txt b/internal/ui/testdata/layout/review-120x36.txt index c88bcf4..79207ff 100644 --- a/internal/ui/testdata/layout/review-120x36.txt +++ b/internal/ui/testdata/layout/review-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ ▼ 42 more · ↑↓ scroll │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - enter deploy · c check again · v details · z DNS records · ↑↓ scroll · s save files only · esc back · ctrl+c quit \ No newline at end of file + enter deploy · c check again · v details · z DNS records · ↑↓ scroll · s save files only · esc back · ? all keys \ No newline at end of file diff --git a/internal/ui/testdata/layout/rooms-120x36.txt b/internal/ui/testdata/layout/rooms-120x36.txt index 7316d92..85ad531 100644 --- a/internal/ui/testdata/layout/rooms-120x36.txt +++ b/internal/ui/testdata/layout/rooms-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · b block · h delete old history · x delete room · r reload · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · b block · h delete old history · x delete room · r reload · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/sheet-120x36.txt b/internal/ui/testdata/layout/sheet-120x36.txt index 1fe3dff..36d5070 100644 --- a/internal/ui/testdata/layout/sheet-120x36.txt +++ b/internal/ui/testdata/layout/sheet-120x36.txt @@ -1,36 +1,36 @@ ◢◤ interzone matrix, deployed anywhere ONLINE ╭────────────────────────╮╭────────────────────────────────────────────────────────────────────────────────────────────╮ │ ▸ Setup ││ │ -│ ││ Manage example.org │ +│ ││ Keys any key closes this │ │ ▾ Manage example.org ││ │ -│ ▌ ⌂ Overview ││ Keep it running ────────────────────────────────────────────────────────────────────── │ -│ @ Users ││ ╭────────────────────────────────────────────────────────────────────────────────────╮ │ -│ # Rooms ││ │ ↻ Update the server u │ │ -│ ▦ Dashboard ││ │ Pull the latest playbook and roles, then re-run the install with your saved │ │ -│ ↻ Updates ││ │ answers. Also applies any changes you made in the setup. │ │ -│ ◷ Backups ││ ╰────────────────────────────────────────────────────────────────────────────────────╯ │ -│ ⚑ Alerts ││ ✓ Check services c │ -│ ↺ Restore ││ ↯ Restart all services r │ -│ ↶ Rollback ││ ± See what an update brings n │ -│ ✎ Fine-tune ││ ▣ Check container images i │ -│ ⚒ Maintenance ││ ⚑ Alerts │ -│ ⇢ Move server ││ ⏻ Start, stop or reinstall services p │ -│ ▤ Servers ││ ⇪ Update interzone │ +│ ▌ ⌂ Overview ││ On this screen P Upgrade Postgres │ +│ @ Users ││ ↑↓ select C Compress Synapse's state │ +│ # Rooms ││ enter run d Server dashboard │ +│ ▦ Dashboard ││ a–z shortcuts l View logs │ +│ ↻ Updates ││ u Update the server f Fine-tune the roles │ +│ ◷ Backups ││ c Check services $ Database shell │ +│ ⚑ Alerts ││ r Restart all services x Run playbook tags │ +│ ↺ Restore ││ n See what an update brings w Change the setup │ +│ ↶ Rollback ││ i Check container images v Move to another server │ +│ ✎ Fine-tune ││ A Alerts o Other servers │ +│ ⚒ Maintenance ││ p Start, stop or reinstall serv… X Uninstall everything │ +│ ⇢ Move server ││ U Update interzone │ +│ ▤ Servers ││ a Add a user Anywhere │ +│ ││ m Manage users ctrl+b the menu │ +│ ▸ Mirrors ││ R Manage rooms esc back │ +│ ││ b Back up the database ? these keys │ +│ ▸ Test ││ s Scheduled backups ctrl+s save answers │ +│ ││ e Restore a backup ctrl+l layout: auto (wide) │ +│ ▾ Servers ││ z Roll back ctrl+y theme: interzone │ +│ ● example.org ││ D Disk space q quit, when not typing │ +│ ││ V Vacuum the database ctrl+c quit │ │ ││ │ -│ ▸ Mirrors ││ People ─────────────────────────────────────────────────────────────────────────────── │ -│ ││ + Add a user a │ -│ ▸ Test ││ @ Manage users m │ -│ ││ # Manage rooms │ -│ ▾ Servers ││ │ -│ ● example.org ││ Data ───────────────────────────────────────────────────────────────────────────────── │ -│ ││ ⇩ Back up the database b │ -│ ││ ◷ Scheduled backups s │ -│ ││ ↺ Restore a backup e │ -│ ││ ↶ Roll back z │ -│ ││ ◔ Disk space │ -│ ││ ⌫ Vacuum the database │ -│ ◫ auto (wide) ctrl+l ││ ⇡ Upgrade Postgres │ -│ ◐ interzone ctrl+y ││ ▼ more below │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ││ │ +│ ◫ auto (wide) ctrl+l ││ │ +│ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · enter run · a–z shortcuts · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · enter run · a–z shortcuts · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/sheet-46x40.txt b/internal/ui/testdata/layout/sheet-46x40.txt index 2e3550f..d551635 100644 --- a/internal/ui/testdata/layout/sheet-46x40.txt +++ b/internal/ui/testdata/layout/sheet-46x40.txt @@ -6,12 +6,16 @@ Anywhere + ctrl+b the menu + ctrl+s save answers ctrl+l layout: auto (compact) ctrl+y theme: interzone + q quit, when not typing + ctrl+c quit @@ -29,10 +33,6 @@ - - - - diff --git a/internal/ui/testdata/layout/sheet-48x20.txt b/internal/ui/testdata/layout/sheet-48x20.txt index a81f0dd..6b61048 100644 --- a/internal/ui/testdata/layout/sheet-48x20.txt +++ b/internal/ui/testdata/layout/sheet-48x20.txt @@ -4,9 +4,11 @@ a–z shortcuts Anywhere + ctrl+b the menu ctrl+s save answers ctrl+l layout: auto (compact) ctrl+y theme: interzone + q quit, when not typing ctrl+c quit @@ -15,6 +17,4 @@ - - ✕ close \ No newline at end of file diff --git a/internal/ui/testdata/layout/tokens-120x36.txt b/internal/ui/testdata/layout/tokens-120x36.txt index d5c9187..d05bf37 100644 --- a/internal/ui/testdata/layout/tokens-120x36.txt +++ b/internal/ui/testdata/layout/tokens-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · n new · x revoke · r reload · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · n new · x revoke · r reload · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/users-120x36.txt b/internal/ui/testdata/layout/users-120x36.txt index b5a436e..776464d 100644 --- a/internal/ui/testdata/layout/users-120x36.txt +++ b/internal/ui/testdata/layout/users-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - / search · f filter · o sort · n new · p password · a admin · d deactivate · s sign out · r reload · esc back \ No newline at end of file + / search · f filter · o sort · n new · p password · a admin · d deactivate · s sign out · r reload · ? all keys \ No newline at end of file diff --git a/internal/ui/testdata/layout/users-180x50.txt b/internal/ui/testdata/layout/users-180x50.txt index 948004f..ba80c0c 100644 --- a/internal/ui/testdata/layout/users-180x50.txt +++ b/internal/ui/testdata/layout/users-180x50.txt @@ -47,4 +47,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · / search · f filter · o sort · n new · p password · a admin · d deactivate · s sign out · r reload · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · / search · f filter · o sort · n new · p password · a admin · d deactivate · s sign out · r reload · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/users-bridge-120x36.txt b/internal/ui/testdata/layout/users-bridge-120x36.txt index 6b868bf..a364d4d 100644 --- a/internal/ui/testdata/layout/users-bridge-120x36.txt +++ b/internal/ui/testdata/layout/users-bridge-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ select · enter hide · / search · f filter · o sort · n new · r reload · esc back · ctrl+c quit \ No newline at end of file + ↑↓ select · enter hide · / search · f filter · o sort · n new · r reload · esc back · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/welcome-120x36.txt b/internal/ui/testdata/layout/welcome-120x36.txt index 3ae6912..4fbd224 100644 --- a/internal/ui/testdata/layout/welcome-120x36.txt +++ b/internal/ui/testdata/layout/welcome-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - enter begin · i import a setup · s servers · m mirrors · ctrl+c quit \ No newline at end of file + enter begin · i import a setup · s servers · m mirrors · ? all keys · ctrl+c quit \ No newline at end of file diff --git a/internal/ui/testdata/layout/welcome-installed-120x36.txt b/internal/ui/testdata/layout/welcome-installed-120x36.txt index 50aae1e..0a93e66 100644 --- a/internal/ui/testdata/layout/welcome-installed-120x36.txt +++ b/internal/ui/testdata/layout/welcome-installed-120x36.txt @@ -33,4 +33,4 @@ │ ◐ interzone ctrl+y ││ │ │ ◂ fold ctrl+b menu ││ │ ╰────────────────────────╯╰────────────────────────────────────────────────────────────────────────────────────────────╯ - ↑↓ choose · enter continue · s servers · m mirrors · ctrl+c quit \ No newline at end of file + ↑↓ choose · enter continue · s servers · m mirrors · ? all keys · ctrl+c quit \ No newline at end of file