Wear Catppuccin Mocha, and move Usage to where the provider is
Two changes to the app, plus the one they turned up. **The theme.** Catppuccin Mocha, copied from dev-updater rather than shared: wg-app-link is the *link* -- the tunnel, the pinned CA, enrollment -- and a palette is not that. The two apps looking alike is a preference rather than a contract, and the moment one wants a different accent a shared version becomes a thing to fight. dev-updater's ActionTone and its ANSI table did not come across; nothing here draws a log or a destructive button yet, and copying a vocabulary with no speakers is how a file starts lying about what the app does. **Usage is no longer a global button.** It belongs to the provider, and the session view is the only place a provider is currently named, so that is where the control sits -- beside the line that names it, rather than collected with the app-wide controls where its scope had to be guessed. It carries the session back with it, so Back returns to that session rather than dumping the reader on the list. Its real home is that provider's own settings, which do not exist yet. **And the bit that only running it could find.** I first subtitled the usage screen with the session's provider, which on an echo session put "echo" directly above a card reading "claude" -- Claude's account-wide numbers labelled as echo's, a claim about echo that nothing measured. The subtitle is gone; each card names the service that answered, which is the true scope, and the reason is written where the subtitle was so it does not get re-added. Looked at on the emulator rather than read: the palette, the session header, the usage screen, and Back landing on the session it came from. ktfmt, compile and Lint clean.
This commit is contained in:
1 parent
4370c467ca
commit
31135e3f22
6 files changed
+135
-7
No files matched your search
@@ -26,7 +26,12 @@ private sealed class Screen {
|
||||
|
||||
data object Spawn : Screen()
|
||||
|
||||
data object Usage : Screen()
|
||||
/**
|
||||
* Reached from a session rather than from the list, because usage belongs to the provider
|
||||
* running that session and not to the app. It carries the session back with it so Back returns
|
||||
* where it came from -- see [Screen.Session].
|
||||
*/
|
||||
data class Usage(val from: SessionSummary) : Screen()
|
||||
|
||||
data object Models : Screen()
|
||||
|
||||
@@ -97,7 +102,6 @@ fun AppRoot(settingsVersion: Int) {
|
||||
reloadToken = reloadToken,
|
||||
onOpen = { screen = Screen.Session(it) },
|
||||
onSpawn = { screen = Screen.Spawn },
|
||||
onUsage = { screen = Screen.Usage },
|
||||
onModels = { screen = Screen.Models },
|
||||
onSetups = { screen = Screen.Setups },
|
||||
onSettings = { screen = Screen.Settings },
|
||||
@@ -107,6 +111,7 @@ fun AppRoot(settingsVersion: Int) {
|
||||
settings = current,
|
||||
summary = here.summary,
|
||||
onBack = goToList,
|
||||
onUsage = { screen = Screen.Usage(here.summary) },
|
||||
)
|
||||
is Screen.Spawn ->
|
||||
SpawnScreen(
|
||||
@@ -117,7 +122,13 @@ fun AppRoot(settingsVersion: Int) {
|
||||
},
|
||||
onBack = goToList,
|
||||
)
|
||||
is Screen.Usage -> UsageScreen(settings = current, onBack = goToList)
|
||||
is Screen.Usage ->
|
||||
UsageScreen(
|
||||
settings = current,
|
||||
// Back to the session it was opened from, not to the list: this is a step down
|
||||
// from that session, so stepping back is the one thing Back can mean here.
|
||||
onBack = { screen = Screen.Session(here.from) },
|
||||
)
|
||||
is Screen.Models -> ModelsScreen(settings = current, onBack = goToList)
|
||||
is Screen.Setups -> SetupsScreen(settings = current, onBack = goToList)
|
||||
is Screen.Settings ->
|
||||
|
||||
Reference in new issue
Block a user