Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
A sidebar colour and picture for everyone, this computer included (#3790)
Milind Sonie67c1048bbfc
diff --git a/docs/verification/cloud-rail.md b/docs/verification/cloud-rail.mdindex 7b510d751a..5997a704f9 100644--- a/docs/verification/cloud-rail.md+++ b/docs/verification/cloud-rail.md@@ -36,25 +36,30 @@ Nothing here needs a real MausBot Cloud account, a payment or the Electron app.account for now".- The place on screen tints the top of its sidebar in its colour, faintly(`.place-tint`, stronger in dark skins, a thin line with reduced- transparency, none with forced colours); no colour, no tint. Settings →- Appearance changes it with the same six swatches: a Cloud's on the Admin+ transparency, none with forced colours); no colour, no tint. Every place+ starts plain. Settings → Appearance changes it with the same six swatches,+ the plain one named None: a Cloud's on the Admin(`PATCH /api/cloud/desktop/clouds/:id`, its owner or its team's admins; a- member sees it locked), a server connected by hand on this computer. An- Admin without that route changes nothing and says so.+ member sees it locked), This computer's and a server's connected by hand in+ this app (`environments.json`: This computer's as `localColor`, beside the+ saved places, whether or not the app is signed in). An Admin without that+ route changes nothing and says so.- The window's own rail changes the colour of every place it lists, whateverthat place's server runs (an older server's page has no such setting): aright-click on a circle, or on its row past eight, opens that place's menuwith the six swatches. The same rules decide where it is kept(`workspaces:recolor`, the rail's own page only, an id main listed); a- signed-in server not connected here is changed on the Admin. This computer- keeps today's look and has no menu.+ signed-in server not connected here is changed on the Admin. This computer's+ circle wears its colour and has the same menu.- A workspace may also have a banner picture, kept on its own server beside itsother pictures (`GET`, `PUT` and `DELETE /api/workspace/banner`; changing it- is an admin's, seeing it anyone's signed in there). The app shrinks it to- 1600 px across at most and draws it afresh as WebP or JPEG under 400 KB; the- server checks it again (kind, size, still, readable) and keeps none of its- metadata. It shows faded into the top of the sidebar, in front of the- colour's tint, which shows when there is no picture or it won't load.+ is an admin's, seeing it anyone's signed in there). On this computer that is+ its own server, and the desktop app's page is its owner. The app shrinks it+ to 1600 px across at most and draws it afresh as WebP or JPEG under 400 KB;+ the server checks it again (kind, size, still, readable) and keeps none of+ its metadata. It shows faded into the top of the sidebar, in front of the+ colour's tint, which shows when there is no picture or it won't load. A+ browser shows the picture, which is on the server, and no colour.- The person's own servers and computers that signed in with their account comein the same list (`managed: false`, on a server, with or without an address).They are never a Cloud of theirs to pair with or lend to: the rail shows them@@ -98,9 +103,18 @@ own, the plans, the name and colour of a new Cloud and its setup, the person'ssigned-in servers and the steps to connect one, the colour in Settings and ina circle's own menu for an admin and for a team member, and a banner picture(drawn by the script and kept through the fixture server's own route) in the-sidebar and in Settings, each in the Daylight and Midnight skins.-`--only rail,look-settings` limits it to some views. Without `--shots` it-prints the preview's address and waits for Ctrl-C.+sidebar and in Settings, each in the Daylight and Midnight skins. The+`computer` views are this computer's own page on a desktop with no Cloud+instead: the sidebar plain, in a colour and with a picture, the Appearance card+in Advanced and Simple mode, and its circle and menu with the rail beside it.+`--only rail,look-settings` limits it to some views and `--size 1338x870` sets+the window (1280x800 by default). Without `--shots` it prints the preview's+address and waits for Ctrl-C.++This computer's card, with no colour or picture yet+(`evidence/sidebar-look-everyone/`):++This is not production qualification: the places and the purchase are thepreview's fixtures, and no Admin, browser checkout or desktop window isdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-card-advanced-midnight.png b/docs/verification/evidence/sidebar-look-everyone/after-card-advanced-midnight.pngnew file mode 100644index 0000000000..873ba93d84Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-card-advanced-midnight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-card-simple-daylight.png b/docs/verification/evidence/sidebar-look-everyone/after-card-simple-daylight.pngnew file mode 100644index 0000000000..dc74cdff2fBinary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-card-simple-daylight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-my-cloud-simple-midnight.png b/docs/verification/evidence/sidebar-look-everyone/after-my-cloud-simple-midnight.pngnew file mode 100644index 0000000000..2c3a03a1fcBinary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-my-cloud-simple-midnight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-rail-menu-midnight.png b/docs/verification/evidence/sidebar-look-everyone/after-rail-menu-midnight.pngnew file mode 100644index 0000000000..fd65a6b808Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-rail-menu-midnight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-sidebar-colour-midnight.png b/docs/verification/evidence/sidebar-look-everyone/after-sidebar-colour-midnight.pngnew file mode 100644index 0000000000..11dadad54dBinary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-sidebar-colour-midnight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-sidebar-picture-midnight.png b/docs/verification/evidence/sidebar-look-everyone/after-sidebar-picture-midnight.pngnew file mode 100644index 0000000000..16fcf4d435Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-sidebar-picture-midnight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-sidebar-plain-daylight.png b/docs/verification/evidence/sidebar-look-everyone/after-sidebar-plain-daylight.pngnew file mode 100644index 0000000000..a70762d673Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-sidebar-plain-daylight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/after-team-member-daylight.png b/docs/verification/evidence/sidebar-look-everyone/after-team-member-daylight.pngnew file mode 100644index 0000000000..50712ac95eBinary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/after-team-member-daylight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/before-card-advanced-midnight.png b/docs/verification/evidence/sidebar-look-everyone/before-card-advanced-midnight.pngnew file mode 100644index 0000000000..c8ef4c0a37Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/before-card-advanced-midnight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/before-card-simple-daylight.png b/docs/verification/evidence/sidebar-look-everyone/before-card-simple-daylight.pngnew file mode 100644index 0000000000..2b9ba33ac5Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/before-card-simple-daylight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/before-sidebar-picture-midnight.png b/docs/verification/evidence/sidebar-look-everyone/before-sidebar-picture-midnight.pngnew file mode 100644index 0000000000..efd4732e50Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/before-sidebar-picture-midnight.png differdiff --git a/docs/verification/evidence/sidebar-look-everyone/before-sidebar-plain-daylight.png b/docs/verification/evidence/sidebar-look-everyone/before-sidebar-plain-daylight.pngnew file mode 100644index 0000000000..e9106fde84Binary files /dev/null and b/docs/verification/evidence/sidebar-look-everyone/before-sidebar-plain-daylight.png differdiff --git a/electron/cloud-rail.d.mts b/electron/cloud-rail.d.mtsindex bada2dfdc5..457c94c557 100644--- a/electron/cloud-rail.d.mts+++ b/electron/cloud-rail.d.mts@@ -28,7 +28,7 @@ export interface RailPlace {/** It runs an older release than the newest the Admin names: time to update it. */update?: { version: string; latest: string };/** Its colour is changed from the rail (a right-click on its circle): the swatch it shows, and why only its admins or a- * sign-in may change it, if so. None for this computer, and for a Cloud still being made. */+ * sign-in may change it, if so. None for a Cloud still being made. */paint?: { swatch: import("./cloud-list.mjs").CloudSwatch | null; locked?: "member" | "signed-out" };}/** +'s choices here: buying a Cloud, pasting a server's pairing link, typing its address on this computer's Settings, anddiff --git a/electron/cloud-rail.mjs b/electron/cloud-rail.mjsindex ef07de6c01..ca493c2fd5 100644--- a/electron/cloud-rail.mjs+++ b/electron/cloud-rail.mjs@@ -68,7 +68,9 @@ export function railPlaces({ saved, home = null, mine = null, state = null }) {.map(cloud => ({ id: `${SIGNED_IN}${cloud.id}`, name: cloud.name, color: swatchColor(cloud.color), kind: "server", opens: false, paint: railPaint(listedLook(cloud), swatchColor(cloud.color)),...(cloud.origin ? { pairs: true } : { ownNetwork: true }), ...serverState(cloud, connected?.latestVersion ?? null) }));const places = [...remote, ...servers, ...making];- const all = home ? places : [{ id: environments.LOCAL_ID, name: "This computer", color: null, kind: "computer", opens: true, ...(saved.activeId === environments.LOCAL_ID ? { active: true } : {}) }, ...places];+ const computer = environments.savedPlace(saved, environments.LOCAL_ID), color = computer.color ?? null;+ const all = home ? places : [{ id: computer.id, name: computer.name, color, kind: "computer", opens: true, paint: railPaint(placeLook(computer), color),+ ...(saved.activeId === environments.LOCAL_ID ? { active: true } : {}) }, ...places];return all.length < (clouds.some(ownCloud) ? 1 : RAIL_MIN_PLACES) ? [] : all;}diff --git a/electron/cloud-rail.node-test.mjs b/electron/cloud-rail.node-test.mjsindex 4e6277a25a..0a029b8eeb 100644--- a/electron/cloud-rail.node-test.mjs+++ b/electron/cloud-rail.node-test.mjs@@ -34,8 +34,13 @@ test("the rail: My Cloud, the person's Clouds and teams' Clouds in the session's], "each colour changed from the rail, but a team's by its admins alone");for (const origin of [HOME, CLIENT_A, TEAM, VPS, "/Users/person/lab"]) assert.equal(JSON.stringify(places).includes(origin), false, origin);const before = railPlaces({ saved: saved("local"), home: null, mine: HOME, state: session() });- assert.deepEqual(before[0], { id: "local", name: "This computer", color: null, kind: "computer", opens: true, active: true }, "before the move, this computer is a place too, in today's look");+ assert.deepEqual(before[0], { id: "local", name: "This computer", color: null, kind: "computer", opens: true, paint: { swatch: null }, active: true },+ "before the move, this computer is a place too: plain until a colour is picked, from its circle's menu as well");assert.equal(before.length, 5);+ const teal = railPlaces({ saved: { ...saved("local"), localColor: "teal" }, home: null, mine: HOME, state: session() })[0];+ assert.deepEqual([teal.color, teal.paint], ["teal", { swatch: "green" }], "its circle takes the colour this app keeps for it");+ assert.equal(railPlaces({ saved: { ...saved("home"), localColor: "teal" }, home: HOME, mine: HOME, state: session() }).some(place => place.kind === "computer"), false,+ "once My Cloud is home, this computer is no circle, whatever its colour");});test("a Cloud of your own is a rail even alone, for its +; otherwise one place, or none: no rail, the window as it was", () => {diff --git a/electron/environments.cjs b/electron/environments.cjsindex 70c2c03a5f..55f8e3df59 100644--- a/electron/environments.cjs+++ b/electron/environments.cjs@@ -117,7 +117,7 @@ function workspaceMenuTemplate(state, { onSwitch, onConnect, onForget, onAddClouif (homeOrigin) return homeMenuTemplate(state, { onSwitch, onForget, sublabels, iconFor, foldSublabels, homeOrigin });return [...(places ? [{ id: "workspace-places", label: places, enabled: false }, { type: "separator" }] : []),- { id: "workspace-local", label: "This computer", type: "radio", checked: !active, click: () => onSwitch(LOCAL_ID) },+ { id: "workspace-local", label: "This computer", type: "radio", checked: !active, ...(iconFor && cleanColor(state.localColor) ? { icon: iconFor(state.localColor) } : {}), click: () => onSwitch(LOCAL_ID) },...[...state.environments].sort((a, b) => listedPlace(b) - listedPlace(a)).map((entry) => {const icon = iconFor && cleanColor(entry.color) ? iconFor(entry.color) : null;const status = Object.hasOwn(sublabels, entry.id) ? sublabels[entry.id] : entry.team ? teamRoleLabel(entry.team.role) : null;@@ -341,7 +341,8 @@ function parseEnvironments(raw) {if (!dataDir || seen.has(dirKey)) continue;seen.add(id);seen.add(dirKey);- environments.push({ id, kind: "local", name: cleanName(entry.name, dirBasename(dataDir)), dataDir });+ const color = cleanColor(entry?.color);+ environments.push({ id, kind: "local", name: cleanName(entry.name, dirBasename(dataDir)), dataDir, ...(color ? { color } : {}) });continue;}const origin = normalizeOrigin(entry?.origin);@@ -354,11 +355,14 @@ function parseEnvironments(raw) {...(color ? { color } : {}), ...(entry?.home === true ? { home: true } : {}), ...(team ? { team } : {}), ...(cloud ? { cloud } : {}) });}const activeId = typeof value?.activeId === "string" && environments.some((e) => e.id === value.activeId) ? value.activeId : LOCAL_ID;- return { environments, activeId };+ const localColor = cleanColor(value?.localColor);+ return { environments, activeId, ...(localColor ? { localColor } : {}) };}+/** `localColor`: This computer's own colour, which has no entry in the list; absent for none. */function serializeEnvironments(state) {- return JSON.stringify({ version: 2, environments: state.environments, activeId: state.activeId }, null, 2) + "\n";+ const localColor = cleanColor(state.localColor);+ return JSON.stringify({ version: 2, environments: state.environments, activeId: state.activeId, ...(localColor ? { localColor } : {}) }, null, 2) + "\n";}function withEnvironment(state, input, makeId) {@@ -375,16 +379,26 @@ function withEnvironment(state, input, makeId) {return { ...state, environments };}-/** One saved place's colour as the person chose it, or none (`color` null); a colour this app doesn't draw changes- * nothing, and neither does this computer. The same state when it is that colour already. */+/** One place's colour as the person chose it, or none (`color` null): a saved place's, or This computer's (LOCAL_ID).+ * A colour this app doesn't draw changes nothing. The same state when it is that colour already. */function withPlaceColor(state, id, color) {- const existing = state.environments.find((entry) => entry.id === id);- if (!existing || existing.kind === "local" || (color !== null && !cleanColor(color)) || (cleanColor(existing.color) ?? null) === color) return state;+ const existing = savedPlace(state, id);+ if (!existing || (color !== null && !cleanColor(color)) || (cleanColor(existing.color) ?? null) === color) return state;+ if (id === LOCAL_ID) {+ const { localColor: _old, ...rest } = state;+ return color ? { ...rest, localColor: color } : rest;+ }const { color: _old, ...rest } = existing;const next = color ? { ...rest, color } : rest;return { ...state, environments: state.environments.map((entry) => (entry === existing ? next : entry)) };}+/** The place `id` names (the one on screen by default): a saved entry, or This computer as one, named and coloured. */+function savedPlace(state, id = state.activeId) {+ if (id === LOCAL_ID) return { id: LOCAL_ID, kind: "local", name: "This computer", ...(cleanColor(state.localColor) ? { color: state.localColor } : {}) };+ return state.environments.find((entry) => entry.id === id) ?? null;+}+/** The colours the Admin keeps for My Cloud (`home`) and team Clouds (`teamId`), on their saved places: once a colour* was chosen there it is the one everywhere (none for slate); before that, what this app saved stays. */function withListedColors(state, looks, homeOrigin = null) {@@ -444,7 +458,7 @@ function bootEnvironmentDir(state, defaultDir) {function withoutEnvironment(state, id) {const environments = state.environments.filter((e) => e.id !== id);- return { environments, activeId: state.activeId === id ? LOCAL_ID : state.activeId };+ return { ...state, environments, activeId: state.activeId === id ? LOCAL_ID : state.activeId };}function withMicrophone(state, id) {@@ -491,6 +505,7 @@ module.exports = {parseEnvironments,parsePairingLink,parseHostedWorkspaceLink,+ savedPlace,serializeEnvironments,startupEnvironmentDir,withActive,diff --git a/electron/main.mjs b/electron/main.mjsindex 9823b99496..b376ac7145 100644--- a/electron/main.mjs+++ b/electron/main.mjs@@ -1431,7 +1431,7 @@ ipcMain.on("desktop:unread-count", (event, value) => {applyUnreadBadge(sender);});-const { LOCAL_ID, activeEnvironment, activeRemote, allowedOrigins, bootEnvironmentDir, otherPlaces, parseHostedWorkspaceLink, startupEnvironmentDir, withActive, withEnvironment, withEnvironmentLook, withLocalEnvironment, withMicrophone, withPlaceColor, withoutEnvironment, withOwnCloud, withTeam, placesMenuOptions, workspaceMenuTemplate, workspaceNavigationAllowed, workspaceSenderAllowed, workspaceSummary, workspaceWindowTitle } = environmentsModule;+const { LOCAL_ID, activeEnvironment, activeRemote, allowedOrigins, bootEnvironmentDir, otherPlaces, parseHostedWorkspaceLink, savedPlace, startupEnvironmentDir, withActive, withEnvironment, withEnvironmentLook, withLocalEnvironment, withMicrophone, withPlaceColor, withoutEnvironment, withOwnCloud, withTeam, placesMenuOptions, workspaceMenuTemplate, workspaceNavigationAllowed, workspaceSenderAllowed, workspaceSummary, workspaceWindowTitle } = environmentsModule;let environmentsState = { environments: [], activeId: LOCAL_ID };let computerSharing;const sharingPrompts = new Set();@@ -2704,11 +2704,11 @@ const rail = installCloudRail({ ipcMain, clipboard, openCloud: openOwnCloud, accrun: choice => (choice === "link" ? addServerFromClipboard() : choice === "address" ? openWorkspaceSettings() : homeWindow.cloudOrigin() ? undefined : openCloudAdd("app_menu")) } });const announceAddedCloud = createAddedCloudNotice({ Notification, focused: () => Boolean(mainWindow && !mainWindow.isDestroyed() && mainWindow.isFocused()), sheetOpen: rail.sheetOpen,open: id => { if (!desktopTray?.show()) activateExistingWindow(appWindows()); void openOwnCloud(id); }, shown: () => cloudAccount?.addDone() });-// A place's colour (place-look.mjs): the Admin's for a Cloud, this app's for a server connected by hand; changed on the-// place's own page or from the window's rail, whatever that server runs.-installPlaceLook({ ipcMain, guard: workspaceOnly, place: () => activeEnvironment(environmentsState), session: () => ({ clouds: desktopRemoteAccess ? null : cloudAccount?.state().clouds ?? null, homeOrigin: myCloud() }),+// A place's colour (place-look.mjs): the Admin's for a Cloud, this app's for This computer and a server connected by+// hand; changed on the place's own page or from the window's rail, whatever that server runs.+installPlaceLook({ ipcMain, guard: workspaceOnly, place: () => savedPlace(environmentsState), session: () => ({ clouds: desktopRemoteAccess ? null : cloudAccount?.state().clouds ?? null, homeOrigin: myCloud() }),setColor: (id, swatch) => ensureCloudAccount().setCloudColor(id, swatch), save: (id, color) => persistEnvironments(withPlaceColor(environmentsState, id, color)),- rail: { owns: event => chromeRail.owns(event), places: railList, saved: id => environmentsState.environments.find(entry => entry.id === id && entry.kind !== "local") ?? null } });+ rail: { owns: event => chromeRail.owns(event), places: railList, saved: id => savedPlace(environmentsState, id) } });ipcMain.handle("sharing:state", localWorkspaceOnly("sharing:state", async (_event, id) => {await requireSharedComputers();return sharingController().state(savedWorkspace(id).id);diff --git a/electron/place-look.mjs b/electron/place-look.mjsindex 3a2b264900..e353ab3534 100644--- a/electron/place-look.mjs+++ b/electron/place-look.mjs@@ -1,10 +1,10 @@// The colour of the place a page shows: drawn faintly at the top of its sidebar and on its circle in the rail, and// changed from its own Settings. A Cloud's colour (My Cloud, another of the person's own, a team's) is the Admin's, so// every app of theirs follows it: its owner or its team's Super admin and Admins change it there; everyone else sees it.-// A server the person connected by hand keeps the colour this app saved for it, and so does a Cloud an older Admin-// keeps no colour for. A page learns and changes only the colour of the place it is; this computer's own page has none.-// The window's own rail changes the colour of any place it lists (a right-click on its circle), whatever that place's-// server runs: the same rules, from this app's own page.+// This computer, a server the person connected by hand, and a Cloud an older Admin keeps no colour for keep the colour+// this app saved for them. A page learns and changes only the colour of the place it is. The window's own rail changes+// the colour of any place it lists (a right-click on its circle), whatever that place's server runs: the same rules,+// from this app's own page.import environments from "./environments.cjs";import { CLOUD_SWATCH_COLORS, CLOUD_SWATCHES, swatchColor } from "./cloud-list.mjs";@@ -28,15 +28,17 @@ export function listedCloudOf(entry, { clouds = null, homeOrigin = null } = {})}/**- * A saved place's colour, and where a change of it goes: `admin` (the Admin keeps it, and this person owns that Cloud- * or is its team's Super admin or Admin), `local` (this app keeps it: a server connected by hand, or a Cloud an older- * Admin lists no colours for), or none, with why: a team member's, or another Cloud of theirs while the sign-in is- * away. Null for this computer and for no place. `cloudId` stays in main.+ * A place's colour, and where a change of it goes: `admin` (the Admin keeps it, and this person owns that Cloud or is+ * its team's Super admin or Admin), `local` (this app keeps it: This computer, a server connected by hand, or a Cloud an+ * older Admin lists no colours for), or none, with why: a team member's, or another Cloud of theirs while the sign-in+ * is away. Null for no place. `cloudId` stays in main.*/export function placeLook(entry, { clouds = null, homeOrigin = null } = {}) {- if (!entry || entry.kind === "local" || typeof entry.origin !== "string" || !entry.origin) return null;+ if (!entry) return null;const color = environments.ENTRY_COLORS.includes(entry.color) ? entry.color : null;const base = { name: entry.name, color, swatch: swatchOf(color) };+ if (entry.kind === "local") return { ...base, change: "local" };+ if (typeof entry.origin !== "string" || !entry.origin) return null;const mine = entry.home === true || (homeOrigin !== null && entry.origin === homeOrigin);if (!mine && !entry.team && !entry.cloud) return { ...base, change: "local" };const listed = listedCloudOf(entry, { clouds, homeOrigin });@@ -68,12 +70,12 @@ export function pageLook(look) {/*** The page's own place's colour (`workspaces:look`) and its change (`workspaces:color`, a swatch or null for none),- * each behind main's window guard. `place()`: the saved place on screen, which the guard made sure the asking page is;- * `session()`: the verified session's Clouds and My Cloud's address; `setColor(cloudId, swatch)`: the Admin's change- * (cloud-account.mjs setCloudColor); `save(id, color)`: this app's saved place, at once, so its circle and the top of- * its sidebar follow before the session is read again. `rail`: the window's own rail, which changes the colour of any- * place it lists with a colour to show (`workspaces:recolor`, its circle's id and a swatch): `owns(event)` its page- * asks, `places()` railPlaces' list now, `saved(id)` that saved place.+ * each behind main's window guard. `place()`: the place on screen (This computer included), which the guard made sure+ * the asking page is; `session()`: the verified session's Clouds and My Cloud's address; `setColor(cloudId, swatch)`:+ * the Admin's change (cloud-account.mjs setCloudColor); `save(id, color)`: this app's own record of that place, at+ * once, so its circle and the top of its sidebar follow before the session is read again. `rail`: the window's own+ * rail, which changes the colour of any place it lists with a colour to show (`workspaces:recolor`, its circle's id and+ * a swatch): `owns(event)` its page asks, `places()` railPlaces' list now, `saved(id)` that place (This computer's too).*/export function installPlaceLook({ ipcMain, guard, place, session, setColor, save, rail = null }) {const look = () => placeLook(place(), session());diff --git a/electron/place-look.node-test.mjs b/electron/place-look.node-test.mjsindex 004f7ed262..d15f58eb02 100644--- a/electron/place-look.node-test.mjs+++ b/electron/place-look.node-test.mjs@@ -1,5 +1,7 @@import assert from "node:assert/strict";+import { readFileSync } from "node:fs";import test from "node:test";+import vm from "node:vm";import { listedColors, parseCloudList } from "./cloud-list.mjs";import environments from "./environments.cjs";@@ -16,7 +18,7 @@ const own = { id: "a", kind: "remote", name: "Client A", origin: CLIENT_A, colorconst team = (role = "admin") => ({ id: "acme", kind: "remote", name: "Acme", origin: TEAM, team: { id: "team-acme", role } });const typed = { id: "vps", kind: "remote", name: "Office", origin: VPS };-test("who changes a place's colour, and where it is kept: the Admin for a Cloud its owner or team admin opens, this app for a server connected by hand", () => {+test("who changes a place's colour, and where it is kept: the Admin for a Cloud its owner or team admin opens, this app for This computer and a server connected by hand", () => {const session = { clouds: CLOUDS, homeOrigin: HOME };assert.deepEqual(placeLook(home, session), { name: "Studio", color: "purple", swatch: "violet", change: "admin", cloudId: "c-home" }, "My Cloud: the account's primary Cloud");assert.deepEqual(placeLook(own, session), { name: "Client A", color: "teal", swatch: "green", change: "admin", cloudId: "c-a" });@@ -31,7 +33,13 @@ test("who changes a place's colour, and where it is kept: the Admin for a Cloudassert.deepEqual(placeLook(own, { clouds: null, homeOrigin: HOME }), { name: "Client A", color: "teal", swatch: "green", change: null, reason: "signed-out" },"another Cloud of theirs while the sign-in is away: a colour saved here alone would be undone");assert.deepEqual(placeLook({ ...home, home: undefined }, session).cloudId, "c-home", "My Cloud by its address too");- for (const none of [null, undefined, { id: "local", kind: "local", name: "This computer" }, { id: "lab", kind: "local", name: "Lab", dataDir: "/x" }]) assert.equal(placeLook(none, session), null);+ for (const none of [null, undefined]) assert.equal(placeLook(none, session), null);+ for (const signedIn of [session, { clouds: null, homeOrigin: null }]) {+ assert.deepEqual(placeLook(environments.savedPlace({ activeId: "local", environments: [] }), signedIn), { name: "This computer", color: null, swatch: null, change: "local" },+ "This computer, signed in or not: plain until the person picks a colour, which this app keeps");+ }+ assert.deepEqual(placeLook({ id: "lab", kind: "local", name: "Lab", dataDir: "/x", color: "teal" }, session), { name: "Lab", color: "teal", swatch: "green", change: "local" },+ "a named folder on this computer has its own");assert.deepEqual(pageLook(placeLook(own, session)), { name: "Client A", color: "teal", swatch: "green", change: "admin" }, "the page never sees the Cloud's id");assert.deepEqual(["blue", "teal", "yellow", "red", "purple", "orange", null, "url(x)"].map(swatchOf), ["blue", "green", "amber", "rose", "violet", null, null, null]);});@@ -40,10 +48,10 @@ function ipc({ entry, clouds = CLOUDS, answer = { outcome: "saved" } } = {}) {const handlers = new Map(), asked = [], saved = [];let state = { activeId: entry?.id ?? "local", environments: entry ? [entry] : [] };installPlaceLook({ ipcMain: { handle: (channel, handler) => handlers.set(channel, handler) }, guard: handler => handler,- place: () => state.environments.find(candidate => candidate.id === state.activeId) ?? null, session: () => ({ clouds, homeOrigin: HOME }),+ place: () => environments.savedPlace(state), session: () => ({ clouds, homeOrigin: HOME }),setColor: async (id, swatch) => { asked.push([id, swatch]); return answer; },save: (id, color) => { saved.push([id, color]); state = environments.withPlaceColor(state, id, color); } });- return { asked, saved, call: (channel, ...args) => handlers.get(channel)({ sender: {} }, ...args) };+ return { asked, saved, state: () => state, call: (channel, ...args) => handlers.get(channel)({ sender: {} }, ...args) };}test("a page changes only its own place's colour: a Cloud's on the Admin first, then here at once; a member's, an older Admin's and a failure change nothing", async () => {@@ -69,12 +77,41 @@ test("a page changes only its own place's colour: a Cloud's on the Admin first,assert.deepEqual(await local.call("workspaces:color", "amber"), { outcome: "saved", look: { name: "Office", color: "yellow", swatch: "amber", change: "local" } });assert.deepEqual([local.asked, local.saved], [[], [["vps", "yellow"]]], "a server connected by hand: this app's own");- const computer = ipc({ entry: null });- assert.equal(await computer.call("workspaces:look"), null, "this computer's page has no colour");- await assert.rejects(computer.call("workspaces:color", "rose"), /no color/);+ for (const clouds of [CLOUDS, null]) {+ const computer = ipc({ entry: null, clouds });+ assert.deepEqual(await computer.call("workspaces:look"), { name: "This computer", color: null, swatch: null, change: "local" }, "this computer's page: plain until a colour is picked");+ assert.deepEqual(await computer.call("workspaces:color", "rose"), { outcome: "saved", look: { name: "This computer", color: "red", swatch: "rose", change: "local" } });+ assert.deepEqual([computer.asked, computer.saved, computer.state().localColor], [[], [["local", "red"]], "red"],+ "this computer's colour is this app's own, kept beside its saved places, whether or not it is signed in to MausBot Cloud");+ assert.deepEqual(await computer.call("workspaces:look"), { name: "This computer", color: "red", swatch: "rose", change: "local" }, "read back as chosen");+ assert.deepEqual(await computer.call("workspaces:color", "slate"), { outcome: "saved", look: { name: "This computer", color: null, swatch: null, change: "local" } }, "None: plain again");+ assert.equal(Object.hasOwn(computer.state(), "localColor"), false);+ }+});++test("main's own wiring: This computer's page reads and changes its own colour, kept with this app's saved places, no Admin asked", async () => {+ const source = readFileSync(new URL("./main.mjs", import.meta.url), "utf8").replace(/\r\n/g, "\n");+ const start = source.indexOf("installPlaceLook({ ipcMain, guard: workspaceOnly"), end = source.indexOf('ipcMain.handle("sharing:state"', start);+ assert.ok(start >= 0 && end > start, "main installs the colour's channels");+ const handlers = new Map(), persisted = [];+ const context = vm.createContext({ installPlaceLook, savedPlace: environments.savedPlace, withPlaceColor: environments.withPlaceColor,+ ipcMain: { handle: (channel, handler) => handlers.set(channel, handler) }, workspaceOnly: handler => handler,+ environmentsState: { environments: [typed], activeId: "local" }, desktopRemoteAccess: null, cloudAccount: null, myCloud: () => null,+ ensureCloudAccount: () => { throw new Error("This computer's colour never asks the Admin"); },+ persistEnvironments: next => { persisted.push(next); context.environmentsState = next; },+ chromeRail: { owns: () => false }, railList: () => [] });+ vm.runInContext(source.slice(start, end), context);+ const call = (channel, ...args) => handlers.get(channel)({ sender: {} }, ...args);+ assert.deepEqual(await call("workspaces:look"), { name: "This computer", color: null, swatch: null, change: "local" }, "plain until a colour is picked");+ assert.deepEqual((await call("workspaces:color", "amber")).look, { name: "This computer", color: "yellow", swatch: "amber", change: "local" });+ assert.deepEqual([persisted.length, context.environmentsState.localColor, context.environmentsState.environments], [1, "yellow", [typed]],+ "kept beside the saved places, signed out of MausBot Cloud");+ assert.equal(environments.parseEnvironments(environments.serializeEnvironments(context.environmentsState)).localColor, "yellow", "and in the file");+ assert.deepEqual((await call("workspaces:color", "slate")).look.color, null, "None");+ assert.equal(Object.hasOwn(context.environmentsState, "localColor"), false);});-test("the window's rail changes the colour of any place it lists, whatever its server runs: this app's for a server connected by hand, the Admin's for a Cloud and a signed-in server; never from a page, never an unlisted place", async () => {+test("the window's rail changes the colour of any place it lists, whatever its server runs: this app's for This computer and a server connected by hand, the Admin's for a Cloud and a signed-in server; never from a page, never an unlisted place", async () => {const handlers = new Map(), asked = [], saved = [], RAIL = { id: "rail" };const clouds = parseCloudList([CLOUDS[0], CLOUDS[1], cloud({ id: "c-acme", name: "Acme", teamId: "team-acme", role: "member", origin: TEAM }),cloud({ id: "s-mini", name: "Mac mini", color: null, tier: null, runsOn: "server", managed: false, status: "ready", origin: null })]);@@ -84,7 +121,7 @@ test("the window's rail changes the colour of any place it lists, whatever its splace: () => state.environments.find(candidate => candidate.id === state.activeId) ?? null, session: () => ({ clouds, homeOrigin: HOME }),setColor: async (id, swatch) => { asked.push([id, swatch]); return { outcome: "saved" }; },save: (id, color) => { saved.push([id, color]); state = environments.withPlaceColor(state, id, color); },- rail: { owns: event => event.sender === RAIL, places: listed, saved: id => state.environments.find(entry => entry.id === id && entry.kind !== "local") ?? null } });+ rail: { owns: event => event.sender === RAIL, places: listed, saved: id => environments.savedPlace(state, id) } });const recolor = (sender, ...args) => handlers.get("workspaces:recolor")({ sender }, ...args);assert.deepEqual(await recolor(RAIL, "vps", "amber"), { outcome: "saved", look: { name: "Office", color: "yellow", swatch: "amber", change: "local" } },"a server connected by hand, whatever release it runs: this app keeps it");@@ -97,26 +134,52 @@ test("the window's rail changes the colour of any place it lists, whatever its sassert.equal(asked.length, 2, "a member's choice reaches nobody");assert.throws(() => recolor({ id: "page" }, "vps", "rose"), /only available to the window's rail/, "no place's page, not even this computer's");await assert.rejects(recolor(RAIL, "somewhere", "rose"), /isn't here/);- await assert.rejects(recolor(RAIL, "local", "rose"), /isn't here/, "this computer keeps today's look");await assert.rejects(recolor(RAIL, "vps", "chartreuse"), /Choose one of the colors/);+ assert.deepEqual(listed()[0], { id: "local", name: "This computer", color: null, kind: "computer", opens: true, paint: { swatch: null } }, "This computer's circle: plain, with a menu");+ assert.deepEqual(await recolor(RAIL, "local", "violet"), { outcome: "saved", look: { name: "This computer", color: "purple", swatch: "violet", change: "local" } });+ assert.deepEqual([asked.length, saved.at(-1), state.localColor], [2, ["local", "purple"], "purple"], "This computer's from its circle: this app's own, no Admin asked");+ assert.deepEqual(listed()[0], { id: "local", name: "This computer", color: "purple", kind: "computer", opens: true, paint: { swatch: "violet" } }, "its circle follows");});test("a saved place's colour: set, cleared to none, an unknown one ignored; the Admin's for My Cloud and teams once chosen there", () => {- const state = { activeId: "home", environments: [home, own, team("member"), typed, { id: "local", kind: "local", name: "Lab", dataDir: "/x" }] };+ const state = { activeId: "home", environments: [home, own, team("member"), typed, { id: "lab", kind: "local", name: "Lab", dataDir: "/x" }] };const red = environments.withPlaceColor(state, "vps", "red");assert.equal(red.environments.find(entry => entry.id === "vps").color, "red");assert.equal(environments.withPlaceColor(red, "vps", "red"), red, "the same state when nothing changes");assert.equal(Object.hasOwn(environments.withPlaceColor(red, "vps", null).environments.find(entry => entry.id === "vps"), "color"), false);- for (const [id, color] of [["vps", "chartreuse"], ["local", "red"], ["gone", "red"]]) assert.equal(environments.withPlaceColor(state, id, color), state, `${id} ${color}`);+ for (const [id, color] of [["vps", "chartreuse"], ["local", "url(x)"], ["lab", "teal;"], ["gone", "red"]]) assert.equal(environments.withPlaceColor(state, id, color), state, `${id} ${color}`);const looks = listedColors(parseCloudList([cloud({ id: "c-home", name: "My Cloud", color: "rose", origin: HOME, primary: true }),cloud({ id: "c-acme", name: "Acme", color: "slate", teamId: "team-acme", role: "member", origin: TEAM })]));const listed = environments.withListedColors({ ...state, environments: state.environments.map(entry => (entry.id === "acme" ? { ...entry, color: "blue" } : entry)) }, looks, HOME);- assert.deepEqual(listed.environments.map(entry => [entry.id, entry.color ?? null]), [["home", "red"], ["a", "teal"], ["acme", null], ["vps", null], ["local", null]]);+ assert.deepEqual(listed.environments.map(entry => [entry.id, entry.color ?? null]), [["home", "red"], ["a", "teal"], ["acme", null], ["vps", null], ["lab", null]]);assert.equal(environments.withListedColors(state, listedColors(parseCloudList([cloud({ id: "c-home", name: "My Cloud", color: null, origin: HOME, primary: true })])), HOME), state,"none chosen on the Admin yet: the colour picked when the Cloud was set up stays");});+test("This computer's colour: none in a file written before there was one, kept beside the saved places once picked, cleared by None, and kept when a server is forgotten", () => {+ const before = environments.parseEnvironments(JSON.stringify({ version: 2, environments: [typed], activeId: "local" }));+ assert.deepEqual([environments.savedPlace(before).color, Object.hasOwn(before, "localColor")], [undefined, false], "someone updating sees no change: plain");+ const teal = environments.withPlaceColor(before, "local", "teal");+ assert.deepEqual([teal.localColor, teal.environments], ["teal", before.environments], "no saved place is made for it");+ assert.equal(environments.withPlaceColor(teal, "local", "teal"), teal, "the same state when nothing changes");+ const written = environments.serializeEnvironments(teal);+ assert.equal(JSON.parse(written).localColor, "teal");+ assert.deepEqual(environments.parseEnvironments(written), teal, "read back after a restart");+ const none = environments.withPlaceColor(teal, "local", null);+ assert.deepEqual([Object.hasOwn(none, "localColor"), Object.hasOwn(JSON.parse(environments.serializeEnvironments(none)), "localColor")], [false, false], "None: plain again, and nothing left in the file");+ assert.equal(environments.withoutEnvironment(teal, "vps").localColor, "teal", "forgetting a server keeps it");+ assert.equal(environments.parseEnvironments(JSON.stringify({ version: 2, environments: [], activeId: "local", localColor: "url(x)" })).localColor, undefined,+ "a colour this app doesn't draw is never read");++ const lab = environments.withPlaceColor({ ...teal, environments: [...teal.environments, { id: "lab", kind: "local", name: "Lab", dataDir: "/x" }] }, "lab", "purple");+ assert.deepEqual([environments.savedPlace(lab, "lab").color, lab.localColor], ["purple", "teal"], "a named folder on this computer keeps a colour of its own");+ assert.equal(environments.parseEnvironments(environments.serializeEnvironments(lab)).environments.find(entry => entry.id === "lab").color, "purple");+ const row = id => environments.workspaceMenuTemplate(lab, { onSwitch() {}, onConnect() {}, onForget() {}, iconFor: color => `dot:${color}` }).find(item => item.id === id);+ assert.deepEqual([row("workspace-local").icon, row("workspace-lab").icon], ["dot:teal", "dot:purple"], "the switcher shows each one's dot, as it does a server's");+ assert.equal("icon" in environments.workspaceMenuTemplate(before, { onSwitch() {}, onConnect() {}, onForget() {}, iconFor: color => `dot:${color}` }).find(item => item.id === "workspace-local"), false);+});+test("home places: the session's colours reach the saved places, and a team member sees the colour its admins chose", () => {let state = { activeId: "home", environments: [home, team("member")] };const places = createHomePlaces({ store: { read: () => ({}), write() {} }, environments: () => state, persist: next => { state = next; }, makeId: () => "new", homeOrigin: () => HOME });diff --git a/scripts/testing/rail-preview.tsx b/scripts/testing/rail-preview.tsxindex 2a7257776f..b742dfe813 100644--- a/scripts/testing/rail-preview.tsx+++ b/scripts/testing/rail-preview.tsx@@ -15,7 +15,8 @@ import "../../src/styles.css";// being bought; connect: a signed-in server's), ?places=many the list past eight (?more opens it), ?places=servers the// person's own servers that signed in. ?look=<colour>|none is the place's colour (its tint), ?member a team's Cloud// its member is on, ?settings=look Settings → Appearance at the place's colour, ?menu=<id> that circle's own menu (a-// right-click: its colour).+// right-click: its colour). ?place=computer is this computer's own page instead, on a desktop with no Cloud: no rail,+// or with ?rail one beside it (this computer and a server connected by hand).const params = new URLSearchParams(location.search);setAnalyticsEnabled(false);setEmailGateDone("skipped");@@ -42,19 +43,22 @@ const SERVERS: RailPlace[] = [];const MANY = [...FEW, ...["Delta", "Echo Studio", "Fable", "Gamma Ltd", "Harbor"].map((name, n) => place(`x${n}`, name, { color: (["teal", "yellow", "red", "purple", "blue"] as const)[n] }))];const member = params.has("member");+const computer = params.get("place") === "computer";+const COMPUTER: RailPlace[] = [place("local", "This computer", { kind: "computer" }), place("vps", "Office", { kind: "server" })];const SWATCH: Record<string, CloudSwatch> = { blue: "blue", teal: "green", yellow: "amber", red: "rose", purple: "violet" };const COLOR: Record<CloudSwatch, PlaceLook["color"]> = { blue: "blue", green: "teal", amber: "yellow", rose: "red", violet: "purple", slate: null };-const tint = params.get("look") ?? (member ? "purple" : "blue");+const tint = params.get("look") ?? (computer ? "none" : member ? "purple" : "blue");const color = tint === "none" ? null : (tint as PlaceLook["color"]);-const listed = params.get("places") === "many" ? MANY : params.get("places") === "servers" ? SERVERS : FEW;+const listed = computer ? (params.has("rail") ? COMPUTER : []) : params.get("places") === "many" ? MANY : params.get("places") === "servers" ? SERVERS : FEW;+const onScreen = computer ? "local" : member ? "acme" : "home";// The place on screen wears the colour its tint is drawn in.// Every place but one still being made has its colour changed from its circle; a team's member only sees it.const painted = (entry: RailPlace): RailPlace => (entry.opens || entry.server ? { ...entry, paint: { swatch: entry.color ? SWATCH[entry.color] ?? null : null,...(member && entry.id === "acme" ? { locked: "member" as const } : {}) } } : entry);-const rail: RailState = { places: listed.map(({ active: _active, ...entry }) => painted(entry.id === (member ? "acme" : "home") ? { ...entry, color, active: true as const } : entry)),- add: { cloud: true, link: true, address: false } };-let look: PlaceLook = { name: member ? "Acme team" : "My Cloud", color, swatch: color ? SWATCH[color] ?? null : null,- change: member ? null : "admin", ...(member ? { reason: "member" as const } : {}) };+const rail: RailState = { places: listed.map(({ active: _active, ...entry }) => painted(entry.id === onScreen ? { ...entry, color, active: true as const } : entry)),+ add: { cloud: true, link: true, address: computer } };+let look: PlaceLook = { name: computer ? "This computer" : member ? "Acme team" : "My Cloud", color, swatch: color ? SWATCH[color] ?? null : null,+ change: computer ? "local" : member ? null : "admin", ...(member ? { reason: "member" as const } : {}) };let openSettings: ((section?: string) => void) | null = null;const offer = { recommended: "pro", refundDays: 14, plans: [{ tier: "starter", label: "Starter", amount: 1500, allowances: { cpus: 2, cpuKind: "shared" as const, memoryMb: 2048, diskGb: 10, maxDiskGb: 20, computers: 15, computerHours: 100, voiceCharacters: 30_000, sleeps: true as const } },@@ -67,7 +71,7 @@ const addView: AddCloudView = { signedIn: true, hasCloud: true, supported: true,const ok = async () => {};Object.assign(window, { ogb: {platform: "darwin",- app: { version: "0.1.130", ownPage: false },+ app: { version: "0.1.130", ownPage: computer },getCapabilities: async () => ({ host: { platform: "darwin", label: "macOS", session: "unknown", packaged: true }, windowChrome: "mac-inset",screenPreview: { available: false, interaction: "none" }, dictation: { available: false, engine: "none", onDevice: false },localComputer: { available: false, support: "unsupported", enabled: false, status: "unavailable" } }),@@ -75,18 +79,26 @@ Object.assign(window, { ogb: {onOpenAppSettings: (callback: (section?: string) => void) => { openSettings = callback; return () => {}; },applySkin: ok, setUnreadCount: () => {}, permStatus: async () => ({}),workspaces: {- state: async () => ({ local: false, name: "My Cloud", origin: "https://omb-u-1.fly.dev", color: "blue" }),+ state: async () => (computer ? { local: true, name: "This computer" } : { local: false, name: "My Cloud", origin: "https://omb-u-1.fly.dev", color: "blue" }),menu: ok, line: async () => null, places: async () => rail, open: ok, add: ok, onChanged: () => () => {},look: async () => look,recolor: async (id: string, swatch: CloudSwatch) => {- rail.places = rail.places.map((entry) => (entry.id === id ? { ...entry, color: COLOR[swatch], paint: { swatch } } : entry));+ rail.places = rail.places.map((entry) => (entry.id === id ? { ...entry, color: COLOR[swatch], paint: { swatch: COLOR[swatch] ? swatch : null } } : entry));return { outcome: "saved", look: null };},- color: async (swatch: CloudSwatch) => { look = { ...look, swatch, color: COLOR[swatch] }; return { outcome: "saved", look }; },+ color: async (swatch: CloudSwatch) => { look = { ...look, swatch: COLOR[swatch] ? swatch : null, color: COLOR[swatch] }; return { outcome: "saved", look }; },},cloudAdd: { state: async () => addView, start: async () => ({ outcome: "opened" }), reopen: async () => true, copyLink: async () => true, open: ok, interest: ok, sheet: ok },} });+if (member) {+ // The fixture server takes this browser for its owner; a team's member is signed in without the admin scope.+ const fixtureFetch = window.fetch.bind(window);+ window.fetch = (input, init) => (new URL(input instanceof Request ? input.url : String(input), location.href).pathname === "/api/auth/session"+ ? Promise.resolve(Response.json({ kind: "session", id: "member", label: "Bob's Mac", scopes: ["client"], expiresAt: Date.now() + 3_600_000 }))+ : fixtureFetch(input, init));+}+createRoot(document.getElementById("root")!).render(<App />);// The macOS window's traffic lights, drawn where the system draws them, so the picture shows what sits beside them.@@ -108,11 +120,24 @@ const sheet = params.get("sheet");if (sheet === "connect") void click('[data-rail-place="signed-in:s-render"]');else if (sheet) void click("[data-rail-add]").then(() => (sheet === "server" ? click('[data-place-add-choice="server"]') : sheet === "add" ? undefined : click('[data-place-add-choice="cloud"]'))).then(() => (sheet === "name" ? click("[data-plan-buy='pro']") : undefined));+/** A Settings row's own button, by the row's title (Simple mode's pages name no section). */+const clickRow = (title: string) => new Promise<void>((resolve) => {+ const tick = () => {+ const row = [...document.querySelectorAll<HTMLElement>("[role='group'][aria-labelledby]")]+ .find((group) => document.getElementById(group.getAttribute("aria-labelledby") ?? "")?.textContent === title);+ const button = row?.querySelector<HTMLElement>("button");+ if (button) { button.click(); resolve(); } else setTimeout(tick, 100);+ };+ tick();+});if (params.get("settings") === "look") {const opened = () => new Promise<void>((resolve) => { const tick = () => { if (openSettings) { openSettings(); resolve(); } else setTimeout(tick, 100); }; tick(); });- void opened().then(() => click('[data-settings-section="appearance"]'))+ void opened().then(() => (params.get("mode") === "simple" ? clickRow("More looks") : click('[data-settings-section="appearance"]'))).then(() => new Promise<void>((resolve) => setTimeout(resolve, 300)))- .then(() => document.querySelector("[data-place-look]")?.closest(".rounded-xl")?.scrollIntoView({ block: "center" }));+ .then(() => {+ const shown = document.querySelector("[data-place-look], [data-place-picture]");+ (shown?.closest("[data-sidebar-look], .rounded-xl") ?? shown)?.scrollIntoView({ block: "center" });+ });}if (params.has("more")) void click("[data-rail-more-button]");const menu = params.get("menu");diff --git a/scripts/verify-cloud-rail.ts b/scripts/verify-cloud-rail.tsindex b247e296d2..ef08dd0199 100644--- a/scripts/verify-cloud-rail.ts+++ b/scripts/verify-cloud-rail.ts@@ -1,8 +1,9 @@// The rail of Clouds and its + sheet in the real app, as a Cloud's page in the desktop window shows them, against a// disposable fake-engine server; the desktop bridge's rail and add-a-Cloud answers are the preview's own fixtures.-// Run: node --experimental-strip-types scripts/verify-cloud-rail.ts [--shots <dir> [--only <view,view>]]+// Run: node --experimental-strip-types scripts/verify-cloud-rail.ts [--shots <dir> [--only <view,view>] [--size <width>x<height>]]// With --shots it photographs each view in a light and a dark skin with a headless Chrome in a throwaway profile-// (OMB_CDP_CHROME, else the installed Google Chrome) and exits; without, it prints the preview's address and waits.+// (OMB_CDP_CHROME, else the installed Google Chrome) at twice the window's size (1280x800 unless --size says) and+// exits; without, it prints the preview's address and waits.import { spawn } from "node:child_process";import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";import { tmpdir } from "node:os";@@ -16,6 +17,10 @@ const at = process.argv.indexOf("--shots");const shots = at === -1 ? null : resolve(process.argv[at + 1] ?? "");const onlyAt = process.argv.indexOf("--only");const only = onlyAt === -1 ? null : new Set((process.argv[onlyAt + 1] ?? "").split(",").filter(Boolean));+const sizeAt = process.argv.indexOf("--size");+const size = /^(\d{3,4})x(\d{3,4})$/.exec(sizeAt === -1 ? "1280x800" : process.argv[sizeAt + 1] ?? "");+if (!size) throw new Error("--size takes the window's width and height, such as 1338x870");+const [WIDTH, HEIGHT] = [Number(size[1]), Number(size[2])];const CHROME = process.env.OMB_CDP_CHROME ?? "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";/** Each view: its query, what must be on screen before the picture, and the window's height. */const VIEWS: Array<{ name: string; query: string; ready: string; height?: number; banner?: true }> = [@@ -30,13 +35,30 @@ const VIEWS: Array<{ name: string; query: string; ready: string; height?: number{ name: "rail-servers", query: "places=servers&look=teal", ready: "[data-rail-server]" },{ name: "connect-server", query: "places=servers&sheet=connect", ready: "[data-place-add='connect-server']" },{ name: "look-settings", query: "look=teal&settings=look", ready: "[data-place-look='admin']" },+ { name: "look-settings-simple", query: "look=teal&mode=simple&settings=look", ready: "[data-place-look='admin']" },{ name: "look-member", query: "member=1&settings=look", ready: "[data-place-look='locked']" },+ { name: "look-member-simple", query: "member=1&mode=simple&settings=look", ready: "[data-place-look='locked']" },{ name: "rail-colour", query: "places=servers&look=teal&menu=vps", ready: "[data-rail-menu='vps']" },{ name: "rail-colour-member", query: "member=1&menu=acme", ready: "[data-rail-menu-note]" },+ // This computer's own page on a desktop with no Cloud: plain, in a colour, its Settings, and the rail beside it.+ { name: "computer", query: "place=computer", ready: "[data-sidebar-top-row]" },+ { name: "computer-simple", query: "place=computer&mode=simple", ready: "[data-sidebar-top-row]" },+ { name: "computer-colour", query: "place=computer&look=teal", ready: "[data-place-tint]" },+ { name: "computer-colour-simple", query: "place=computer&look=teal&mode=simple", ready: "[data-place-tint]" },+ { name: "computer-settings", query: "place=computer&settings=look", ready: "[data-place-picture]" },+ { name: "computer-settings-simple", query: "place=computer&mode=simple&settings=look", ready: "[data-place-picture]" },+ { name: "computer-colour-settings", query: "place=computer&look=teal&settings=look", ready: "[data-place-look='local'] [aria-checked='true']" },+ { name: "computer-colour-settings-simple", query: "place=computer&look=teal&mode=simple&settings=look", ready: "[data-place-look='local'] [aria-checked='true']" },+ { name: "computer-rail", query: "place=computer&look=teal&rail=1", ready: "[data-rail-place='local']" },+ { name: "computer-rail-colour", query: "place=computer&look=teal&rail=1&menu=local", ready: "[data-rail-menu='local']" },// The workspace's banner picture, kept on the fixture server first (each view after it shows it).{ name: "banner", query: "", ready: "[data-place-banner] img", banner: true },{ name: "banner-simple", query: "mode=simple", ready: "[data-place-banner] img", banner: true },{ name: "banner-settings", query: "settings=look", ready: "[data-place-picture='set']", banner: true },+ { name: "computer-banner", query: "place=computer", ready: "[data-place-banner] img", banner: true },+ { name: "computer-banner-simple", query: "place=computer&mode=simple", ready: "[data-place-banner] img", banner: true },+ { name: "computer-banner-settings", query: "place=computer&settings=look", ready: "[data-place-picture='set']", banner: true },+ { name: "computer-banner-settings-simple", query: "place=computer&mode=simple&settings=look", ready: "[data-place-picture='set']", banner: true },];const SKINS = [{ id: "daylight", look: "light" }, { id: "midnight", look: "dark" }];@@ -69,8 +91,8 @@ async function openChrome(profile: string) {});const evaluate = async (expression: string) => (await send("Runtime.evaluate", { expression, returnByValue: true, awaitPromise: true })).result?.value;return {- async shoot(url: string, ready: string, file: string, height = 800) {- await send("Emulation.setDeviceMetricsOverride", { width: 1280, height, deviceScaleFactor: 2, mobile: false });+ async shoot(url: string, ready: string, file: string, height = HEIGHT) {+ await send("Emulation.setDeviceMetricsOverride", { width: WIDTH, height, deviceScaleFactor: 2, mobile: false });await send("Page.navigate", { url });const end = Date.now() + 60_000;const condition = `Boolean(document.querySelector(${JSON.stringify(ready)}) && document.querySelector("[data-sidebar-bot-row], [data-sidebar-hero]"))`;diff --git a/server/workspace-banner.e2e.test.ts b/server/workspace-banner.e2e.test.tsindex c892b206f2..f1a86e463d 100644--- a/server/workspace-banner.e2e.test.ts+++ b/server/workspace-banner.e2e.test.ts@@ -1,5 +1,6 @@// A real Team Cloud with an owner and a member: the workspace's banner picture is changed by its Super admin only,-// seen by everyone signed in to the team, and never served to anyone who isn't.+// seen by everyone signed in to the team, and never served to anyone who isn't. This computer's own server and My Cloud+// beside it: the desktop app's own page and a Cloud's owner change their own.import { randomBytes } from "node:crypto";import { readFileSync } from "node:fs";import { afterAll, beforeAll, expect, it } from "vitest";@@ -64,3 +65,45 @@ it("a picture that isn't one is refused plainly, and removing the banner leavesexpect((await banner(bob)).status).toBe(404);expect((await team.as(bob, "GET", "/api/config")).body.workspaceBanner ?? null).toBeNull();}, hostTimeout(60_000));++/** A request as the desktop app's own page sends it to this computer's server: the window's session adds the owner's+ * header, and Chromium marks the page as the server's own. */+const ownPage = (path: string, init: RequestInit = {}) => fetch(`${fx.desktopBase}${path}`, { ...init, headers: { ...init.headers as Record<string, string>,+ "x-openmausbot-desktop-owner": fx.ownerCapability, "sec-fetch-site": "same-origin", "sec-fetch-mode": "cors", "sec-fetch-dest": "empty",+ ...(init.method && init.method !== "GET" ? { origin: fx.desktopBase } : {}) } });+const pictureOf = async (send: (path: string) => Promise<Response>) => ((await (await send("/api/config")).json()) as { workspaceBanner?: unknown }).workspaceBanner ?? null;++it("this computer's own page: the person is its owner, keeps a picture on this computer's own server, and Remove clears it", async () => {+ const session = (await (await ownPage("/api/auth/session")).json()) as { kind: string; scopes: string[]; trust?: string };+ expect([session.kind, session.trust, session.scopes.includes("admin")], "the app's own page is this server's owner (useOwnerOrAdmin: true)")+ .toEqual(["loopback", undefined, true]);+ expect(await pictureOf(ownPage), "plain until the person picks one").toBeNull();++ const saved = await ownPage(BANNER, { method: "PUT", headers: { "content-type": "image/png" }, body: new Uint8Array(PNG_WITH_METADATA) });+ expect(saved.status, await saved.clone().text()).toBe(200);+ const kept = ((await saved.json()) as { banner: unknown }).banner;+ expect(await pictureOf(ownPage), "every page of this computer hears of it").toEqual(kept);+ const shown = await ownPage(BANNER);+ expect([shown.status, shown.headers.get("content-type")]).toEqual([200, "image/png"]);+ expect(Buffer.from(await shown.arrayBuffer()).includes("Secret"), "checked again by this computer's server: no camera, author or profile").toBe(false);++ const browser = await fetch(`${fx.desktopBase}${BANNER}`, { method: "DELETE", headers: { "sec-fetch-site": "same-origin", origin: fx.desktopBase } });+ expect(browser.status, "a browser on this computer is not its owner").toBe(401);+ expect(await pictureOf(ownPage)).toEqual(kept);+ expect((await ownPage(BANNER, { method: "DELETE" })).status).toBe(200);+ expect(await pictureOf(ownPage), "Remove: plain again").toBeNull();+ expect((await ownPage(BANNER)).status).toBe(404);+}, hostTimeout(60_000));++it("a solo Cloud's owner changes My Cloud's picture, and Remove clears it", async () => {+ const asOwner = (path: string, init: RequestInit = {}) => fetch(`${fx.cloudBase}${path}`, { ...init,+ headers: { ...init.headers as Record<string, string>, ...fx.edge, authorization: `Bearer ${fx.owner}` } });+ const session = (await (await asOwner("/api/auth/session")).json()) as { kind: string; scopes: string[] };+ expect([session.kind, session.scopes.includes("admin")], "the owner's own session (useOwnerOrAdmin: true)").toEqual(["session", true]);+ const saved = await asOwner(BANNER, { method: "PUT", headers: { "content-type": "image/jpeg" }, body: new Uint8Array(JPEG_WITH_METADATA) });+ expect(saved.status, await saved.clone().text()).toBe(200);+ expect(await pictureOf(asOwner)).toEqual(((await saved.json()) as { banner: unknown }).banner);+ expect(await pictureOf(ownPage), "My Cloud's picture stays on My Cloud").toBeNull();+ expect((await asOwner(BANNER, { method: "DELETE" })).status).toBe(200);+ expect(await pictureOf(asOwner)).toBeNull();+}, hostTimeout(60_000));diff --git a/src/components/PlaceLookCard.test.ts b/src/components/PlaceLookCard.test.tsindex be10698b19..2840ef0ec2 100644--- a/src/components/PlaceLookCard.test.ts+++ b/src/components/PlaceLookCard.test.ts@@ -10,15 +10,23 @@ beforeEach(() => { host = document.createElement("div"); document.body.append(hoafterEach(async () => { await act(async () => root?.unmount()); root = null; host.remove(); vi.resetModules(); });const look = (over: Partial<PlaceLook> = {}): PlaceLook => ({ name: "Client A", color: "teal", swatch: "green", change: "admin", ...over });+const COMPUTER: PlaceLook = { name: "This computer", color: null, swatch: null, change: "local" };+const COLOR: Record<string, PlaceLook["color"]> = { blue: "blue", green: "teal", amber: "yellow", rose: "red", violet: "purple", slate: null };+const saved = (from: PlaceLook) => (swatch: string | null) => ({ outcome: "saved", look: { ...from, color: COLOR[swatch ?? "slate"] ?? null, swatch: COLOR[swatch ?? "slate"] ? swatch as PlaceLook["swatch"] : null } });+const SET = { version: "v1", width: 1200, height: 300 };-/** The page's bridge, and the card and tint as a fresh page loads them (the look is shared across the page). */-async function page(start: PlaceLook | null, answer: (swatch: string | null) => { outcome: string; look: PlaceLook | null } = (swatch) => ({ outcome: "saved", look: look({ swatch: swatch as never, color: swatch === "rose" ? "red" : null }) })) {+/** The page's bridge, and the card and tint as a fresh page loads them (the look is shared across the page). `own`: this+ * computer's own page in the desktop app; `owner`: what the server says of whoever is signed in. */+async function page(start: PlaceLook | null, { answer = saved(start ?? COMPUTER), own = false, owner = true, banner = null as typeof SET | null } = {}) {vi.resetModules();- vi.doMock("@/state/store", () => ({ useStore: () => ({ state: { config: { workspaceBanner: null } } }) }));- vi.doMock("@/lib/use-owner-or-admin", () => ({ useOwnerOrAdmin: () => true }));+ vi.doMock("@/state/store", () => ({ useStore: () => ({ state: { config: { workspaceBanner: banner } } }) }));+ vi.doMock("@/lib/use-owner-or-admin", () => ({ useOwnerOrAdmin: () => owner }));+ const pictures = { upload: vi.fn(async () => ({ ok: true })), remove: vi.fn(async () => ({ ok: true })) };+ vi.doMock("@/lib/place-banner", async (original) => ({ ...(await original<typeof import("@/lib/place-banner")>()),+ prepareBanner: async (file: Blob) => ({ ok: true, blob: file }), uploadBanner: pictures.upload, removeBanner: pictures.remove }));let changed: () => void = () => {};const workspaces = { look: vi.fn(async () => start), color: vi.fn(async (swatch: string | null) => answer(swatch)), onChanged: vi.fn((callback: () => void) => { changed = callback; return () => {}; }) };- Object.assign(window, { ogb: { workspaces } });+ Object.assign(window, { ogb: { app: { version: "0.1.131", ownPage: own }, workspaces } });const { setLocale } = await import("@/lib/i18n");setLocale("en");const { PlaceLookCard } = await import("./PlaceLookCard");@@ -26,9 +34,13 @@ async function page(start: PlaceLook | null, answer: (swatch: string | null) =>root = createRoot(host);await act(async () => { root!.render(createElement("div", null, createElement(PlaceTint), createElement(PlaceLookCard))); });await act(async () => { await Promise.resolve(); });- return { workspaces, changed: () => changed() };+ return { workspaces, pictures, changed: () => changed() };}const swatch = (name: string) => host.querySelector(`[data-swatch="${name}"]`) as HTMLButtonElement;+const checked = () => [...host.querySelectorAll("[data-swatch]")].filter((button) => button.getAttribute("aria-checked") === "true").map((button) => button.getAttribute("data-swatch"));+const tint = () => host.querySelector("[data-place-tint]")?.getAttribute("style") ?? null;+const button = (words: string) => [...host.querySelectorAll("button")].find((candidate) => candidate.textContent === words) as HTMLButtonElement | undefined;+const click = async (target: HTMLElement) => { await act(async () => { target.click(); await Promise.resolve(); }); await act(async () => { await Promise.resolve(); }); };it("the tint: a place's colour in the skin's own tone; no colour, or one this app doesn't draw, leaves the sidebar as it was", async () => {const { placeTint } = await import("@/lib/place-look");@@ -39,46 +51,104 @@ it("the tint: a place's colour in the skin's own tone; no colour, or one this apexpect(host.querySelector("[data-place-tint]")).toBeNull();});+it("this computer, by default: plain, nothing chosen, in plain words with no picture yet", async () => {+ await page(COMPUTER, { own: true });+ expect([checked(), tint(), host.querySelector("[data-place-banner]")], "no colour, no tint, no picture: the sidebar as it always was").toEqual([[], null, null]);+ expect(host.querySelector("[data-place-picture]")?.getAttribute("data-place-picture")).toBe("none");+ const words = host.querySelector("[data-sidebar-look]")!.textContent!;+ for (const said of ["Sidebar color", "Tints the top of the sidebar.", "Sidebar picture", "Your own image, faded into the top of the sidebar."]) expect(words).toContain(said);+ expect(words, "no Cloud's words on this computer").not.toMatch(/This computer|place|workspace|Everyone here|admins/i);+ expect(host.querySelector("[role='radiogroup']")?.getAttribute("aria-label")).toBe("Sidebar color");+ expect([swatch("slate").getAttribute("aria-label"), swatch("slate").disabled, button("Use an image")?.disabled], "None, and both changeable here").toEqual(["None", false, false]);+ expect(host.querySelector("[data-sidebar-look]")?.getAttribute("data-settings-look"), "in the Simple look in Advanced too").toBe("simple");+});++it("this computer takes a colour and a picture, both shown at once; None and Remove make it plain again", async () => {+ const { workspaces, pictures } = await page(COMPUTER, { own: true });+ await click(swatch("green"));+ expect(workspaces.color).toHaveBeenLastCalledWith("green");+ expect(checked()).toEqual(["green"]);+ expect(tint(), "the sidebar takes it at once").toContain("var(--identity-teal)");+ await click(swatch("slate"));+ expect(workspaces.color).toHaveBeenLastCalledWith("slate");+ expect([checked(), tint()], "None: no tint, and nothing chosen, as at first").toEqual([[], null]);++ const input = host.querySelector("[data-place-picture-input]") as HTMLInputElement;+ const file = new File(["png"], "beach.png", { type: "image/png" });+ Object.defineProperty(input, "files", { value: [file], configurable: true });+ await act(async () => { input.dispatchEvent(new Event("change", { bubbles: true })); await Promise.resolve(); });+ await act(async () => { await Promise.resolve(); });+ expect(pictures.upload, "kept on this computer's own server").toHaveBeenCalledWith(file);++ await act(async () => root?.unmount());+ const kept = await page({ ...COMPUTER, color: "teal", swatch: "green" }, { own: true, banner: SET });+ expect(host.querySelector("[data-place-banner] img")?.getAttribute("src"), "the server's word on the picture: the sidebar shows it").toBe("/api/workspace/banner?v=v1");+ expect(host.querySelector("[data-place-tint]")?.hasAttribute("data-under-banner"), "the colour waits under it").toBe(true);+ expect(host.querySelector("[data-place-picture] img")?.getAttribute("alt"), "and Settings shows it").toBe("Current picture");+ await click(button("Remove")!);+ expect(kept.pictures.remove, "Remove asks this computer's server to forget it").toHaveBeenCalled();+});++it("a solo Cloud's owner changes both its colour (on the Admin) and its picture", async () => {+ const { workspaces } = await page(look({ name: "My Cloud", color: null, swatch: null }));+ expect(host.textContent).toContain("My Cloud shows in this color at the top of the sidebar and on its circle at the window's left edge.");+ expect(host.textContent).toContain("Everyone here sees it.");+ expect([swatch("rose").disabled, button("Use an image")?.disabled]).toEqual([false, false]);+ await click(swatch("rose"));+ expect(workspaces.color).toHaveBeenCalledWith("rose");+ expect(checked()).toEqual(["rose"]);+ expect(tint()).toContain("var(--identity-red)");+});+it("choosing a swatch saves it through main, and the tint follows at once", async () => {const { workspaces } = await page(look());- expect(host.querySelector("[data-place-tint]")?.getAttribute("style")).toContain("var(--identity-teal)");+ expect(tint()).toContain("var(--identity-teal)");expect(swatch("green").getAttribute("aria-checked")).toBe("true");expect(host.textContent).toContain("Client A shows in this color at the top of the sidebar and on its circle at the window's left edge.");- await act(async () => { swatch("rose").click(); await Promise.resolve(); });- await act(async () => { await Promise.resolve(); });+ await click(swatch("rose"));expect(workspaces.color).toHaveBeenCalledWith("rose");expect(swatch("rose").getAttribute("aria-checked")).toBe("true");- expect(host.querySelector("[data-place-tint]")?.getAttribute("style")).toContain("var(--identity-red)");+ expect(tint()).toContain("var(--identity-red)");await act(async () => { swatch("rose").click(); await Promise.resolve(); });expect(workspaces.color).toHaveBeenCalledTimes(1);});-it("a team member sees the team's colour and who may change it, and their click changes nothing", async () => {- const { workspaces } = await page(look({ name: "Acme", change: null, reason: "member" }));- expect([...host.querySelectorAll("[data-swatch]")].every((button) => (button as HTMLButtonElement).disabled)).toBe(true);+it("a team member sees the team's colour and picture and who may change them, and their clicks change nothing", async () => {+ const { workspaces, pictures } = await page(look({ name: "Acme", change: null, reason: "member" }), { owner: false, banner: SET });+ expect([...host.querySelectorAll("[data-swatch]")].every((candidate) => (candidate as HTMLButtonElement).disabled)).toBe(true);expect(host.querySelector('[data-place-look="locked"]')?.textContent).toContain("Only its admins can change its color.");- await act(async () => { swatch("rose").click(); await Promise.resolve(); });+ await click(swatch("rose"));expect(workspaces.color).not.toHaveBeenCalled();- expect(host.querySelector("[data-place-tint]")?.getAttribute("style"), "they still see it").toContain("var(--identity-teal)");+ expect(tint(), "they still see it").toContain("var(--identity-teal)");+ expect([button("Change image")?.disabled, button("Remove")?.disabled]).toEqual([true, true]);+ expect(host.querySelector("[data-place-picture]")?.textContent).toContain("Only its admins can change its picture.");+ await click(button("Remove")!);+ expect(pictures.remove).not.toHaveBeenCalled();+ expect(host.querySelector("[data-place-banner] img"), "they see the picture").toBeTruthy();});it("the Admin's refusal, an Admin without the route, and a failure: said plainly, and the colour stays", async () => {for (const [outcome, words] of [["refused", "Only its admins can change its color."], ["unsupported", "This Cloud's color can't be changed from the app yet."], ["failed", "The color wasn't saved. Try again."]] as const) {await act(async () => root?.unmount());- await page(look(), () => ({ outcome, look: look() }));- await act(async () => { swatch("rose").click(); await Promise.resolve(); });- await act(async () => { await Promise.resolve(); });+ await page(look(), { answer: () => ({ outcome, look: look() }) });+ await click(swatch("rose"));expect(host.textContent).toContain(words);expect(swatch("green").getAttribute("aria-checked")).toBe("true");}});-it("this computer's own page, an older app or a browser: no colour and no tint, only the workspace's picture", async () => {+it("another Cloud of the person's own while the MausBot Cloud sign-in is away: locked, and says why", async () => {+ await page(look({ change: null, reason: "signed-out" }));+ expect(host.querySelector('[data-place-look="locked"]')?.textContent).toContain("Sign in to MausBot Cloud to change its color.");+ expect(swatch("rose").disabled).toBe(true);+});++it("a browser or an older app: no colour and no tint, only the place's picture", async () => {await page(null);expect(host.querySelector("[data-swatch]")).toBeNull();expect(host.querySelector("[data-place-tint]")).toBeNull();expect(host.querySelector("[data-place-picture]")).toBeTruthy();- expect(host.textContent).toContain("Your own image, faded into the top of the sidebar.");+ expect(host.textContent).toContain("Your own image, faded into the top of the sidebar. Everyone here sees it.");await act(async () => root?.unmount());vi.resetModules();vi.doMock("@/state/store", () => ({ useStore: () => ({ state: { config: {} } }) }));@@ -90,11 +160,11 @@ it("this computer's own page, an older app or a browser: no colour and no tint,expect(host.querySelector("[data-swatch]")).toBeNull();});-it("main's word that the place changed (another window, the Admin): the card and tint read it again", async () => {+it("main's word that the place changed (another window, the Admin, the rail): the card and tint read it again", async () => {const { workspaces, changed } = await page(look());workspaces.look.mockResolvedValueOnce(look({ color: "purple", swatch: "violet" }));await act(async () => { changed(); await Promise.resolve(); });await act(async () => { await Promise.resolve(); });expect(swatch("violet").getAttribute("aria-checked")).toBe("true");- expect(host.querySelector("[data-place-tint]")?.getAttribute("style")).toContain("var(--identity-purple)");+ expect(tint()).toContain("var(--identity-purple)");});diff --git a/src/components/PlaceLookCard.tsx b/src/components/PlaceLookCard.tsxindex 43ae2aa275..fde088d74d 100644--- a/src/components/PlaceLookCard.tsx+++ b/src/components/PlaceLookCard.tsx@@ -6,41 +6,38 @@ import { choosePlaceColor, usePlaceLook } from "@/lib/place-look";import { useOwnerOrAdmin } from "@/lib/use-owner-or-admin";import { useStore } from "@/state/store";import { PlacePicture } from "./PlacePicture";-import { Card } from "./SettingsPrimitives";+import { SettingRow, SettingsRows, SIMPLE_BUTTONS } from "./SettingsPrimitives";import { SwatchRadios } from "./SwatchRadios";-/** The look of the place on screen, where it is changed: its colour, in the six swatches the rail's circles use (a- * Cloud's is the Admin's, so every app of theirs follows), and next to it a banner picture, kept on the place's own- * server for everyone there. A team member sees both and who may change them. This computer's own page has no colour,- * so there only the picture. */+/** The sidebar's look, in one card in the Simple look wherever it shows: its colour, in the six swatches the rail's+ * circles use, and its picture, kept on the place's own server for everyone there. Both start plain. This computer's+ * colour is the app's own; a Cloud's is the Admin's, so every app of theirs follows it, and a team member sees both and+ * who may change them. A browser knows no colour, only the picture. */export function PlaceLookCard() {const look = usePlaceLook();const { state } = useStore();const admin = useOwnerOrAdmin() === true;+ const computer = window.ogb?.app?.ownPage === true;const [pending, setPending] = useState<CloudSwatch | null>(null);const [outcome, setOutcome] = useState<PlaceColorOutcome | null>(null);- const picture = <PlacePicture banner={state.config?.workspaceBanner ?? null} canChange={admin} />;- if (!look) return <Card title={t("placeLook.picture")} subtitle={t("placeLook.pictureSub")}>{picture}</Card>;- const locked = look.change === null;+ const locked = look?.change === null;const choose = (swatch: CloudSwatch) => {- if (locked || pending || swatch === look.swatch) return;+ if (!look || locked || pending || swatch === look.swatch) return;setPending(swatch); setOutcome(null);void choosePlaceColor(swatch).then((answer) => { setPending(null); setOutcome(answer); });};- const note = look.reason === "member" || outcome === "refused" ? t("placeLook.member") : look.reason === "signed-out" ? t("placeLook.signedOut")+ const note = look?.reason === "member" || outcome === "refused" ? t("placeLook.member") : look?.reason === "signed-out" ? t("placeLook.signedOut"): outcome === "unsupported" ? t("placeLook.unsupported") : null;- return <Card title={t("placeLook.title")} subtitle={t("placeLook.sub", { name: look.name })}>- <div data-place-look={look.change ?? "locked"} className="flex flex-col gap-3">- <SwatchRadios value={pending ?? look.swatch} onChange={choose} label={t("placeLook.aria", { name: look.name })} disabled={locked} offset="card" />- {note && <p className="text-[13px] text-ink-secondary">{note}</p>}- {outcome === "failed" && <p role="alert" className="text-[13px] text-danger">{t("placeLook.failed")}</p>}- <div className="mt-1 flex flex-col gap-2 border-t border-hairline/50 pt-4">- <div>- <p className="text-[14px] font-medium text-ink">{t("placeLook.picture")}</p>- <p className="text-[13px] leading-relaxed text-ink-secondary">{t("placeLook.pictureSub")}</p>- </div>- {picture}- </div>- </div>- </Card>;+ return <div data-sidebar-look data-settings-look="simple" className={SIMPLE_BUTTONS}>+ <SettingsRows>+ {look && <div data-place-look={look.change ?? "locked"}>+ <SettingRow title={t("placeLook.sidebarColor")} subtitle={computer ? t("placeLook.sidebarColorSub") : t("placeLook.sub", { name: look.name })}+ message={outcome === "failed" ? <p role="alert" className="text-danger">{t("placeLook.failed")}</p> : note && <p className="text-ink-secondary">{note}</p>}>+ <SwatchRadios value={pending ?? look.swatch} onChange={choose} label={computer ? t("placeLook.sidebarColor") : t("placeLook.aria", { name: look.name })}+ disabled={locked} offset="menu" none />+ </SettingRow>+ </div>}+ <PlacePicture banner={state.config?.workspaceBanner ?? null} canChange={admin} subtitle={t(computer ? "placeLook.sidebarPictureSub" : "placeLook.pictureSub")} />+ </SettingsRows>+ </div>;}diff --git a/src/components/PlacePicture.tsx b/src/components/PlacePicture.tsxindex 8652f0eda9..bf612df984 100644--- a/src/components/PlacePicture.tsx+++ b/src/components/PlacePicture.tsx@@ -1,16 +1,16 @@import { useRef, useState } from "react";-import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";import type { LocaleKey } from "@/locales";import { BANNER_ACCEPT, bannerSrc, prepareBanner, removeBanner, uploadBanner, type BannerProblem, type BannerSummary } from "@/lib/place-banner";+import { SettingRow } from "./SettingsPrimitives";const PROBLEM: Readonly<Record<BannerProblem | "animated" | "failed", LocaleKey>> = {format: "placeLook.imageFormat", read: "placeLook.imageRead", size: "placeLook.imageSize", animated: "placeLook.imageMoving", failed: "placeLook.imageFailed",};-/** The workspace's banner picture, next to its colour: choose one (shrunk and cleaned here, checked again by the- * server), change it, or remove it. Whoever may change this workspace's settings may; everyone else sees it. */-export function PlacePicture({ banner, canChange }: { banner: BannerSummary | null; canChange: boolean }) {+/** The sidebar's picture, a row of its own: choose one (shrunk and cleaned here, checked again by the server), change+ * it, or remove it. Whoever may change this place's settings may; everyone else sees it. */+export function PlacePicture({ banner, canChange, subtitle }: { banner: BannerSummary | null; canChange: boolean; subtitle?: string }) {const input = useRef<HTMLInputElement>(null);const [busy, setBusy] = useState(false);const [problem, setProblem] = useState<LocaleKey | null>(null);@@ -29,16 +29,18 @@ export function PlacePicture({ banner, canChange }: { banner: BannerSummary | nureturn prepared.ok ? uploadBanner(prepared.blob) : prepared;});};- return <div data-place-picture={src ? "set" : "none"} className="flex flex-col gap-2">- <div className="flex flex-wrap items-center gap-2.5">- {src && <img src={src} alt={t("placeLook.currentImage")} className="h-10 w-24 rounded-md border border-ink/10 object-cover" />}- <button type="button" className="ui-button" disabled={!canChange || busy} onClick={() => input.current?.click()}>- {busy ? t("placeLook.imageSaving") : t(src ? "placeLook.changeImage" : "placeLook.useImage")}- </button>- {src && <button type="button" className={cn("ui-button")} disabled={!canChange || busy} onClick={() => void run(removeBanner)}>{t("placeLook.removeImage")}</button>}- <input ref={input} type="file" accept={BANNER_ACCEPT} hidden data-place-picture-input onChange={(event) => chosen(event.target.files?.[0])} />- </div>- {!canChange && <p className="text-[13px] text-ink-secondary">{t("placeLook.imageAdmins")}</p>}- {problem && <p role="alert" className="text-[13px] text-danger">{t(problem)}</p>}+ const message = problem ? <p role="alert" className="text-danger">{t(problem)}</p>+ : canChange ? null : <p className="text-ink-secondary">{t("placeLook.imageAdmins")}</p>;+ return <div data-place-picture={src ? "set" : "none"}>+ <SettingRow title={t("placeLook.sidebarPicture")} subtitle={subtitle} message={message}>+ <div className="flex flex-wrap items-center justify-end gap-2">+ {src && <img src={src} alt={t("placeLook.currentImage")} className="h-8 w-14 rounded-md border border-ink/10 object-cover" />}+ <button type="button" className="ui-button" disabled={!canChange || busy} onClick={() => input.current?.click()}>+ {busy ? t("placeLook.imageSaving") : t(src ? "placeLook.changeImage" : "placeLook.useImage")}+ </button>+ {src && <button type="button" className="ui-button" disabled={!canChange || busy} onClick={() => void run(removeBanner)}>{t("placeLook.removeImage")}</button>}+ <input ref={input} type="file" accept={BANNER_ACCEPT} hidden data-place-picture-input onChange={(event) => chosen(event.target.files?.[0])} />+ </div>+ </SettingRow></div>;}diff --git a/src/components/PlacesRail.test.ts b/src/components/PlacesRail.test.tsindex 121ca78f8e..4ca5b419be 100644--- a/src/components/PlacesRail.test.ts+++ b/src/components/PlacesRail.test.ts@@ -297,11 +297,11 @@ it("beside the window's own rail (main says so; the page never reads the list),expect(placeMenuItems(place, { owner: null, onCloudSettings: () => {}, besideRail: true }).map((item) => item.key), "one switcher: the rail").toEqual(["place"]);});-it("a right-click on a circle opens its place's menu: its colour, saved by main whatever its server runs; a member sees who may change it; this computer has none", async () => {+it("a right-click on a circle opens its place's menu: its colour, saved by main whatever its server runs, This computer's too; a member sees who may change it", async () => {const expand = vi.fn(async () => {});const recolor = vi.fn(async () => ({ outcome: "saved" as const, look: null }));rail = { places: [- place("local", "This computer", { kind: "computer", active: true }),+ place("local", "This computer", { kind: "computer", active: true, color: "teal", paint: { swatch: "green" } }),place("vps", "Office", { kind: "server", paint: { swatch: null } }),place("acme", "Acme", { kind: "team", color: "purple", paint: { swatch: "violet", locked: "member" } }),], add: { cloud: false, link: true, address: false } };@@ -312,8 +312,14 @@ it("a right-click on a circle opens its place's menu: its colour, saved by mainawait act(async () => { host.querySelector(`[data-rail-place="${id}"]`)!.dispatchEvent(new MouseEvent("contextmenu", { bubbles: true, cancelable: true })); });return host.querySelector(`[data-rail-menu="${id}"]`);};- expect(await menuOf("local"), "this computer keeps today's look: no menu").toBeNull();- expect(expand.mock.calls.at(-1), "nor anything covering the window").toEqual([false]);+ expect(host.querySelector('[data-rail-place="local"] span')?.getAttribute("style"), "This computer's circle wears its colour").toContain("var(--identity-teal)");+ const own = await menuOf("local");+ expect([own?.getAttribute("aria-label"), own?.querySelector("[aria-checked='true']")?.getAttribute("data-swatch")]).toEqual(["This computer", "green"]);+ expect(own!.querySelector("[data-swatch='slate']")?.getAttribute("aria-label"), "the plain swatch says what it does").toBe("None");+ await click(own!.querySelector("[data-swatch='slate']"));+ await settle();+ expect(recolor).toHaveBeenCalledWith("local", "slate");+ expect([host.querySelector("[data-rail-menu]"), expand.mock.calls.at(-1)]).toEqual([null, [false]]);const menu = await menuOf("vps");expect(menu?.getAttribute("aria-label")).toBe("Office");expect(expand.mock.calls.at(-1), "the menu covers the window while open").toEqual([true]);diff --git a/src/components/PlacesRail.tsx b/src/components/PlacesRail.tsxindex ebc9049c25..8481afc7c7 100644--- a/src/components/PlacesRail.tsx+++ b/src/components/PlacesRail.tsx@@ -135,7 +135,7 @@ function PlaceMenu({ place, top, onClose }: { place: RailPlace; top: number; onC</div><p className="px-2 pt-1 text-[12px] text-ink-secondary">{t("placeLook.title")}</p><div className="px-2 pb-1.5 pt-0.5">- <SwatchRadios value={pending ?? paint.swatch} onChange={choose} label={t("placeLook.aria", { name })} disabled={Boolean(paint.locked)} />+ <SwatchRadios value={pending ?? paint.swatch} onChange={choose} label={t("placeLook.aria", { name })} disabled={Boolean(paint.locked)} offset="menu" none /></div>{note && <p data-rail-menu-note className="px-2 pb-1 text-[12px] text-ink-secondary">{note}</p>}{outcome === "failed" && <p role="alert" className="px-2 pb-1 text-[12px] text-danger">{t("placeLook.failed")}</p>}diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsxindex 043db0ebe7..ef474bda26 100644--- a/src/components/SettingsModal.tsx+++ b/src/components/SettingsModal.tsx@@ -32,7 +32,7 @@ import { OrganizationSettings } from "./OrganizationSettings";import { CloudAccountSettings } from "./CloudAccountSettings";import { ProSettingsCard } from "./ProIntroduction";import { CloudUsageSettings } from "./CloudUsageMeter";-import { Card, SettingsGroup } from "./SettingsPrimitives";+import { Card, SettingsGroup, SIMPLE_BUTTONS } from "./SettingsPrimitives";import { shortcutLabel } from "./ShortcutHint";import { UsageSection } from "./UsageSection";import { SkillsSection } from "./SkillsSection";@@ -80,7 +80,7 @@ export const SECTIONS: Array<{keywords: string[];}> = [{ id: "general", group: "you", labelKey: "settings.section.general", icon: User, keywords: ["profile", "name", "email", "about me", "about", "suggestions", "suggested", "memory", "analytics", "updates", "product updates", "newsletter", "email updates", "effort", "new bots", "reasoning", "threads", "parallel", "concurrency", "cleanup", "retention", "event log", "event-log", "log size", "automatic recovery", "backup model", "fallback", "routines", "conversation", "schedule", "usage", "limit", "plan", "upgrade", "cloud desktop hours", "storage", ...talkShortcutKeywords()] },- { id: "appearance", group: "you", labelKey: "settings.section.appearance", icon: Palette, keywords: ["skin", "theme", "appearance", "chat width", "width", "wide", "full width", "bubble", "bubbles", "tools", "tool calls", "threads", "show threads", "hide threads", "sidebar", "density", "compact", "comfortable", "avatars", "display", "run", "this run", "run card", "commands", "notifications", "sound", "sounds", "mute", "silent", "chime", "pinned", "circles", "universal", "groups", "top", "send", "enter", "return", "shift+enter", "ctrl+enter", "cmd+enter", "⌘+enter", "new line", "keyboard", "ime", "japanese", "message color", "my messages", "toolbar", "tools layout", "footer", "routines", "triggers", "team map", "color", "cloud color", "server color", "tint"] },+ { id: "appearance", group: "you", labelKey: "settings.section.appearance", icon: Palette, keywords: ["skin", "theme", "appearance", "chat width", "width", "wide", "full width", "bubble", "bubbles", "tools", "tool calls", "threads", "show threads", "hide threads", "sidebar", "density", "compact", "comfortable", "avatars", "display", "run", "this run", "run card", "commands", "notifications", "sound", "sounds", "mute", "silent", "chime", "pinned", "circles", "universal", "groups", "top", "send", "enter", "return", "shift+enter", "ctrl+enter", "cmd+enter", "⌘+enter", "new line", "keyboard", "ime", "japanese", "message color", "my messages", "toolbar", "tools layout", "footer", "routines", "triggers", "team map", "color", "colour", "cloud color", "server color", "tint", "sidebar color", "sidebar picture", "picture", "image", "banner", "background"] },{ id: "companion", group: "you", labelKey: "settings.section.companion", icon: TabletSmartphone, keywords: ["companion", "device", "phone", "desktop", "client", "host", "pair", "pairing", "mobile", "https", "secure", "tailscale", "wifi", "remote", "advanced", "domain", "dns", "self-hosted", "server", "caddy"] },{ id: "engines", group: "ai", labelKey: "settings.section.engines", icon: Terminal, keywords: ["models", "model providers", "engines", "claude", "codex", "grok", "providers", "cli", "sign in", "subscription"] },{ id: "connections", group: "ai", labelKey: "settings.section.connections", icon: KeyRound, keywords: ["keys", "api", "api key", "api keys", "connections", "composio", "box", "xai", "mistral", "cerebras", "meta", "muse", "vps", "router", "openrouter", "base url", "openai", "anthropic", "groq", "opencode", "deepseek", "provider", "lm studio", "lmstudio", "llm studio", "llmstudio", "bionic"] },@@ -545,9 +545,7 @@ export function SettingsModal() {data-settings-scrollclassName={cn("flex min-h-0 flex-1 flex-col gap-7 overflow-y-auto px-4 pb-8 pt-4 sm:px-8 sm:pb-7 sm:pt-[22px]",- "[&_.ui-button]:h-8 [&_.ui-button]:rounded-full [&_.ui-button]:border-0 [&_.ui-button]:px-3 [&_.ui-button]:text-[14px] [&_.ui-button]:font-normal",- "[&_.ui-button:not(.ui-button-primary)]:bg-ink/5 [&_.ui-button:not(.ui-button-primary)]:text-ink [&_.ui-button:not(.ui-button-primary):enabled:hover]:bg-ink/10",- "[&_.ui-button-primary]:bg-ink [&_.ui-button-primary]:text-app [&_.ui-button-primary:enabled:hover]:bg-ink/85",+ SIMPLE_BUTTONS,"[&_.uppercase]:normal-case [&_.uppercase]:tracking-normal",)}>diff --git a/src/components/SettingsPrimitives.tsx b/src/components/SettingsPrimitives.tsxindex 317eb23671..da1f3ad42c 100644--- a/src/components/SettingsPrimitives.tsx+++ b/src/components/SettingsPrimitives.tsx@@ -5,6 +5,11 @@ import { useCopyFeedback } from "@/lib/copy-text";import { t } from "@/lib/i18n";export const SIMPLE_CARD = "rounded-[12px] border-[0.5px] border-(--settings-edge) bg-menu py-2";+export const SIMPLE_BUTTONS = cn(+ "[&_.ui-button]:h-8 [&_.ui-button]:rounded-full [&_.ui-button]:border-0 [&_.ui-button]:px-3 [&_.ui-button]:text-[14px] [&_.ui-button]:font-normal",+ "[&_.ui-button:not(.ui-button-primary)]:bg-ink/5 [&_.ui-button:not(.ui-button-primary)]:text-ink [&_.ui-button:not(.ui-button-primary):enabled:hover]:bg-ink/10",+ "[&_.ui-button-primary]:bg-ink [&_.ui-button-primary]:text-app [&_.ui-button-primary:enabled:hover]:bg-ink/85",+);export function Switch({checked,diff --git a/src/components/SwatchRadios.tsx b/src/components/SwatchRadios.tsxindex 470c4ac700..7780947d89 100644--- a/src/components/SwatchRadios.tsx+++ b/src/components/SwatchRadios.tsx@@ -3,15 +3,20 @@ import { cn } from "@/lib/cn";import { CLOUD_SWATCH_LABEL, CLOUD_SWATCH_ORDER, swatchFill } from "@/lib/cloud-extra";import { t } from "@/lib/i18n";+const RING_OFFSET = { panel: "ring-offset-panel", card: "ring-offset-card", menu: "ring-offset-menu" } as const;+/** The six swatches a Cloud's colour is chosen from, as one radio group: arrow keys move the choice, Tab leaves it.- * `value` null: none of them yet (the first one takes the focus). `offset`: the surface the ring sits on. */-export function SwatchRadios({ value, onChange, label, disabled = false, offset = "panel" }: {- value: CloudSwatch | null; onChange: (swatch: CloudSwatch) => void; label: string; disabled?: boolean; offset?: "panel" | "card";+ * `value` null: none of them yet (the first one takes the focus). `offset`: the surface the ring sits on. `none`: the+ * plain swatch is offered as None, an empty circle, where it means no colour at all (a place's look), not Slate. */+export function SwatchRadios({ value, onChange, label, disabled = false, offset = "panel", none = false }: {+ value: CloudSwatch | null; onChange: (swatch: CloudSwatch) => void; label: string; disabled?: boolean; offset?: keyof typeof RING_OFFSET; none?: boolean;}) {const focusable = value ?? CLOUD_SWATCH_ORDER[0];+ const plain = (option: CloudSwatch) => none && option === "slate";return <div role="radiogroup" aria-label={label} aria-disabled={disabled || undefined} className="flex flex-wrap gap-2.5">- {CLOUD_SWATCH_ORDER.map((option) => <button key={option} type="button" role="radio" aria-checked={option === value} aria-label={t(CLOUD_SWATCH_LABEL[option])}- title={t(CLOUD_SWATCH_LABEL[option])} data-swatch={option} disabled={disabled} onClick={() => onChange(option)}+ {CLOUD_SWATCH_ORDER.map((option) => <button key={option} type="button" role="radio" aria-checked={option === value}+ aria-label={t(plain(option) ? "placeLook.none" : CLOUD_SWATCH_LABEL[option])} title={t(plain(option) ? "placeLook.none" : CLOUD_SWATCH_LABEL[option])}+ data-swatch={option} disabled={disabled} onClick={() => onChange(option)}onKeyDown={(event) => {const delta = event.key === "ArrowRight" || event.key === "ArrowDown" ? 1 : event.key === "ArrowLeft" || event.key === "ArrowUp" ? -1 : 0;if (!delta) return;@@ -21,8 +26,11 @@ export function SwatchRadios({ value, onChange, label, disabled = false, offset(event.currentTarget.parentElement?.querySelector(`[data-swatch="${next}"]`) as HTMLElement | null)?.focus();}}tabIndex={option === focusable ? 0 : -1}- className={cn("size-8 rounded-full border border-ink/10 transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",- option === value && cn("ring-2 ring-ink/70 ring-offset-2", offset === "card" ? "ring-offset-card" : "ring-offset-panel"), disabled && option !== value && "opacity-50")}- style={{ background: swatchFill(option) }} />)}+ className={cn("grid size-8 place-items-center rounded-full border transition-[box-shadow] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-default",+ plain(option) ? "border-ink/55 text-ink/55" : "border-ink/10",+ option === value && cn("ring-2 ring-ink/70 ring-offset-2", RING_OFFSET[offset]), disabled && option !== value && "opacity-50")}+ style={plain(option) ? undefined : { background: swatchFill(option) }}>+ {plain(option) && <span aria-hidden="true" className="h-[1.5px] w-[60%] -rotate-45 rounded-full bg-current" />}+ </button>)}</div>;}diff --git a/src/lib/place-look.ts b/src/lib/place-look.tsindex f555170659..4345158b0e 100644--- a/src/lib/place-look.ts+++ b/src/lib/place-look.ts@@ -32,8 +32,8 @@ function start() {void refreshPlaceLook();}-/** The colour of the place this page is, and whether it can be changed here: none in a browser, on an older app and on- * this computer's own page. The sidebar's tint and Settings read the same one. */+/** The colour of the place this page is, and whether it can be changed here: none in a browser and on an older app.+ * The sidebar's tint and Settings read the same one. */export function usePlaceLook(): PlaceLook | null {const [look, setLook] = useState<PlaceLook | null>(current);useEffect(() => {diff --git a/src/locales/de.json b/src/locales/de.jsonindex 280e9417ca..64ae24bc18 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -2527,8 +2527,12 @@"placeLook.signedOut": "Melde dich bei MausBot Cloud an, um die Farbe zu ändern.","placeLook.unsupported": "Die Farbe dieser Cloud lässt sich in der App noch nicht ändern.","placeLook.failed": "Die Farbe wurde nicht gespeichert. Versuche es noch einmal.",- "placeLook.picture": "Bild",- "placeLook.pictureSub": "Dein eigenes Bild, oben in der Seitenleiste ausgeblendet. Alle hier sehen es.",+ "placeLook.none": "Keine",+ "placeLook.sidebarColor": "Farbe der Seitenleiste",+ "placeLook.sidebarColorSub": "Färbt die Seitenleiste oben dezent ein.",+ "placeLook.sidebarPicture": "Bild der Seitenleiste",+ "placeLook.sidebarPictureSub": "Dein eigenes Bild, sanft oben in die Seitenleiste eingeblendet.",+ "placeLook.pictureSub": "Dein eigenes Bild, sanft oben in die Seitenleiste eingeblendet. Alle hier sehen es.","placeLook.useImage": "Bild verwenden","placeLook.changeImage": "Bild ändern","placeLook.removeImage": "Entfernen",diff --git a/src/locales/en.json b/src/locales/en.jsonindex 69c424d217..7d0480249a 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -325,7 +325,11 @@"placeLook.signedOut": "Sign in to MausBot Cloud to change its color.","placeLook.unsupported": "This Cloud's color can't be changed from the app yet.","placeLook.failed": "The color wasn't saved. Try again.",- "placeLook.picture": "Picture",+ "placeLook.none": "None",+ "placeLook.sidebarColor": "Sidebar color",+ "placeLook.sidebarColorSub": "Tints the top of the sidebar.",+ "placeLook.sidebarPicture": "Sidebar picture",+ "placeLook.sidebarPictureSub": "Your own image, faded into the top of the sidebar.","placeLook.pictureSub": "Your own image, faded into the top of the sidebar. Everyone here sees it.","placeLook.useImage": "Use an image","placeLook.changeImage": "Change image",diff --git a/src/locales/es.json b/src/locales/es.jsonindex b6114a0a92..7a6d04ac36 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -293,7 +293,11 @@"placeLook.signedOut": "Inicia sesión en MausBot Cloud para cambiar su color.","placeLook.unsupported": "El color de esta Cloud aún no se puede cambiar desde la app.","placeLook.failed": "No se guardó el color. Inténtalo de nuevo.",- "placeLook.picture": "Imagen",+ "placeLook.none": "Ninguno",+ "placeLook.sidebarColor": "Color de la barra lateral",+ "placeLook.sidebarColorSub": "Tiñe suavemente la parte superior de la barra lateral.",+ "placeLook.sidebarPicture": "Imagen de la barra lateral",+ "placeLook.sidebarPictureSub": "Tu propia imagen, difuminada en la parte superior de la barra lateral.","placeLook.pictureSub": "Tu propia imagen, difuminada en la parte superior de la barra lateral. Todos aquí la ven.","placeLook.useImage": "Usar una imagen","placeLook.changeImage": "Cambiar imagen",diff --git a/src/locales/fr.json b/src/locales/fr.jsonindex 30191fa01f..b23a9dd10c 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -2509,7 +2509,11 @@"placeLook.signedOut": "Connectez-vous à MausBot Cloud pour changer sa couleur.","placeLook.unsupported": "La couleur de ce Cloud ne peut pas encore être changée depuis l'app.","placeLook.failed": "La couleur n'a pas été enregistrée. Réessayez.",- "placeLook.picture": "Image",+ "placeLook.none": "Aucune",+ "placeLook.sidebarColor": "Couleur de la barre latérale",+ "placeLook.sidebarColorSub": "Teinte légèrement le haut de la barre latérale.",+ "placeLook.sidebarPicture": "Image de la barre latérale",+ "placeLook.sidebarPictureSub": "Votre propre image, fondue en haut de la barre latérale.","placeLook.pictureSub": "Votre propre image, fondue en haut de la barre latérale. Tout le monde ici la voit.","placeLook.useImage": "Utiliser une image","placeLook.changeImage": "Changer l'image",diff --git a/src/locales/hi.json b/src/locales/hi.jsonindex 2aba54887b..ceaf4ed25d 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -2509,7 +2509,11 @@"placeLook.signedOut": "इसका रंग बदलने के लिए MausBot Cloud में साइन इन करें।","placeLook.unsupported": "इस Cloud का रंग अभी ऐप से नहीं बदला जा सकता।","placeLook.failed": "रंग सेव नहीं हुआ। फिर कोशिश करें।",- "placeLook.picture": "तस्वीर",+ "placeLook.none": "कोई नहीं",+ "placeLook.sidebarColor": "साइडबार का रंग",+ "placeLook.sidebarColorSub": "साइडबार के ऊपरी हिस्से को हल्का-सा रंग देता है।",+ "placeLook.sidebarPicture": "साइडबार की तस्वीर",+ "placeLook.sidebarPictureSub": "आपकी अपनी तस्वीर, साइडबार के ऊपर हल्की-सी घुली हुई।","placeLook.pictureSub": "आपकी अपनी तस्वीर, साइडबार के ऊपर हल्की-सी घुली हुई। यहाँ सब इसे देखते हैं।","placeLook.useImage": "तस्वीर लगाएँ","placeLook.changeImage": "तस्वीर बदलें",diff --git a/src/locales/it.json b/src/locales/it.jsonindex 1c89780dc2..e51ef87d88 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -297,7 +297,11 @@"placeLook.signedOut": "Accedi a MausBot Cloud per cambiarne il colore.","placeLook.unsupported": "Il colore di questo Cloud non si può ancora cambiare dall'app.","placeLook.failed": "Il colore non è stato salvato. Riprova.",- "placeLook.picture": "Immagine",+ "placeLook.none": "Nessuno",+ "placeLook.sidebarColor": "Colore della barra laterale",+ "placeLook.sidebarColorSub": "Colora leggermente la parte alta della barra laterale.",+ "placeLook.sidebarPicture": "Immagine della barra laterale",+ "placeLook.sidebarPictureSub": "La tua immagine, sfumata in cima alla barra laterale.","placeLook.pictureSub": "La tua immagine, sfumata in cima alla barra laterale. La vedono tutti qui.","placeLook.useImage": "Usa un'immagine","placeLook.changeImage": "Cambia immagine",diff --git a/src/locales/ja.json b/src/locales/ja.jsonindex 84e6bb79dd..52e153e6d0 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -303,7 +303,11 @@"placeLook.signedOut": "色を変更するには MausBot Cloud にサインインしてください。","placeLook.unsupported": "この Cloud の色は、まだアプリから変更できません。","placeLook.failed": "色を保存できませんでした。もう一度お試しください。",- "placeLook.picture": "画像",+ "placeLook.none": "なし",+ "placeLook.sidebarColor": "サイドバーの色",+ "placeLook.sidebarColorSub": "サイドバーの上部をほんのり色付けします。",+ "placeLook.sidebarPicture": "サイドバーの画像",+ "placeLook.sidebarPictureSub": "あなたの画像を、サイドバーの上部に薄く溶け込ませて表示します。","placeLook.pictureSub": "あなたの画像を、サイドバーの上部に薄く溶け込ませて表示します。ここにいる全員に表示されます。","placeLook.useImage": "画像を使う","placeLook.changeImage": "画像を変更",diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex 434dc0cd24..4d98334bff 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -303,7 +303,11 @@"placeLook.signedOut": "Zaloguj się do MausBot Cloud, aby zmienić kolor.","placeLook.unsupported": "Koloru tej Chmury nie można jeszcze zmienić w aplikacji.","placeLook.failed": "Nie zapisano koloru. Spróbuj ponownie.",- "placeLook.picture": "Obraz",+ "placeLook.none": "Brak",+ "placeLook.sidebarColor": "Kolor paska bocznego",+ "placeLook.sidebarColorSub": "Delikatnie barwi górę paska bocznego.",+ "placeLook.sidebarPicture": "Obraz paska bocznego",+ "placeLook.sidebarPictureSub": "Twój własny obraz, wtopiony w górę paska bocznego.","placeLook.pictureSub": "Twój własny obraz, wtopiony w górę paska bocznego. Widzą go wszyscy tutaj.","placeLook.useImage": "Użyj obrazu","placeLook.changeImage": "Zmień obraz",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 19ebbeca8c..b256998ef9 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -293,7 +293,11 @@"placeLook.signedOut": "Entre no MausBot Cloud para mudar a cor.","placeLook.unsupported": "A cor deste Cloud ainda não pode ser mudada pelo app.","placeLook.failed": "A cor não foi salva. Tente de novo.",- "placeLook.picture": "Imagem",+ "placeLook.none": "Nenhuma",+ "placeLook.sidebarColor": "Cor da barra lateral",+ "placeLook.sidebarColorSub": "Tinge de leve o topo da barra lateral.",+ "placeLook.sidebarPicture": "Imagem da barra lateral",+ "placeLook.sidebarPictureSub": "Sua própria imagem, esmaecida no topo da barra lateral.","placeLook.pictureSub": "Sua própria imagem, esmaecida no topo da barra lateral. Todos aqui a veem.","placeLook.useImage": "Usar uma imagem","placeLook.changeImage": "Trocar imagem",diff --git a/src/locales/ru.json b/src/locales/ru.jsonindex b5c88be9d8..49bb5501a1 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -303,7 +303,11 @@"placeLook.signedOut": "Войдите в MausBot Cloud, чтобы изменить цвет.","placeLook.unsupported": "Цвет этого Cloud пока нельзя изменить в приложении.","placeLook.failed": "Цвет не сохранён. Попробуйте ещё раз.",- "placeLook.picture": "Изображение",+ "placeLook.none": "Нет",+ "placeLook.sidebarColor": "Цвет боковой панели",+ "placeLook.sidebarColorSub": "Слегка окрашивает верх боковой панели.",+ "placeLook.sidebarPicture": "Изображение боковой панели",+ "placeLook.sidebarPictureSub": "Ваше изображение, плавно растворённое вверху боковой панели.","placeLook.pictureSub": "Ваше изображение, плавно растворённое вверху боковой панели. Его видят все здесь.","placeLook.useImage": "Выбрать изображение","placeLook.changeImage": "Сменить изображение",diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex bfdb21a7b6..2120fe301b 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -2423,7 +2423,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -7913,7 +7912,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -10423,7 +10421,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -12933,7 +12930,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -19369,7 +19365,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -25560,7 +25555,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -28913,7 +28907,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -33278,7 +33271,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -36233,7 +36225,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -41214,7 +41205,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -46195,7 +46185,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -52525,7 +52514,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -58939,7 +58927,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",@@ -65147,7 +65134,6 @@"placeLook.signedOut": "aae75fe60d806476b04ceb5cb2d485f45534a1766e71c2f1d3a908fa2ec989da","placeLook.unsupported": "1b93917237873856b67b760397226bf9737add955f5dfd2b2531b5e22016ffe9","placeLook.failed": "2fc8752982ad366b9e2a028d69775254a8e58aa9f31358d64aa760360e3425bf",- "placeLook.picture": "9a1c54f55e7cfb1cc2cdad2991525037bc475a509fa37262e123c44e958d2d36","placeLook.pictureSub": "e11058639849360c6e174fec0c44f0471a8fbaeea235c069d36bcb1cf9d368a6","placeLook.useImage": "5710f8737986aeb034906c4c506afb79dcc6f79b0989a6f93ead28bb79d6c63f","placeLook.changeImage": "87b8b0086a4c5112e018c16187c697c61886188b28a8cb578053063406714dd7",diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex ab0773b2f9..61afdc9a0f 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -4981,7 +4981,11 @@"placeLook.signedOut": "Rengini değiştirmek için MausBot Cloud'da oturum açın.","placeLook.unsupported": "Bu Cloud'un rengi henüz uygulamadan değiştirilemez.","placeLook.failed": "Renk kaydedilmedi. Yeniden deneyin.",- "placeLook.picture": "Görsel",+ "placeLook.none": "Yok",+ "placeLook.sidebarColor": "Kenar çubuğu rengi",+ "placeLook.sidebarColorSub": "Kenar çubuğunun üstünü hafifçe renklendirir.",+ "placeLook.sidebarPicture": "Kenar çubuğu görseli",+ "placeLook.sidebarPictureSub": "Kendi görseliniz, kenar çubuğunun üstünde silikleşerek görünür.","placeLook.pictureSub": "Kendi görseliniz, kenar çubuğunun üstünde silikleşerek görünür. Buradaki herkes görür.","placeLook.useImage": "Görsel kullan","placeLook.changeImage": "Görseli değiştir",diff --git a/src/locales/uk.json b/src/locales/uk.jsonindex 4499f59b3a..64e50e204f 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -2954,7 +2954,11 @@"placeLook.signedOut": "Увійдіть у MausBot Cloud, щоб змінити колір.","placeLook.unsupported": "Колір цього Cloud поки не можна змінити в застосунку.","placeLook.failed": "Колір не збережено. Спробуйте ще раз.",- "placeLook.picture": "Зображення",+ "placeLook.none": "Немає",+ "placeLook.sidebarColor": "Колір бічної панелі",+ "placeLook.sidebarColorSub": "Злегка забарвлює верх бічної панелі.",+ "placeLook.sidebarPicture": "Зображення бічної панелі",+ "placeLook.sidebarPictureSub": "Ваше зображення, м'яко розчинене вгорі бічної панелі.","placeLook.pictureSub": "Ваше зображення, м'яко розчинене вгорі бічної панелі. Його бачать усі тут.","placeLook.useImage": "Вибрати зображення","placeLook.changeImage": "Змінити зображення",diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex f1cfa84fe1..0150ed78f5 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -4981,7 +4981,11 @@"placeLook.signedOut": "Đăng nhập MausBot Cloud để đổi màu này.","placeLook.unsupported": "Chưa thể đổi màu của Cloud này từ ứng dụng.","placeLook.failed": "Chưa lưu được màu. Hãy thử lại.",- "placeLook.picture": "Hình ảnh",+ "placeLook.none": "Không có",+ "placeLook.sidebarColor": "Màu thanh bên",+ "placeLook.sidebarColorSub": "Phủ một lớp màu nhẹ lên đầu thanh bên.",+ "placeLook.sidebarPicture": "Hình ảnh thanh bên",+ "placeLook.sidebarPictureSub": "Hình ảnh của riêng bạn, mờ dần ở đầu thanh bên.","placeLook.pictureSub": "Hình ảnh của riêng bạn, mờ dần ở đầu thanh bên. Mọi người ở đây đều thấy.","placeLook.useImage": "Dùng một hình ảnh","placeLook.changeImage": "Đổi hình ảnh",diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.jsonindex 3bd5dc25b0..4867c3c59d 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -4364,7 +4364,11 @@"placeLook.signedOut": "登入 MausBot Cloud 才能更改顏色。","placeLook.unsupported": "目前還無法在 App 中更改這個 Cloud 的顏色。","placeLook.failed": "顏色沒有儲存。請再試一次。",- "placeLook.picture": "圖片",+ "placeLook.none": "無",+ "placeLook.sidebarColor": "側邊欄顏色",+ "placeLook.sidebarColorSub": "為側邊欄頂端淡淡上色。",+ "placeLook.sidebarPicture": "側邊欄圖片",+ "placeLook.sidebarPictureSub": "你自己的圖片,淡淡融入側邊欄頂端。","placeLook.pictureSub": "你自己的圖片,淡淡融入側邊欄頂端。這裡的每個人都看得到。","placeLook.useImage": "使用圖片","placeLook.changeImage": "更換圖片",diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex bc5bb0a313..35fbe31423 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -3352,7 +3352,11 @@"placeLook.signedOut": "登录 MausBot Cloud 才能更改颜色。","placeLook.unsupported": "暂时还无法在应用中更改这个 Cloud 的颜色。","placeLook.failed": "颜色没有保存。请重试。",- "placeLook.picture": "图片",+ "placeLook.none": "无",+ "placeLook.sidebarColor": "侧边栏颜色",+ "placeLook.sidebarColorSub": "为侧边栏顶部淡淡着色。",+ "placeLook.sidebarPicture": "侧边栏图片",+ "placeLook.sidebarPictureSub": "你自己的图片,淡淡融入侧边栏顶部。","placeLook.pictureSub": "你自己的图片,淡淡融入侧边栏顶部。这里的每个人都能看到。","placeLook.useImage": "使用图片","placeLook.changeImage": "更换图片",diff --git a/src/types/ogb.d.ts b/src/types/ogb.d.tsindex 98739516d6..3e1f72e299 100644--- a/src/types/ogb.d.ts+++ b/src/types/ogb.d.ts@@ -161,8 +161,8 @@ const __APP_VERSION__: string;open?: (id: string) => Promise<unknown>;/** +'s fixed choices: buy a Cloud (this computer's own sheet), paste a server's pairing link, or type its address. */add?: (choice: "cloud" | "link" | "address") => Promise<unknown>;- /** The colour of the place this page is, and whether it can be changed here (null on this computer's page).- * Absent on an older app. */+ /** The colour of the place this page is (This computer's too), and whether it can be changed here. Absent on an+ * older app. */look?: () => Promise<import("../../electron/place-look.mjs").PlaceLook | null>;/** That place's colour, from the person's click: one of the six swatches, or null for none. */color?: (swatch: import("../../electron/cloud-list.mjs").CloudSwatch | null) => Promise<{ outcome: import("../../electron/place-look.mjs").PlaceColorOutcome; look: import("../../electron/place-look.mjs").PlaceLook | null }>;