feat: save several servers and pick one to connect

Match the first-party mobile client's connection screen:

- the first screen lists saved servers, the one last used leading with
  its connect button or connected state, the others below, and adding
  is one tap
- servers can be added, edited (name, address, proxy, self-signed) and
  deleted; deleting the live or last one returns to the list
- a password sheet prompts only when the server asks for one, keeps the
  error and the typed password for a retry
- while connected, the instances sheet switches servers
- proxy and self-signed options stay per server (the native app's own)
- the single-server record and its token migrate automatically
- permission cards read a plain signal, fixing a flaky update
- bump version to 0.1.2 (build 3)
This commit is contained in:
blumia committed 2026-11-16 11:52:38 +08:00
1 parent ef0b63ceee
commit 13aca21d99
12 files changed
+966 -361

No files matched your search

+10
View File
@@ -169,6 +169,16 @@ func (c *controller) openNewSession() {
c.newOpen.Set(true)
}
func (c *controller) newSessionSheetNode() ui.Node {
return ui.Sheet(ui.SheetProps{
Open: c.newOpen,
Detents: ui.DetentLarge,
Grabber: true,
Content: c.newSessionSheet,
OnDismiss: func() { c.creating.Set(false) },
})
}
func (c *controller) newSessionSheet() ui.Node {
return ui.SafeArea(ui.Style{Padding: ui.All(20), Gap: 14, Grow: 1},
ui.StaticText("新建会话", ui.Style{Font: fonts.Title2.Weighted(fonts.Bold)}),