swarm-ui: the three toasts that didn't match read like the rest
Two toasts started with a capital and ended with a full stop (the stored login dialog's and the login delete's), and the API key removal had no tone. They are short lowercase phrases with the ok tone now, and the design guide says so.
This commit is contained in:
parent
963ec65bbc
commit
f6a0bb4bb3
4 changed files with 5 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ export function afterCode(problem: ProblemDetails | null): LoginStep {
|
|||
|
||||
// What the toast says once the login is stored.
|
||||
export function storedMessage(agent: string): string {
|
||||
return `Login stored. ${agent} picks it up within a minute and resumes.`;
|
||||
return `login stored: ${agent} picks it up within a minute and resumes`;
|
||||
}
|
||||
|
||||
// Whether closing the dialog leaves a login running that should be
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ export function AgentApiKey({ hive, agent }: { hive: string; agent: string }) {
|
|||
return;
|
||||
}
|
||||
setConfirming(false);
|
||||
showToast(`removed the API key for ${agent}`);
|
||||
showToast(`removed the API key for ${agent}`, "ok");
|
||||
await load();
|
||||
} catch (err) {
|
||||
setRemoveError({ detail: String(err) });
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export function AgentClaudeLogin({ agent }: { agent: string }) {
|
|||
setConfirming(false);
|
||||
// Nothing is stored now, whatever the re-read says.
|
||||
setLogin({ stored_at: null });
|
||||
showToast(`Stored login for ${agent} deleted.`, "ok");
|
||||
showToast(`deleted the stored login for ${agent}`, "ok");
|
||||
await load();
|
||||
} catch (err) {
|
||||
setDeleteError({ detail: String(err) });
|
||||
|
|
|
|||
|
|
@ -80,5 +80,5 @@ test("a pasted code is trimmed, and a blank one is nothing", () => {
|
|||
});
|
||||
|
||||
test("the stored toast names the agent", () => {
|
||||
assert.match(storedMessage("atlas"), /^Login stored\. atlas /);
|
||||
assert.match(storedMessage("atlas"), /^login stored: atlas /);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue