' + rows.map(([t, k, p]) => '
'
- + '' + esc(t) + ''
- + '' + keycaps(k) + (p ? 'proto ' + esc(p) + '' : '') + '
').join('') + '
',
- '' + rows.map(([t, k]) => '
'
+ + '' + esc(t) + ''
+ + '' + keycaps(k) + '
').join('') + '
',
+ ''
+function sheet(title, body, foot, cls) {
+ return '
'
+ + '
' + esc(title) + '
'
+ + '
'
+ '
' + body + '
';
}
@@ -3284,10 +3323,11 @@ async function privacySet(enabled) {
function renderToasts() {
$('#toasts').innerHTML = S.toasts.map((t) => {
const bad = t.kind === 'bad';
+ // No whitespace between the text spans: drivers read the toast's textContent.
return '
'
- + '' + ic(bad ? 'warn' : 'check') + ''
- + '' + esc(t.t) + ''
- + (t.s ? '' + esc(t.s) + '' : '') + '
';
+ + '
' + ic(bad ? 'alert' : 'check') + ''
+ + '
' + esc(t.t) + ''
+ + (t.s ? '' + esc(t.s) + '' : '') + '';
}).join('');
}
function toast(t, s, kind) {
@@ -3538,6 +3578,7 @@ function act(a) {
if (k === 'theme') { close(); S.theme = v;
if (v === 'system') document.documentElement.removeAttribute('data-theme');
else document.documentElement.setAttribute('data-theme', v);
+ try { localStorage.setItem('atag.theme', v); } catch (e) { /* no storage: the choice lasts this launch */ }
render(); return; }
if (k === 'mode') { S.mode = v; if (S.overlay === 'palette') close(); render(); return; }
if (k === 'cards') { close(); S.log.forEach((m) => { if (m.k === 'tool') m.open = v === 'expand'; }); render(); return; }
@@ -4799,6 +4840,8 @@ document.addEventListener('keydown', (e) => {
if (!inText && k.length === 1 && !mod && S.room === 'chat') { const en = $('#entry'); if (en) en.focus(); }
});
+// The theme picked in the palette or View › Appearance (act 'theme') survives a relaunch.
+try { const t = localStorage.getItem('atag.theme'); if (t === 'light' || t === 'dark') { S.theme = t; document.documentElement.setAttribute('data-theme', t); } } catch (e) { /* no storage: follow macOS */ }
render();
setTimeout(() => { const e = $('#entry'); if (e) e.focus(); }, 60);
/* r5 item 2: below 1000px the sidebar collapses to the same 52px rail with no