Small fixes from a full pass
- 'interzone rollback N' with no history ended mid-sentence. - Restore and Roll back offered enter with nothing to pick. - The typed confirmations (Uninstall, deleting a room) showed what to type as a hint, which plain mode can't tell from typed text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
124424484a
commit
f0f838f106
4 files changed
+9
-3
No files matched your search
@@ -288,7 +288,7 @@ func Rollback(args []string) error {
|
||||
return nil
|
||||
}
|
||||
if len(hist) == 0 {
|
||||
return fmt.Errorf("no deploys recorded yet; every successful install from now on is")
|
||||
return fmt.Errorf("no deploys recorded yet; each successful install from now on is recorded, and can be rolled back to")
|
||||
}
|
||||
n, err := strconv.Atoi(fs.Arg(0))
|
||||
if err != nil || n < 1 || n > len(hist) {
|
||||
|
||||
@@ -108,7 +108,7 @@ func (s *maintenanceScreen) enter(c *config.Config) tea.Cmd {
|
||||
textField("min", "Compress rooms with more state groups than", "100000", "100000", ""),
|
||||
textField("tags", "Tags", "", "install-mautrix-slack,start-group", "Comma-separated."),
|
||||
textField("vars", "Extra vars", "", "group=mautrix-slack", "key=value pairs separated by spaces, passed as --extra-vars."),
|
||||
textField("confirm", "Type "+c.Domain+" to confirm", "", c.Domain, ""),
|
||||
textField("confirm", "Type "+c.Domain+" to confirm", "", "", ""), // no hint: in plain mode it would read as typed
|
||||
)
|
||||
on := func(ids ...string) func() bool {
|
||||
return func() bool { return !slices.Contains(ids, f.value("task")) }
|
||||
|
||||
@@ -252,7 +252,7 @@ func (s *roomsScreen) update(msg tea.Msg) tea.Cmd {
|
||||
case "x": // can't be undone: the word is typed, not a key pressed twice
|
||||
if ok {
|
||||
s.err, s.info = nil, ""
|
||||
sure := textField("sure", "Type delete to confirm", "", "delete", "")
|
||||
sure := textField("sure", "Type delete to confirm", "", "", "")
|
||||
sure.required = true
|
||||
s.form, s.confirm = newForm(sure), "delete"
|
||||
}
|
||||
|
||||
@@ -288,6 +288,9 @@ func (s *historyScreen) keys() [][2]string {
|
||||
if s.confirm {
|
||||
return [][2]string{{"enter", "roll back"}, {"esc", "cancel"}}
|
||||
}
|
||||
if len(s.list) == 0 {
|
||||
return nil
|
||||
}
|
||||
return [][2]string{{"↑↓", "select"}, {"enter", "roll back to this"}}
|
||||
}
|
||||
|
||||
@@ -371,6 +374,9 @@ func (s *restoreScreen) keys() [][2]string {
|
||||
if s.confirm {
|
||||
return [][2]string{{"enter", "restore"}, {"esc", "cancel"}}
|
||||
}
|
||||
if len(s.list) == 0 {
|
||||
return [][2]string{{"d", "download the server's backups"}}
|
||||
}
|
||||
return [][2]string{{"↑↓", "select"}, {"enter", "restore this"}, {"d", "download the server's backups"}}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user