web: settings destination with connection, workspace and templates (L1)
Completes the item: the Settings view, its pure helpers and the client's socket-replacement path, plus the fix the review required (a header-side URL correction clears the Settings field's own error) and a smoke check for it.
This commit is contained in:
+10
-1
@@ -14,6 +14,15 @@
|
||||
/** The reconnect affordance, exactly as ConnectionBanner.kt names it. */
|
||||
export const RECONNECT_LABEL = "Reconnect";
|
||||
|
||||
/**
|
||||
* The one definition of the connecting line: `Connecting (attempt N)…`, shared by
|
||||
* the persistent banner and the Settings status card so the same app sentence can
|
||||
* never drift between the two.
|
||||
*/
|
||||
export function connectingLabel(attempt) {
|
||||
return `Connecting (attempt ${attempt ?? 0})\u2026`;
|
||||
}
|
||||
|
||||
/** Idle banner copy, verbatim from ConnectionBanner.kt. */
|
||||
export const IDLE_BANNER_TEXT =
|
||||
"Not connected. Enter the server URL in Settings, then connect.";
|
||||
@@ -54,7 +63,7 @@ export function bannerState(connection, { hasEndpoint = false } = {}) {
|
||||
case "connecting":
|
||||
return {
|
||||
tone: "connecting",
|
||||
text: `Connecting (attempt ${c.attempt ?? 0})\u2026`,
|
||||
text: connectingLabel(c.attempt),
|
||||
action: null,
|
||||
};
|
||||
case "disconnected": {
|
||||
|
||||
Reference in New Issue
Block a user