clavarium 0.2.348-next.1 → 0.2.350-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/server/settingswords.mjs +15 -0
- package/web/app.js +37 -20
- package/web/kit.js +239 -1
- package/web/style.css +79 -21
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.350-next.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.350-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/server/settingswords.mjs
CHANGED
|
@@ -37,6 +37,8 @@ export const SETTINGS_WORDS_FR = {
|
|
|
37
37
|
'set-na-will': 'Sera relié à {name}', 'set-na-level': 'Ce qu\'il pourra faire', 'set-na-read': 'Lecture', 'set-na-write': 'Écriture',
|
|
38
38
|
'set-na-made': '{name} créé', 'set-na-made-to': '{name} créé et relié à {to}', 'set-na-another': 'En créer un autre', 'set-na-done': 'Terminé',
|
|
39
39
|
'set-na-create': 'Créer', 'set-na-new-key': '+ Nouvelle clé…',
|
|
40
|
+
/* The top bar's way back (06-11, kit.js TopBar). */
|
|
41
|
+
'set-back': 'Retour', 'set-back-convs': 'Conversations',
|
|
40
42
|
'set-na-k-folder': 'Dossier', 'set-na-k-git': 'Dépôt git', 'set-na-k-mailbox': 'Boîte mail', 'set-na-k-agenda': 'Agenda',
|
|
41
43
|
'set-na-k-contacts': 'Contacts', 'set-na-k-secret': 'Secret', 'set-na-k-list': 'Classeur',
|
|
42
44
|
/* Step 4: a voice box and a device, two more kinds of the same box. */
|
|
@@ -67,5 +69,18 @@ export const SETTINGS_WORDS_FR = {
|
|
|
67
69
|
'set-apikeys-convs': 'Conversations', 'set-apikeys-convs-hint': 'Une par une : lire ou parler', 'set-apikeys-off': 'Non',
|
|
68
70
|
'set-apikeys-read': 'Lire', 'set-apikeys-talk': 'Parler', 'set-apikeys-no-convs': 'Aucune conversation pour l\'instant',
|
|
69
71
|
'set-apikeys-journal': 'Journal', 'set-apikeys-no-use': 'Aucun appel pour l\'instant',
|
|
72
|
+
/* The rights of an asset (06-11, kit.js RIGHTS): what it has (a pill), a choice, its one line. */
|
|
73
|
+
'set-rt-none': 'Aucun', 'set-rt-read': 'Lit', 'set-rt-write': 'Écrit', 'set-rt-use': 'Utilise', 'set-rt-watch': 'Surveille',
|
|
74
|
+
'set-rt-propose': 'Propose', 'set-rt-frame': 'Encadré', 'set-rt-free': 'Libre', 'set-rt-terminal': 'Terminal', 'set-rt-chat': 'Chat',
|
|
75
|
+
'set-rt-both': 'Chat + terminal',
|
|
76
|
+
'set-rt-pick-none': 'Aucun', 'set-rt-pick-read': 'Lire', 'set-rt-pick-write': 'Écrire', 'set-rt-pick-use': 'Utiliser',
|
|
77
|
+
'set-rt-pick-watch': 'Surveiller', 'set-rt-pick-propose': 'Proposer', 'set-rt-pick-frame': 'Encadrer', 'set-rt-pick-free': 'Libre',
|
|
78
|
+
'set-rt-pick-terminal': 'Terminal', 'set-rt-pick-chat': 'Chat', 'set-rt-pick-both': 'Les deux',
|
|
79
|
+
'set-rt-hint-none': 'Pas donné', 'set-rt-hint-read': 'Lecture seule', 'set-rt-hint-write': 'Lecture et écriture',
|
|
80
|
+
'set-rt-hint-use': 'Remis à son outil, jamais affiché', 'set-rt-hint-watch': 'Lecture seule',
|
|
81
|
+
'set-rt-hint-propose': 'Vous demande avant chaque action', 'set-rt-hint-frame': 'Agit selon ses règles, vous demande le reste',
|
|
82
|
+
'set-rt-hint-free': 'Agit seul, tout est noté au journal', 'set-rt-hint-terminal': 'Tout son terminal',
|
|
83
|
+
'set-rt-hint-chat': 'Lit et écrit dans son chat', 'set-rt-hint-both': 'Son chat et son terminal',
|
|
84
|
+
'set-as-nobody': 'personne',
|
|
70
85
|
};
|
|
71
86
|
export const settingsWords = (lang) => (String(lang ?? '').toLowerCase().split('-')[0] === 'fr' ? { ...SETTINGS_WORDS_FR } : {});
|
package/web/app.js
CHANGED
|
@@ -408,24 +408,43 @@
|
|
|
408
408
|
/* ---------- the list of conversations, folded away or not ---------- */
|
|
409
409
|
/* One click hides it and the terminal takes the room; one click brings
|
|
410
410
|
it back. Kept on this device. */
|
|
411
|
-
/* THE TOP BAR, ONE COMPONENT (03-11
|
|
412
|
-
list on its left, a state's dot when there is one,
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
411
|
+
/* THE TOP BAR, ONE COMPONENT (03-11; 06-11: kit.js TopBar, the same visual everywhere): every page of the right
|
|
412
|
+
pane has the same bar -- the button that shows or hides the list on its left, a state's dot when there is one,
|
|
413
|
+
its title (a line under it when there is one), and on its right what that page offers. Two variants: 'main',
|
|
414
|
+
a conversation or a room (its views, its gear; its "‹" on a narrow screen), and 'sub', a page of its own or
|
|
415
|
+
inside one (its way back, last on the right). Built from each page's own elements: their ids, their gestures. */
|
|
416
|
+
const backSaid = (label) => ({ Back: 'set-back', Conversations: 'set-back-convs' })[label] ?? null;
|
|
417
|
+
function topBar(top, { variant = 'sub', state = null, title = top.querySelector(':scope > b'), sub = null, actions = null } = {}) {
|
|
418
|
+
const close = top.querySelector(':scope > .place-back');
|
|
419
|
+
const label = close ? close.textContent.replace(/^\s*‹\s*/, '').trim() : '';
|
|
420
|
+
const bar = KIT.TopBar({
|
|
421
|
+
variant, fold: true, onFold: () => $('fold').click(), state, title, sub,
|
|
422
|
+
back: close ? { element: close, label, said: backSaid(label) } : null,
|
|
423
|
+
actions: actions ?? [...top.children].filter((n) => n !== title && n !== close),
|
|
424
|
+
cls: [...top.classList].filter((c) => c !== 'panel-top').join(' '),
|
|
425
|
+
});
|
|
425
426
|
top.replaceWith(bar);
|
|
426
427
|
return bar;
|
|
427
428
|
}
|
|
428
|
-
|
|
429
|
+
/* A conversation's bar (its page, or a device's: no list to fold; its state in words and its own controls on the right). */
|
|
430
|
+
{
|
|
431
|
+
const old = document.getElementById('room')?.querySelector(':scope > header');
|
|
432
|
+
if (old) old.replaceWith(DEVICE
|
|
433
|
+
? KIT.TopBar({ variant: 'main', title: $('name'), actions: [...old.children].filter((n) => n.id !== 'name') })
|
|
434
|
+
: KIT.TopBar({ variant: 'main', fold: $('fold'), back: { element: $('back'), label: 'Conversations' }, state: $('state'), title: $('name'), actions: [$('views')] }));
|
|
435
|
+
}
|
|
436
|
+
/* A room (the device page has none): its dot, its name, under it who speaks now and who is in it; its settings
|
|
437
|
+
in the same group of views a conversation's settings sit in; its way back, "‹", as a conversation's (kit: 'main'). */
|
|
438
|
+
if (document.getElementById('salon')) {
|
|
439
|
+
const top = $('salon').querySelector(':scope > .panel-top');
|
|
440
|
+
const t = $('salon-title'); const name = document.createElement('span'); name.id = 'salon-name'; name.textContent = t.textContent; t.replaceChildren(name);
|
|
441
|
+
const live = document.createElement('small'); live.id = 'salon-live'; live.className = 'salon-live'; live.hidden = true;
|
|
442
|
+
const views = document.createElement('div'); views.className = 'views'; views.setAttribute('role', 'group'); views.setAttribute('aria-label', 'Room'); views.append($('salon-settings'));
|
|
443
|
+
const strip = $('salon').querySelector('.salon-bar');
|
|
444
|
+
topBar(top, { variant: 'main', state: { id: 'salon-state' }, sub: [live, $('salon-who')], actions: [views] });
|
|
445
|
+
strip?.remove();
|
|
446
|
+
}
|
|
447
|
+
for (const top of [...document.querySelectorAll('#places .sheet > .panel-top')]) topBar(top, top.parentElement.id === 'salon-new' ? { state: { id: 'salon-new-state' } } : {});
|
|
429
448
|
/* A SEARCH ATOP A SETTINGS PAGE (05-11): one field in its top bar; what is typed keeps only the chapters (or
|
|
430
449
|
blocks) whose title or rows say it, opened; the headings left with nothing are hidden. Emptied, all comes back
|
|
431
450
|
as it was. The server's Settings, a conversation's, and any sheet given the same shape. */
|
|
@@ -460,11 +479,6 @@
|
|
|
460
479
|
field.addEventListener('keydown', (e) => { if (e.key === 'Escape' && field.value) { e.stopPropagation(); field.value = ''; field.dispatchEvent(new Event('input')); } });
|
|
461
480
|
};
|
|
462
481
|
for (const id of ['settings', 'panel']) settingsSearch($(id));
|
|
463
|
-
/* A room's title: its name, and under it who speaks now (salonLive). */
|
|
464
|
-
/* The device page (/c/) has no rooms sheet (05-11: it stopped app.js there, the page stuck on connecting). */
|
|
465
|
-
if ($('salon')) { const t = $('salon-title'); const name = document.createElement('span'); name.id = 'salon-name'; name.textContent = t.textContent; const live = document.createElement('small'); live.id = 'salon-live'; live.className = 'salon-live'; live.hidden = true; t.replaceChildren(name, live); }
|
|
466
|
-
/* A room's settings: on its bar's right, in the same group of views a conversation's settings sit in. */
|
|
467
|
-
if ($('salon')) { const views = document.createElement('div'); views.className = 'views'; views.setAttribute('role', 'group'); views.setAttribute('aria-label', 'Room'); views.append($('salon-settings')); $('salon').querySelector('.topbar .bar-right')?.prepend(views); }
|
|
468
482
|
const applyFold = (folded) => {
|
|
469
483
|
app.dataset.list = folded ? 'folded' : 'open';
|
|
470
484
|
for (const f of [$('fold'), ...document.querySelectorAll('.fold-here')]) {
|
|
@@ -5435,6 +5449,8 @@
|
|
|
5435
5449
|
salonEditing = editing;
|
|
5436
5450
|
enterPlace('salon-new', push);
|
|
5437
5451
|
$('salon-new-title').textContent = editing ? editing.name : 'New room';
|
|
5452
|
+
/* Its settings say its state as the room's bar does; a room to be made has none yet. */
|
|
5453
|
+
const dot = $('salon-new-state'); if (dot) { dot.hidden = !editing; dot.dataset.state = thinkingOf(editing).length ? 'work' : 'ok'; }
|
|
5438
5454
|
$('salon-new-create').textContent = editing ? 'Save' : 'Create';
|
|
5439
5455
|
$('salon-new-remove-card').hidden = $('salon-new-advanced-head').hidden = !editing;
|
|
5440
5456
|
$('salon-new-remove').hidden = false; $('salon-new-remove-card').querySelector('.confirm')?.remove();
|
|
@@ -6352,6 +6368,7 @@
|
|
|
6352
6368
|
uiSaid): an element marked data-said="key" keeps its English as the fallback. */
|
|
6353
6369
|
function saySettings() {
|
|
6354
6370
|
for (const e of document.querySelectorAll('[data-said]')) { e.dataset.en ??= e.textContent; e.textContent = uiSaid(e.dataset.said, e.dataset.en); }
|
|
6371
|
+
for (const e of document.querySelectorAll('[data-said-label]')) { e.dataset.enLabel ??= e.getAttribute('aria-label') ?? ''; const w = uiSaid(e.dataset.saidLabel, e.dataset.enLabel); e.setAttribute('aria-label', w); e.title = w; }
|
|
6355
6372
|
for (const b of document.querySelectorAll('button.tip-btn')) b.setAttribute('aria-label', uiSaid('set-why', 'Why'));
|
|
6356
6373
|
const s = document.querySelector('#settings .settings-search'); if (s) s.placeholder = uiSaid('set-search', 'Search');
|
|
6357
6374
|
const p = document.querySelector('#panel .settings-search'); if (p) p.placeholder = uiSaid('set-search', 'Search');
|
package/web/kit.js
CHANGED
|
@@ -15,8 +15,16 @@
|
|
|
15
15
|
* NewAsset ONE BOX to make an asset (05-11, step 3): kinds, the kind's form, one ending;
|
|
16
16
|
* opened with a context (a conversation it will be attached to). A voice box and
|
|
17
17
|
* a device are two of its kinds too (step 4).
|
|
18
|
+
* TopBar THE BAR atop every page of the right-hand pane, two variants: `main` (a conversation, a room:
|
|
19
|
+
* its views on the right) and `sub` (a page of its own or inside one: a way back on the right)
|
|
18
20
|
* ShareDonut who takes a whole (memory, a disk): a small donut, its slices from shareSlices, the main
|
|
19
21
|
* figure in its middle; ShareKey, a slice's swatch beside its row in the list
|
|
22
|
+
* AssetIcon an asset's sign and colour, by its kind (one table, ASSET_ICONS)
|
|
23
|
+
* AssetCard ONE ASSET, three sizes like ConvCard (06-11, assets step 1): `row` (a list), `chip` (a pill:
|
|
24
|
+
* a folded group, the thread, a call waiting), `head` (atop its panel). On its right, who has
|
|
25
|
+
* it (Holders) or, seen from one holder, its right (RightsBadge).
|
|
26
|
+
* RIGHTS THE ONE TABLE of what an asset can be given at, by its kind and by who gets it (a
|
|
27
|
+
* conversation, a device); "none" first. RightsBadge reads a right, RightsPicker sets it.
|
|
20
28
|
*
|
|
21
29
|
* No framework: each piece is a function that returns an element. Words: English here; the page
|
|
22
30
|
* hands its own (`setWords`, app.js `uiSaid`) for the few the kit says by itself.
|
|
@@ -269,6 +277,64 @@
|
|
|
269
277
|
return root;
|
|
270
278
|
}
|
|
271
279
|
|
|
280
|
+
/* THE TOP BAR (06-11, the owner: « un ou deux composants réutilisables, le même visuel au final »): one bar
|
|
281
|
+
atop every page of the right-hand pane -- a conversation, a room, their settings, Assets, Access, Settings,
|
|
282
|
+
the deck, a new conversation. The same height, padding, type and places everywhere:
|
|
283
|
+
[fold «] [‹ back, main: a narrow screen's] [dot] [title / its one small line under it] .... [actions] [‹ Back, sub]
|
|
284
|
+
variant 'main': a conversation or a room (its views: tabs, its gear); 'sub': a page (a way back, last).
|
|
285
|
+
fold true (a new « button, `onFold`) or the page's own element; null: none (a device's page).
|
|
286
|
+
back { element?, id?, label, said? } (`said`: the page's key for its words, kept on the label).
|
|
287
|
+
state { id?, state?, label? } (a dot drawn here) or the page's own element; null: no state, no dot.
|
|
288
|
+
title words, or the page's element (its id kept); `sub`: words or elements, one line under it.
|
|
289
|
+
actions elements on its right. `cls`: the page's own classes. Ids and listeners of what it is given stay. */
|
|
290
|
+
const addClass = (e, cls) => { e.className = [...new Set(`${e.className ?? ''} ${cls}`.split(/\s+/).filter(Boolean))].join(' '); return e; };
|
|
291
|
+
function TopBar({ variant = 'main', fold = null, onFold = null, back = null, state = null, title = '', sub = null, actions = [], cls = '' } = {}) {
|
|
292
|
+
const v = variant === 'sub' ? 'sub' : 'main';
|
|
293
|
+
const bar = node('header', `topbar kit-topbar${cls ? ` ${cls}` : ''}`); bar.dataset.variant = v;
|
|
294
|
+
if (fold) {
|
|
295
|
+
const f = fold === true ? node('button', 'fold-here', '«') : fold;
|
|
296
|
+
if (fold === true) {
|
|
297
|
+
f.type = 'button'; f.title = say('kit-fold', 'Hide or show the list of conversations');
|
|
298
|
+
f.setAttribute('aria-label', say('kit-fold-hide', 'Hide the list of conversations')); f.setAttribute('aria-pressed', 'false');
|
|
299
|
+
if (onFold) f.addEventListener('click', () => onFold());
|
|
300
|
+
}
|
|
301
|
+
bar.append(addClass(f, 'topbar-fold'));
|
|
302
|
+
}
|
|
303
|
+
let backButton = null;
|
|
304
|
+
if (back) {
|
|
305
|
+
const label = back.label ?? say('kit-back', 'Back');
|
|
306
|
+
backButton = back.element ?? node('button'); backButton.type = 'button';
|
|
307
|
+
if (back.id) backButton.id = back.id;
|
|
308
|
+
if (v === 'main') {
|
|
309
|
+
/* A conversation's or a room's way back: its sign alone, on a narrow screen (wide: the list is there). */
|
|
310
|
+
backButton.className = 'topbar-lead-back'; backButton.textContent = '‹';
|
|
311
|
+
backButton.setAttribute('aria-label', label); backButton.title = label;
|
|
312
|
+
if (back.said) backButton.dataset.saidLabel = back.said;
|
|
313
|
+
bar.append(backButton);
|
|
314
|
+
} else {
|
|
315
|
+
backButton.className = 'as-link place-back topbar-back';
|
|
316
|
+
const words = node('span', 'topbar-back-label', label); if (back.said) words.dataset.said = back.said;
|
|
317
|
+
backButton.replaceChildren('‹ ', words);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
if (state) {
|
|
321
|
+
const dot = state.tagName ? state : node('span', 'bar-state');
|
|
322
|
+
if (dot !== state) { if (state.id) dot.id = state.id; dot.dataset.state = stateOf(state.state ?? 'ok'); dot.setAttribute('aria-hidden', 'true'); if (state.label) dot.title = state.label; }
|
|
323
|
+
bar.append(addClass(dot, 'topbar-dot'));
|
|
324
|
+
}
|
|
325
|
+
const head = node('span', 'topbar-title');
|
|
326
|
+
const name = typeof title === 'string' ? node('b', '', title) : title;
|
|
327
|
+
if (name) head.append(addClass(name, 'topbar-name'));
|
|
328
|
+
const subs = (Array.isArray(sub) ? sub : [sub]).filter((x) => x !== null && x !== undefined && x !== '');
|
|
329
|
+
if (subs.length) { const line = node('span', 'topbar-sub'); line.append(...subs.map((x) => (typeof x === 'string' ? node('small', '', x) : x))); head.append(line); }
|
|
330
|
+
bar.append(head);
|
|
331
|
+
const right = node('div', 'bar-right');
|
|
332
|
+
right.append(...actions.filter(Boolean));
|
|
333
|
+
if (backButton && v === 'sub') right.append(backButton);
|
|
334
|
+
bar.append(right);
|
|
335
|
+
return bar;
|
|
336
|
+
}
|
|
337
|
+
|
|
272
338
|
/* WHO TAKES IT (06-11): one whole -- a server's memory or a disk -- split by who takes it: each machine
|
|
273
339
|
(the largest first, at most `max`, the rest folded into "Others"), the rest of the system, and what is
|
|
274
340
|
free. `parts` [{ key, label, mb }]. A machine keeps its colour while the page lives (`slots`, shared by
|
|
@@ -331,10 +397,182 @@
|
|
|
331
397
|
return root;
|
|
332
398
|
}
|
|
333
399
|
|
|
400
|
+
/* ---------- ASSETS (06-11, the unified assets, step 1: the pieces; the screens move to them in step 2) ---------- */
|
|
401
|
+
|
|
402
|
+
/* AN ASSET'S SIGN, by its kind: the icon set's name (Lucide, icons.js), or '' for one drawn here (a binder).
|
|
403
|
+
A live link (a connexion) takes the sign of what it links (a mailbox, a calendar); `acces`, any other. */
|
|
404
|
+
const ASSET_ICONS = { folder: 'folder', git: 'git-branch', mailbox: 'mail', agenda: 'calendar', contacts: 'user', secret: 'key-round', list: '', acces: 'link', send: 'arrow-up', demandes: 'arrow-up', box: 'mic', device: 'smartphone', conversation: 'message-square' };
|
|
405
|
+
const ASSET_KINDS = Object.keys(ASSET_ICONS);
|
|
406
|
+
/* A binder: the set has no such sign, so it is drawn here, in its style (was app.js listIcon). */
|
|
407
|
+
function listSign() {
|
|
408
|
+
const svg = svgNode('svg'); svg.setAttribute('viewBox', '0 0 24 24'); svg.setAttribute('aria-hidden', 'true');
|
|
409
|
+
for (const d of ['m3 17 2 2 4-4', 'm3 7 2 2 4-4', 'M13 6h8', 'M13 12h8', 'M13 18h8']) { const p = svgNode('path'); p.setAttribute('d', d); svg.append(p); }
|
|
410
|
+
return svg;
|
|
411
|
+
}
|
|
412
|
+
function AssetIcon({ kind = 'folder', cls = '' } = {}) {
|
|
413
|
+
const k = kind in ASSET_ICONS ? kind : 'folder';
|
|
414
|
+
const box = node('span', `kit-asset-ic${cls ? ` ${cls}` : ''}`); box.dataset.kind = k; box.setAttribute('aria-hidden', 'true');
|
|
415
|
+
const name = ASSET_ICONS[k];
|
|
416
|
+
const svg = name ? window.clavariumIcons?.icon?.(name) : listSign();
|
|
417
|
+
if (svg) box.append(svg);
|
|
418
|
+
return box;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/* THE RIGHTS: one level each, its tone (r: reads, w: changes, x: uses or watches, n: none). The words come
|
|
422
|
+
three ways: `badge` (what it has: "Reads"), `pick` (a choice: "Read"), `hint` (one line, its title). */
|
|
423
|
+
const RIGHT_LEVELS = {
|
|
424
|
+
none: { tone: 'n', badge: 'None', pick: 'None', hint: 'Not given' },
|
|
425
|
+
read: { tone: 'r', badge: 'Reads', pick: 'Read', hint: 'Reads only' },
|
|
426
|
+
write: { tone: 'w', badge: 'Writes', pick: 'Write', hint: 'Reads and writes' },
|
|
427
|
+
use: { tone: 'x', badge: 'Uses', pick: 'Use', hint: 'Handed to its tool, never shown' },
|
|
428
|
+
watch: { tone: 'x', badge: 'Watches', pick: 'Watch', hint: 'Reads only' },
|
|
429
|
+
propose: { tone: 'x', badge: 'Proposes', pick: 'Propose', hint: 'Asks you before each action' },
|
|
430
|
+
frame: { tone: 'w', badge: 'Framed', pick: 'Frame', hint: 'Acts within its rules, asks the rest' },
|
|
431
|
+
free: { tone: 'w', badge: 'Free', pick: 'Free', hint: 'Acts, kept in the journal' },
|
|
432
|
+
terminal: { tone: 'x', badge: 'Terminal', pick: 'Terminal', hint: 'Its whole terminal' },
|
|
433
|
+
chat: { tone: 'r', badge: 'Chat', pick: 'Chat', hint: 'Reads and writes in its chat' },
|
|
434
|
+
both: { tone: 'w', badge: 'Chat + terminal', pick: 'Both', hint: 'Its chat and its terminal' },
|
|
435
|
+
};
|
|
436
|
+
/* THE ONE TABLE (was app.js levelOptionsFor, the "Used by" options, levelControl, partsControl, fixedRight,
|
|
437
|
+
fixedUse, Attach's Read / Write / Use): what each kind can be given at, by who gets it. "none" is first,
|
|
438
|
+
always: it replaces Off, Detach, Remove all and Take back. A kind not in a holder's column is not given
|
|
439
|
+
to it. `connexion`: a live link (Tether: a mailbox, a calendar, contacts or an access connected). */
|
|
440
|
+
const RIGHTS = {
|
|
441
|
+
folder: { conversation: ['none', 'read', 'write'], device: ['none', 'read', 'write'] },
|
|
442
|
+
git: { conversation: ['none', 'read', 'write'], device: ['none', 'read', 'write'] },
|
|
443
|
+
mailbox: { conversation: ['none', 'read'], device: ['none', 'read'] },
|
|
444
|
+
secret: { conversation: ['none', 'use'] },
|
|
445
|
+
list: { conversation: ['none', 'read', 'write'] },
|
|
446
|
+
connexion: { conversation: ['none', 'watch', 'propose', 'frame', 'free'] },
|
|
447
|
+
conversation: { device: ['none', 'terminal', 'chat', 'both'] },
|
|
448
|
+
};
|
|
449
|
+
const HOLDERS = ['conversation', 'device'];
|
|
450
|
+
/* The table's key of an asset: a live link is a connexion, whatever it links; else its kind. */
|
|
451
|
+
const rightsKey = (a) => (a?.live || a?.target ? 'connexion' : a?.kind ?? '');
|
|
452
|
+
const rightsFor = (key, holder = 'conversation') => [...(RIGHTS[key]?.[HOLDERS.includes(holder) ? holder : 'conversation'] ?? [])];
|
|
453
|
+
/* The lightest real level (what "give the group" gives): the first after none. */
|
|
454
|
+
const lightest = (key, holder) => rightsFor(key, holder)[1] ?? null;
|
|
455
|
+
/* AS THE SERVER KEEPS THEM -> a level, and back. A secret is 'off' / 'use' (secrets.mjs); a device's
|
|
456
|
+
grant is 'r' / 'rw', a conversation given to a device 'x' (terminal), 'rw' (chat), 'rwx' (devices.mjs);
|
|
457
|
+
the rest keeps the level's own name. Nothing, '', null, 'off': none. */
|
|
458
|
+
function rightOf(key, stored, holder = 'conversation') {
|
|
459
|
+
const s = String(stored ?? '').trim();
|
|
460
|
+
if (!s || s === 'off' || s === 'none') return 'none';
|
|
461
|
+
if (holder === 'device' || /^(r|rw|x|rwx)$/.test(s)) {
|
|
462
|
+
if (key === 'conversation') return { x: 'terminal', rw: 'chat', r: 'chat', rwx: 'both', xrw: 'both' }[s] ?? (s in RIGHT_LEVELS ? s : 'none');
|
|
463
|
+
if (s === 'r') return 'read';
|
|
464
|
+
if (s === 'rw' || s === 'rwx') return 'write';
|
|
465
|
+
}
|
|
466
|
+
return s in RIGHT_LEVELS ? s : 'none';
|
|
467
|
+
}
|
|
468
|
+
function storedOf(key, level, holder = 'conversation') {
|
|
469
|
+
if (holder === 'device') {
|
|
470
|
+
if (level === 'none') return null;
|
|
471
|
+
if (key === 'conversation') return { terminal: 'x', chat: 'rw', both: 'rwx' }[level] ?? null;
|
|
472
|
+
return { read: 'r', write: 'rw' }[level] ?? null;
|
|
473
|
+
}
|
|
474
|
+
if (key === 'secret') return level === 'use' ? 'use' : 'off';
|
|
475
|
+
return level;
|
|
476
|
+
}
|
|
477
|
+
const levelOf = (opts) => { const l = opts.level ?? rightOf(opts.key ?? '', opts.value, opts.holder); return l in RIGHT_LEVELS ? l : 'none'; };
|
|
478
|
+
const rightWord = (level, form = 'badge') => {
|
|
479
|
+
const l = RIGHT_LEVELS[level] ?? RIGHT_LEVELS.none;
|
|
480
|
+
return say(`set-rt-${form === 'badge' ? '' : `${form}-`}${level in RIGHT_LEVELS ? level : 'none'}`, l[form] ?? l.badge);
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
/* A RIGHT, READ: a small pill, its tone by what it lets do. `level`, or `value` as kept (with its `key`, `holder`). */
|
|
484
|
+
function RightsBadge(opts = {}) {
|
|
485
|
+
const level = levelOf(opts);
|
|
486
|
+
const b = node('span', `kit-rights${opts.cls ? ` ${opts.cls}` : ''}`, rightWord(level, 'badge'));
|
|
487
|
+
b.dataset.level = level; b.dataset.tone = RIGHT_LEVELS[level].tone;
|
|
488
|
+
b.title = rightWord(level, 'hint');
|
|
489
|
+
return b;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/* A RIGHT, SET: the kind's levels from the table, "None" first, the one held pressed. `onChange(level,
|
|
493
|
+
stored)`: the level, and as the server keeps it; the buttons wait while it works (a promise). Nothing
|
|
494
|
+
to choose (a kind not given to that holder): null. */
|
|
495
|
+
function RightsPicker({ key = '', holder = 'conversation', value, level, label = '', cls = '', onChange = () => {} } = {}) {
|
|
496
|
+
const levels = rightsFor(key, holder);
|
|
497
|
+
if (!levels.length) return null;
|
|
498
|
+
const now = level ?? rightOf(key, value, holder);
|
|
499
|
+
const options = levels.map((l) => ({ value: l, label: rightWord(l, 'pick') }));
|
|
500
|
+
let held = now;
|
|
501
|
+
const pick = Segmented({ options, value: now, label, onChange: async (l) => {
|
|
502
|
+
if (l === held) return;
|
|
503
|
+
const buttons = pick.children; for (const b of buttons) b.disabled = true;
|
|
504
|
+
try { if ((await onChange(l, storedOf(key, l, holder))) === false) pick.set(held); else held = l; }
|
|
505
|
+
catch { pick.set(held); }
|
|
506
|
+
finally { for (const b of buttons) b.disabled = false; }
|
|
507
|
+
} });
|
|
508
|
+
addClass(pick, `kit-rights-pick${cls ? ` ${cls}` : ''}`);
|
|
509
|
+
pick.dataset.key = key; pick.dataset.holder = holder;
|
|
510
|
+
for (const b of pick.children) b.title = rightWord(b.dataset.value, 'hint');
|
|
511
|
+
return pick;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* WHO HAS IT: their initials, up to `max`, then "+n"; nobody, said in grey. `list` [{ name, hue?, glyph? }]. */
|
|
515
|
+
function Holders(list = [], { max = 3 } = {}) {
|
|
516
|
+
const box = node('span', 'kit-holders');
|
|
517
|
+
const all = (list ?? []).filter((h) => h && h.name);
|
|
518
|
+
if (!all.length) { box.dataset.none = 'true'; box.append(node('small', 'kit-holders-none', say('set-as-nobody', 'nobody'))); return box; }
|
|
519
|
+
for (const h of all.slice(0, max)) box.append(Avatar(h));
|
|
520
|
+
if (all.length > max) box.append(node('small', 'kit-holders-more', `+${all.length - max}`));
|
|
521
|
+
box.title = all.map((h) => h.name).join(', ');
|
|
522
|
+
return box;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
/* ONE ASSET. `a`, what the page knows of it, said once:
|
|
526
|
+
key, kind 'folder:reports', its kind (ASSET_ICONS) name its name
|
|
527
|
+
live a live link (a connexion): its rights are a connexion's
|
|
528
|
+
sub its one line ('' : none) state a point when it asks for you (wait,
|
|
529
|
+
problem: expiring, failing); else none
|
|
530
|
+
count a number that waits for you (calls waiting)
|
|
531
|
+
holders [{ name, hue? }] who has it (Assets) right { level | value, holder? } its right,
|
|
532
|
+
seen from one holder (a conversation)
|
|
533
|
+
chips [{ text, … }] on a head (its group ▾, its type, its size)
|
|
534
|
+
`size`: 'row' | 'chip' | 'head'. `tag`: 'button' (it opens: `onOpen`) or the page's; a head is a div.
|
|
535
|
+
`current`: the one open (aria-current). `actions`: the place's own gestures, on its right. */
|
|
536
|
+
function AssetCard(a, { size = 'row', tag, cls = '', current = false, onOpen = null, actions = [] } = {}) {
|
|
537
|
+
const s = ['row', 'chip', 'head'].includes(size) ? size : 'row';
|
|
538
|
+
const t = tag ?? (s === 'head' ? 'div' : onOpen || s === 'row' ? 'button' : 'span');
|
|
539
|
+
const root = node(t, `kit-asset kit-asset-${s}${cls ? ` ${cls}` : ''}`);
|
|
540
|
+
if (t === 'button') root.type = 'button';
|
|
541
|
+
if (a.key) root.dataset.asset = a.key;
|
|
542
|
+
root.dataset.kind = a.kind ?? 'folder'; root.dataset.name = a.name ?? '';
|
|
543
|
+
if (current) root.setAttribute('aria-current', 'true');
|
|
544
|
+
root.append(AssetIcon({ kind: a.kind }));
|
|
545
|
+
if (s === 'chip') {
|
|
546
|
+
root.append(node('span', 'kit-asset-name', a.name ?? ''));
|
|
547
|
+
if (a.right) root.append(RightsBadge({ ...a.right, key: a.right.key ?? rightsKey(a) }));
|
|
548
|
+
} else {
|
|
549
|
+
const main = node('span', 'kit-asset-main');
|
|
550
|
+
main.append(node(s === 'head' ? 'h2' : 'b', 'kit-asset-name', a.name ?? ''));
|
|
551
|
+
if (a.sub || a.state) {
|
|
552
|
+
const line = node('small', 'kit-asset-sub');
|
|
553
|
+
if (a.state) { line.append(StatusDot({ state: a.state, label: a.sub ?? '' })); line.dataset.state = stateOf(a.state); }
|
|
554
|
+
if (a.sub) line.append(node('span', '', a.sub));
|
|
555
|
+
main.append(line);
|
|
556
|
+
}
|
|
557
|
+
if (s === 'head') { const chips = Chips(a.chips ?? []); if (chips) main.append(chips); }
|
|
558
|
+
root.append(main);
|
|
559
|
+
const side = node('span', 'kit-asset-side');
|
|
560
|
+
if (Number.isFinite(a.count) && a.count > 0) side.append(Chips([{ text: String(a.count), tone: 'count' }]));
|
|
561
|
+
if (a.right) side.append(RightsBadge({ ...a.right, key: a.right.key ?? rightsKey(a) }));
|
|
562
|
+
else if (a.holders && s === 'row') side.append(Holders(a.holders));
|
|
563
|
+
side.append(...actions.filter(Boolean));
|
|
564
|
+
if (side.children.length) root.append(side);
|
|
565
|
+
}
|
|
566
|
+
if (onOpen && t === 'button') root.addEventListener('click', () => onOpen(a.key));
|
|
567
|
+
return root;
|
|
568
|
+
}
|
|
569
|
+
|
|
334
570
|
window.clavariumKit = {
|
|
571
|
+
AssetIcon, AssetCard, Holders, RightsBadge, RightsPicker,
|
|
572
|
+
ASSET_ICONS, ASSET_KINDS, RIGHTS, RIGHT_LEVELS, rightsKey, rightsFor, rightOf, storedOf, lightest, rightWord,
|
|
335
573
|
shareSlices, ShareDonut, ShareKey,
|
|
336
574
|
STATES, STATE_WORDS, stateOf, hueOf, initialOf,
|
|
337
575
|
setWords(fn) { if (typeof fn === 'function') words = fn; },
|
|
338
|
-
StatusDot, Avatar, Chips, Switch, Segmented, InlineConfirm, ConvCard, StepFlow, SecretPicker, NewAsset,
|
|
576
|
+
StatusDot, Avatar, Chips, Switch, Segmented, InlineConfirm, ConvCard, StepFlow, SecretPicker, NewAsset, TopBar,
|
|
339
577
|
};
|
|
340
578
|
})();
|
package/web/style.css
CHANGED
|
@@ -1133,7 +1133,6 @@ button.inline:hover { color: var(--brass-ink); }
|
|
|
1133
1133
|
html:not([data-door="device"]) #room > header { flex-wrap: nowrap; }
|
|
1134
1134
|
html:not([data-door="device"]) #room > header #state { flex: 0 0 auto; width: 10px; height: 10px; overflow: hidden; font-size: 0; color: transparent; }
|
|
1135
1135
|
html:not([data-door="device"]) #room > header #state::before { width: 10px; height: 10px; margin: 0; vertical-align: top; }
|
|
1136
|
-
html:not([data-door="device"]) #room > header b#name { flex: 1 1 auto; min-width: 0; font-size: 1rem; }
|
|
1137
1136
|
.views { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
|
|
1138
1137
|
.views button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink2); border-radius: 7px; padding: 5px 11px; }
|
|
1139
1138
|
.views button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
|
|
@@ -1391,8 +1390,7 @@ select.pill { appearance: auto; }
|
|
|
1391
1390
|
.rv-tree { position: static; max-height: none; }
|
|
1392
1391
|
}
|
|
1393
1392
|
@media (max-width: 700px) {
|
|
1394
|
-
html:not([data-door="device"]) #room > header { min-height:
|
|
1395
|
-
html:not([data-door="device"]) #room > header .views button, html:not([data-door="device"]) #room > header #folders, html:not([data-door="device"]) #room > header #back { min-height: 36px; height: 36px; padding: 0 9px; }
|
|
1393
|
+
html:not([data-door="device"]) #room > header .views button, html:not([data-door="device"]) #room > header #folders, html:not([data-door="device"]) #room > header .topbar-lead-back { min-height: 36px; height: 36px; }
|
|
1396
1394
|
.views { padding: 2px; }
|
|
1397
1395
|
}
|
|
1398
1396
|
#copy-close, #files-close, #preview-close { font-size: 1.375rem; line-height: 1; min-width: 40px; padding: 4px 10px; }
|
|
@@ -2105,7 +2103,7 @@ details.commit > pre { margin: 6px 0 0 1.6em; white-space: pre-wrap; overflow-wr
|
|
|
2105
2103
|
/* ON A TOUCH SCREEN THE SMALL CONTROLS TOO TAKE A FINGERTIP (last, above the rules that make them small):
|
|
2106
2104
|
the back arrow and «, the round "+", a box to tick and its line, an "i" that opens more, "Show more" under Recent. */
|
|
2107
2105
|
@media (pointer: coarse) {
|
|
2108
|
-
|
|
2106
|
+
header.topbar > :is(.topbar-fold, .topbar-lead-back) { width: 40px; height: 40px; }
|
|
2109
2107
|
button.as-add { width: 36px; height: 36px; }
|
|
2110
2108
|
:is(input[type=checkbox], input[type=radio]):not(.binder *) { width: 20px; height: 20px; }
|
|
2111
2109
|
.ts-row input[type=checkbox] { width: 24px; height: 24px; }
|
|
@@ -2395,28 +2393,48 @@ button.salon-welcome-btn[aria-pressed="true"] { color: var(--brass-ink); border-
|
|
|
2395
2393
|
.nc-card > .salon-members-tools { padding-bottom: 4px; }
|
|
2396
2394
|
.nc-card > .salon-host-box + *, .nc-card > .salon-member-list + * { border-top: 0; }
|
|
2397
2395
|
/* The list's button on each page of its own (03-11), as the conversation's. */
|
|
2398
|
-
/* THE TOP BAR of every page (03-11
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
.
|
|
2403
|
-
header.topbar > .fold
|
|
2404
|
-
|
|
2405
|
-
header.topbar >
|
|
2406
|
-
header.topbar > .
|
|
2407
|
-
header.topbar .bar-state { width:
|
|
2396
|
+
/* THE TOP BAR of every page (03-11; 06-11: kit.js TopBar, one look everywhere): a conversation's, a room's, their
|
|
2397
|
+
settings', Assets', Access', Settings', the deck's, a new conversation's -- the same height, padding, type, button
|
|
2398
|
+
and places. 'main' (a conversation, a room) has its views on the right; 'sub' (a page) its way back, last. */
|
|
2399
|
+
header.topbar { flex-shrink: 0; flex-wrap: nowrap; gap: 8px; box-sizing: border-box; height: 52px; min-height: 52px; padding: 0 12px; background: var(--bar); border-bottom: 1px solid var(--line); }
|
|
2400
|
+
header.topbar > :is(.topbar-fold, .topbar-lead-back) { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 36px; height: 36px; padding: 0; font-size: 1.125rem; line-height: 1; background: transparent; color: var(--ink2); border: 1px solid var(--line); border-radius: 8px; }
|
|
2401
|
+
header.topbar > :is(.topbar-fold, .topbar-lead-back):hover { color: var(--ink); border-color: var(--ink2); }
|
|
2402
|
+
header.topbar > .topbar-lead-back[hidden] { display: none; }
|
|
2403
|
+
@media (max-width: 700px) { header.topbar > .topbar-fold { display: none; } }
|
|
2404
|
+
@media (min-width: 701px) { header.topbar > .topbar-lead-back { display: none; } }
|
|
2405
|
+
header.topbar .bar-state, html:not([data-door="device"]) header.topbar #state { width: 10px; height: 10px; border-radius: 50%; flex: none; }
|
|
2406
|
+
header.topbar .bar-state { background: var(--ok); }
|
|
2407
|
+
header.topbar .bar-state[hidden] { display: none; }
|
|
2408
2408
|
/* A room one of whose AIs speaks now: its dot as a conversation's at work, the words under its name. */
|
|
2409
2409
|
header.topbar .bar-state[data-state="work"] { background: var(--brass); animation: breathe 1.7s ease-in-out infinite; }
|
|
2410
|
-
|
|
2410
|
+
header.topbar > .topbar-title { display: flex; flex-direction: column; justify-content: center; flex: 1 1 auto; min-width: 0; line-height: 1.25; }
|
|
2411
|
+
header.topbar .topbar-name { display: block; flex: none; min-width: 0; max-width: 100%; font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2412
|
+
header.topbar .topbar-sub { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .75rem; font-weight: 400; color: var(--ink2); overflow: hidden; white-space: nowrap; }
|
|
2413
|
+
header.topbar .topbar-sub > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
2414
|
+
header.topbar .topbar-sub [hidden] { display: none; }
|
|
2415
|
+
header.topbar > .bar-right { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; flex-wrap: nowrap; min-width: 0; margin-left: auto; }
|
|
2416
|
+
header.topbar .topbar-back { flex: none; min-height: 36px; white-space: nowrap; }
|
|
2417
|
+
header.topbar .views .icon-btn { width: auto; height: auto; }
|
|
2418
|
+
/* Its views (tabs, gear): one height in every bar. */
|
|
2419
|
+
header.topbar .views button { height: 32px; min-height: 32px; padding-block: 0; }
|
|
2420
|
+
@media (max-width: 700px) { header.topbar { height: 48px; min-height: 48px; padding: 0 8px; gap: 6px; } }
|
|
2421
|
+
/* A device's page (/c/): the same bar, its own controls may take a second line on a narrow screen (its menu "..."). */
|
|
2422
|
+
html[data-door="device"] header.topbar { height: auto; }
|
|
2423
|
+
/* A place's top bar stays at the top while its page scrolls (05-11), edge to edge over the page's own margins.
|
|
2424
|
+
(A page with a bar starts at its bar: no margin above it, so it sticks where it rests.) */
|
|
2425
|
+
:is(.sheet, #newconv, #salon-new):has(> header.topbar) { padding-top: 0; }
|
|
2426
|
+
.sheet > header.topbar { position: sticky; top: 0; z-index: 5; margin: 0 -14px 4px; }
|
|
2427
|
+
.sheet.as-place > header.topbar { margin: 0; }
|
|
2428
|
+
:is(#newconv, #salon-new) > header.topbar { margin: 0 -20px 4px; }
|
|
2429
|
+
@media (max-width: 700px) { #newconv > header.topbar { margin: 0 -16px 4px; } }
|
|
2430
|
+
/* A room: its name, who speaks now and who is in it on the line under it (a button that opens the list). */
|
|
2411
2431
|
#salon-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2412
2432
|
.salon-live { font-size: .75rem; font-weight: 400; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2413
2433
|
.salon-live[hidden] { display: none; }
|
|
2414
|
-
header.topbar .
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
#salon-new > header.topbar { margin: -14px -20px 4px; }
|
|
2419
|
-
@media (max-width: 700px) { #newconv > header.topbar { margin: -12px -16px 4px; } }
|
|
2434
|
+
header.topbar .topbar-sub .salon-who { display: inline-flex; align-items: center; gap: 6px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--ink2); font: inherit; cursor: pointer; }
|
|
2435
|
+
header.topbar .topbar-sub .salon-who:hover { color: var(--ink); }
|
|
2436
|
+
header.topbar .topbar-sub .salon-chip { width: 15px; height: 15px; margin-left: -4px; border-width: 1px; font-size: .5625rem; }
|
|
2437
|
+
header.topbar .topbar-sub .salon-chip:first-child { margin-left: 0; }
|
|
2420
2438
|
/* A room's row in the list (03-11): a conversation's row, with a small sign of a room before its name (Lucide « users »). */
|
|
2421
2439
|
.room-sign { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; background: var(--ink2);
|
|
2422
2440
|
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
@@ -2775,6 +2793,46 @@ button.kit-switch[aria-checked="true"]::after { left: 18px; background: var(--ok
|
|
|
2775
2793
|
.kit-conv-row .kit-conv-main > .kit-chips, .kit-conv-sub > .kit-chips { flex: none; margin: 0; gap: 6px; flex-wrap: nowrap; }
|
|
2776
2794
|
.kit-conv-row .kit-conv-main .kit-chip:not([data-tone="count"]) { border: 0; padding: 0; background: none; line-height: inherit; font-size: .75rem; }
|
|
2777
2795
|
|
|
2796
|
+
/* ONE ASSET (06-11, assets step 1: kit.js AssetIcon, AssetCard, RightsBadge, RightsPicker, Holders). Its sign on a
|
|
2797
|
+
tile of its kind's colour; a row (a list), a chip (a pill), a head (atop its panel). */
|
|
2798
|
+
.kit-asset-ic { --ka-ic: 30px; width: var(--ka-ic); height: var(--ka-ic); border-radius: 8px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, currentColor 12%, transparent); color: var(--brass-ink); }
|
|
2799
|
+
.kit-asset-ic svg { width: 57%; height: 57%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
2800
|
+
.kit-asset-ic[data-kind="git"] { color: color-mix(in srgb, var(--danger) 75%, var(--warn)); }
|
|
2801
|
+
.kit-asset-ic[data-kind="mailbox"] { color: var(--wait); }
|
|
2802
|
+
.kit-asset-ic[data-kind="agenda"], .kit-asset-ic[data-kind="contacts"] { color: color-mix(in srgb, var(--wait) 55%, var(--danger)); }
|
|
2803
|
+
.kit-asset-ic[data-kind="secret"], .kit-asset-ic[data-kind="acces"], .kit-asset-ic[data-kind="device"], .kit-asset-ic[data-kind="conversation"] { color: var(--ink2); }
|
|
2804
|
+
.kit-asset-ic[data-kind="list"] { color: var(--ok); }
|
|
2805
|
+
.kit-asset { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; color: var(--ink); }
|
|
2806
|
+
.kit-asset-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
|
|
2807
|
+
.kit-asset-name { min-width: 0; margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2808
|
+
.kit-asset-sub { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--ink2); font-size: .75rem; }
|
|
2809
|
+
.kit-asset-sub > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2810
|
+
.kit-asset-sub[data-state="problem"] { color: var(--danger); }
|
|
2811
|
+
.kit-asset-side { flex: none; display: flex; align-items: center; gap: 6px; }
|
|
2812
|
+
.kit-asset-row { width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; }
|
|
2813
|
+
.kit-asset-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
|
|
2814
|
+
.kit-asset-row[aria-current="true"] { background: color-mix(in srgb, var(--brass) 14%, transparent); }
|
|
2815
|
+
.kit-asset-chip { display: inline-flex; gap: 6px; max-width: 100%; padding: 2px 10px 2px 3px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: .8125rem; }
|
|
2816
|
+
.kit-asset-chip .kit-asset-ic { --ka-ic: 22px; border-radius: 50%; }
|
|
2817
|
+
.kit-asset-head { gap: 12px; align-items: flex-start; }
|
|
2818
|
+
.kit-asset-head .kit-asset-ic { --ka-ic: 38px; border-radius: 10px; }
|
|
2819
|
+
.kit-asset-head .kit-asset-name { font-size: 1.25rem; white-space: normal; overflow-wrap: anywhere; }
|
|
2820
|
+
.kit-asset-head .kit-asset-sub { font-size: .8125rem; }
|
|
2821
|
+
/* A RIGHT, READ: its tone by what it lets do (reads, changes, uses or watches, none). */
|
|
2822
|
+
.kit-rights { flex: none; padding: 1px 8px; border-radius: 999px; font-size: .6875rem; font-weight: 700; line-height: 1.6; white-space: nowrap; }
|
|
2823
|
+
.kit-rights[data-tone="r"] { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
|
|
2824
|
+
.kit-rights[data-tone="w"] { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
|
|
2825
|
+
.kit-rights[data-tone="x"] { color: var(--wait); background: color-mix(in srgb, var(--wait) 14%, transparent); }
|
|
2826
|
+
.kit-rights[data-tone="n"] { color: var(--ink2); background: color-mix(in srgb, var(--ink) 6%, transparent); }
|
|
2827
|
+
/* A RIGHT, SET: the Segmented, smaller; it wraps on a narrow screen rather than overflow. */
|
|
2828
|
+
.kit-rights-pick { flex: none; max-width: 100%; flex-wrap: wrap; }
|
|
2829
|
+
.kit-rights-pick > button { min-height: 30px; padding: 0 9px; font-size: .78125rem; font-weight: 600; }
|
|
2830
|
+
/* WHO HAS IT: initials over each other, then "+n"; nobody in grey. */
|
|
2831
|
+
.kit-holders { display: inline-flex; align-items: center; flex: none; }
|
|
2832
|
+
.kit-holders > .kit-av { --kc-av: 22px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel); }
|
|
2833
|
+
.kit-holders > .kit-av + .kit-av { margin-left: -6px; }
|
|
2834
|
+
.kit-holders-more, .kit-holders-none { margin-left: 4px; font-size: .75rem; color: var(--ink2); }
|
|
2835
|
+
|
|
2778
2836
|
/* A MAIL CITED BY ITS REFERENCE (06-11, app.js openMailRef): the same viewer, as a sheet over the thread --
|
|
2779
2837
|
from the bottom on a phone, a panel at the right on a wide screen; where it is now, one line; Reply. */
|
|
2780
2838
|
#viewer.viewer-sheet { padding: 0; align-items: flex-end; background: rgba(8, 11, 15, 0.45); }
|