clavarium 0.2.71-next.1 → 0.2.73-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 +10 -10
- package/package.json +3 -3
- package/server/oauth.mjs +15 -6
- package/web/app.js +90 -77
- package/web/index.html +1 -1
- package/web/style.css +27 -3
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.73-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.73-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
|
13
13
|
"@xterm/xterm": "^6.0.0",
|
|
14
14
|
"clavarium-binder": "0.1.8-next.1",
|
|
15
15
|
"clavarium-docket": "0.1.1",
|
|
16
|
-
"clavarium-parley": "0.17.
|
|
17
|
-
"clavarium-tether": "0.1.0-next.
|
|
16
|
+
"clavarium-parley": "0.17.11-next.1",
|
|
17
|
+
"clavarium-tether": "0.1.0-next.11",
|
|
18
18
|
"mermaid": "11.17.2",
|
|
19
19
|
"node-pty": "^1.1.0",
|
|
20
20
|
"pdfjs-dist": "6.4.299",
|
|
@@ -742,9 +742,9 @@
|
|
|
742
742
|
}
|
|
743
743
|
},
|
|
744
744
|
"node_modules/clavarium-parley": {
|
|
745
|
-
"version": "0.17.
|
|
746
|
-
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.
|
|
747
|
-
"integrity": "sha512-
|
|
745
|
+
"version": "0.17.11-next.1",
|
|
746
|
+
"resolved": "https://registry.npmjs.org/clavarium-parley/-/clavarium-parley-0.17.11-next.1.tgz",
|
|
747
|
+
"integrity": "sha512-IHGgFbDzHjrNVRcSR/KudWPUfvKxCeu03bNXE8+84lLMGHL7LyaiIg+iuw/cXMq4etz5BVXddVA/DGDoTUFO3A==",
|
|
748
748
|
"license": "MIT",
|
|
749
749
|
"bin": {
|
|
750
750
|
"parley": "bin/parley.mjs",
|
|
@@ -755,9 +755,9 @@
|
|
|
755
755
|
}
|
|
756
756
|
},
|
|
757
757
|
"node_modules/clavarium-tether": {
|
|
758
|
-
"version": "0.1.0-next.
|
|
759
|
-
"resolved": "https://registry.npmjs.org/clavarium-tether/-/clavarium-tether-0.1.0-next.
|
|
760
|
-
"integrity": "sha512-
|
|
758
|
+
"version": "0.1.0-next.11",
|
|
759
|
+
"resolved": "https://registry.npmjs.org/clavarium-tether/-/clavarium-tether-0.1.0-next.11.tgz",
|
|
760
|
+
"integrity": "sha512-GiLaCXmANy8OsiTacZIe5n+UUK+Lw33QzonZkU+vTVSx8X5g4fF4hzUkfRmpXWMDVWMuvTvptL/qIrJNbXJ9+Q==",
|
|
761
761
|
"license": "MIT",
|
|
762
762
|
"bin": {
|
|
763
763
|
"tether": "bin/cli.mjs",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.73-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@xterm/xterm": "^6.0.0",
|
|
47
47
|
"clavarium-binder": "0.1.8-next.1",
|
|
48
48
|
"clavarium-docket": "0.1.1",
|
|
49
|
-
"clavarium-parley": "0.17.
|
|
50
|
-
"clavarium-tether": "0.1.0-next.
|
|
49
|
+
"clavarium-parley": "0.17.11-next.1",
|
|
50
|
+
"clavarium-tether": "0.1.0-next.11",
|
|
51
51
|
"mermaid": "11.17.2",
|
|
52
52
|
"node-pty": "^1.1.0",
|
|
53
53
|
"pdfjs-dist": "6.4.299",
|
package/server/oauth.mjs
CHANGED
|
@@ -35,10 +35,16 @@ import { createHash, randomBytes } from 'node:crypto';
|
|
|
35
35
|
|
|
36
36
|
const b64url = (buf) => Buffer.from(buf).toString('base64url');
|
|
37
37
|
|
|
38
|
-
/* Per-provider endpoints, the scopes we may ask for by kind, and
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
/* Per-provider endpoints, the scopes we may ask for by kind, and a built-in,
|
|
39
|
+
already-verified open-source desktop client as the default (the `thunderbird`
|
|
40
|
+
field, kept by that name for its callers). WHICH client matters: a client is
|
|
41
|
+
only granted the scopes its app was verified for. For GOOGLE we borrow GNOME
|
|
42
|
+
Online Accounts' client, verified for mail AND calendar AND contacts, so one
|
|
43
|
+
consent gives all three. For MICROSOFT we use Thunderbird's client, verified
|
|
44
|
+
for mail (IMAP) only; Microsoft calendar/contacts go over Graph and need a
|
|
45
|
+
Graph-verified client -- see card #110. `consentExtra` is what a provider
|
|
46
|
+
needs on the consent URL to return a refresh token; `offlineScope` is the same
|
|
47
|
+
thing when it is a scope rather than a parameter (Microsoft). */
|
|
42
48
|
export const PROVIDERS = {
|
|
43
49
|
google: {
|
|
44
50
|
label: 'Google',
|
|
@@ -52,9 +58,12 @@ export const PROVIDERS = {
|
|
|
52
58
|
calendar: 'https://www.googleapis.com/auth/calendar',
|
|
53
59
|
contacts: 'https://www.googleapis.com/auth/carddav',
|
|
54
60
|
},
|
|
61
|
+
/* GNOME Online Accounts' built-in client (open source, embedded secret
|
|
62
|
+
sanctioned by Google for an installed app). Verified for mail,
|
|
63
|
+
calendar and contacts -- unlike Thunderbird's, which carries mail only. */
|
|
55
64
|
thunderbird: {
|
|
56
|
-
clientId: '
|
|
57
|
-
clientSecret: '
|
|
65
|
+
clientId: '44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s.apps.googleusercontent.com',
|
|
66
|
+
clientSecret: '-gMLuQyDiI0XrQS_vx_mhuYF',
|
|
58
67
|
},
|
|
59
68
|
},
|
|
60
69
|
microsoft: {
|
package/web/app.js
CHANGED
|
@@ -3269,15 +3269,16 @@
|
|
|
3269
3269
|
const members = (g.members ?? []).map((k) => byKey.get(k)).filter(Boolean);
|
|
3270
3270
|
const folded = groupsFolded.has(g.id);
|
|
3271
3271
|
const head = el('div', 'as-kind-head as-group-head'); if (folded) head.dataset.folded = 'true';
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3272
|
+
/* The whole header folds/unfolds the group; a gear opens its settings. */
|
|
3273
|
+
const toggle = el('button', 'as-group-name'); toggle.type = 'button';
|
|
3274
|
+
if (`group:${g.id}` === chosen) toggle.setAttribute('aria-current', 'true');
|
|
3275
|
+
toggle.setAttribute('aria-expanded', String(!folded));
|
|
3276
|
+
toggle.append(el('span', 'as-chev', folded ? '▸' : '▾'), el('h3', '', g.label), el('span', 'as-badge count', String(members.length)));
|
|
3277
|
+
toggle.title = folded ? 'Unfold' : 'Fold';
|
|
3278
|
+
toggle.addEventListener('click', () => { if (folded) groupsFolded.delete(g.id); else groupsFolded.add(g.id); keepGroupsFolded(); void paintAssets(); });
|
|
3279
|
+
const gear = el('button', 'as-gear', '⚙'); gear.type = 'button'; gear.setAttribute('aria-label', `Settings for ${g.label}`); gear.title = 'Give, rename, remove';
|
|
3280
|
+
gear.addEventListener('click', (e) => { e.stopPropagation(); choose(`group:${g.id}`); });
|
|
3281
|
+
head.append(toggle, gear);
|
|
3281
3282
|
section(head, members, 'Empty. Open an asset to put it here.', { foldable: true });
|
|
3282
3283
|
}
|
|
3283
3284
|
const grouped = new Set(groups.flatMap((g) => g.members ?? []));
|
|
@@ -3286,33 +3287,20 @@
|
|
|
3286
3287
|
section(looseHead, loose, groups.length ? 'Every asset is in a group.' : 'Make a group above, then open an asset to put it in it.');
|
|
3287
3288
|
if (items.length === 0 && empty) holder.append(el('p', 'hint', empty));
|
|
3288
3289
|
}
|
|
3289
|
-
/*
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
return level; // folder, git, list: none/read/write line up
|
|
3298
|
-
}
|
|
3290
|
+
/* The level buttons an asset takes, by its type (same sets as its own detail). */
|
|
3291
|
+
const levelOptionsFor = (item) => (item.target ? [['none', 'Off'], ['watch', 'Watch'], ['propose', 'Propose'], ['frame', 'Frame'], ['free', 'Free']]
|
|
3292
|
+
: item.kind === 'secret' ? [['off', 'Off'], ['use', 'Use']]
|
|
3293
|
+
: item.kind === 'mailbox' ? [['none', 'Off'], ['read', 'Read']]
|
|
3294
|
+
: [['none', 'Off'], ['read', 'Read'], ['write', 'Write']]);
|
|
3295
|
+
/* The shortcut "give all": each member at the lightest real level for its type. */
|
|
3296
|
+
const giveValue = (item, on) => (!on ? (item.target || item.kind !== 'secret' ? 'none' : 'off')
|
|
3297
|
+
: item.target ? 'watch' : item.kind === 'secret' ? 'use' : 'read');
|
|
3299
3298
|
async function applyMemberGrant(item, conversationName, value) {
|
|
3300
3299
|
if (item.target) return grantTarget(item.target.id, conversationName, value);
|
|
3301
3300
|
if (item.kind === 'secret') return handTo(conversationName, item.name, value === 'use', 'assets-error');
|
|
3302
3301
|
if (item.kind === 'list') return grantList(item.list.id, conversationName, value);
|
|
3303
3302
|
return attachTo(conversationName, item.name, value, 'assets-error');
|
|
3304
3303
|
}
|
|
3305
|
-
/* The group's single level for a conversation, read back from its members:
|
|
3306
|
-
none if all are off, write if any member is given write, else read. */
|
|
3307
|
-
function groupLevelFor(members, conversationName) {
|
|
3308
|
-
let any = false; let write = false;
|
|
3309
|
-
for (const item of members) {
|
|
3310
|
-
const v = memberCurrent(item, conversationName);
|
|
3311
|
-
if (!['none', 'off'].includes(v)) any = true;
|
|
3312
|
-
if (['write', 'rw', 'frame', 'free'].includes(v)) write = true;
|
|
3313
|
-
}
|
|
3314
|
-
return write ? 'write' : any ? 'read' : 'none';
|
|
3315
|
-
}
|
|
3316
3304
|
function memberCurrent(item, conversationName) {
|
|
3317
3305
|
const id = `conversation:${conversationName}`;
|
|
3318
3306
|
if (item.target) return item.target.grants?.[id]?.level ?? 'none';
|
|
@@ -3359,57 +3347,78 @@
|
|
|
3359
3347
|
const h = el('h2'); h.append(el('span', '', group.label), el('span', 'as-badge count', String(members.length)));
|
|
3360
3348
|
top.append(all, h);
|
|
3361
3349
|
detail.append(top);
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3350
|
+
const repaint = () => void paintAssets();
|
|
3351
|
+
const openAsset = (key) => { placeAssetStep(); if (key !== assetOpen) groupGiveShow.clear(); assetOpen = key; remember(); void paintAssets(); };
|
|
3352
|
+
|
|
3353
|
+
/* GIVE THE GROUP: a block per conversation, a row per asset AT ITS OWN
|
|
3354
|
+
level. Two shortcuts set or clear all at once (not a sticky state).
|
|
3355
|
+
Rights stay stored per asset -- this is just a handy place to set them. */
|
|
3356
|
+
const ready = conversations.filter((c) => c.phase === 'ready');
|
|
3357
|
+
const isGiven = (c) => members.some((m) => !['none', 'off'].includes(memberCurrent(m, c.name)));
|
|
3358
|
+
const shownConvs = ready.filter((c) => isGiven(c) || groupGiveShow.has(c.name));
|
|
3359
|
+
const setAll = async (c, on) => { for (const m of members) { try { await applyMemberGrant(m, c.name, giveValue(m, on)); } catch { /* shown by the grant */ } } repaint(); };
|
|
3360
|
+
const convBlock = (c) => {
|
|
3361
|
+
const block = el('div', 'as-give-conv');
|
|
3362
|
+
const head = el('div', 'as-give-head');
|
|
3363
|
+
const giveAll = el('button', 'as-mini', 'Give all'); giveAll.type = 'button'; giveAll.addEventListener('click', () => setAll(c, true));
|
|
3364
|
+
const clearAll = el('button', 'as-mini', 'Remove all'); clearAll.type = 'button'; clearAll.addEventListener('click', () => setAll(c, false));
|
|
3365
|
+
head.append(el('b', '', shownName(c)), el('span', 'as-give-acts', ''));
|
|
3366
|
+
head.lastChild.append(giveAll, clearAll);
|
|
3367
|
+
block.append(head);
|
|
3368
|
+
for (const m of members) {
|
|
3369
|
+
const line = el('div', 'as-give-row');
|
|
3370
|
+
const nm = el('span', 'as-give-name'); nm.append(kindIcon(m.kind), el('span', '', m.name));
|
|
3371
|
+
line.append(nm, modes(levelOptionsFor(m), memberCurrent(m, c.name), async (v) => { await applyMemberGrant(m, c.name, v); repaint(); }, `${m.name} for ${shownName(c)}`));
|
|
3372
|
+
block.append(line);
|
|
3373
|
+
}
|
|
3374
|
+
if (members.length === 0) block.append(el('p', 'hint', 'The group is empty.'));
|
|
3375
|
+
return block;
|
|
3376
|
+
};
|
|
3377
|
+
detail.append(chapter('Give the group to a conversation'));
|
|
3378
|
+
const giveBox = el('div', 'as-give');
|
|
3379
|
+
for (const c of shownConvs) giveBox.append(convBlock(c));
|
|
3380
|
+
if (shownConvs.length === 0) giveBox.append(el('p', 'hint', members.length ? 'Not given to any conversation yet.' : 'Add assets to the group first (open an asset, pick this group).'));
|
|
3381
|
+
detail.append(giveBox);
|
|
3382
|
+
/* Add a conversation to set up, even before any asset is given to it. */
|
|
3383
|
+
const others = ready.filter((c) => !shownConvs.includes(c));
|
|
3384
|
+
const addConv = el('button', 'as-link as-add-conv', '+ a conversation'); addConv.type = 'button';
|
|
3385
|
+
const picker = el('div', 'as-pick'); picker.hidden = true;
|
|
3386
|
+
for (const c of others) { const b = el('button', 'as-pick-conv', shownName(c)); b.type = 'button'; b.addEventListener('click', () => { groupGiveShow.add(c.name); repaint(); }); picker.append(b); }
|
|
3387
|
+
if (others.length === 0) picker.append(el('p', 'hint', ready.length ? 'Every conversation is shown.' : 'No conversation is ready.'));
|
|
3388
|
+
addConv.addEventListener('click', () => { picker.hidden = !picker.hidden; });
|
|
3389
|
+
if (members.length) detail.append(addConv, picker);
|
|
3390
|
+
const note = el('p', 'as-assoc hint');
|
|
3391
|
+
note.append(el('b', '', 'Per asset'), document.createTextNode(': each keeps the levels of its own type (a mailbox reads, a secret is used, a connexion watches…). The two shortcuts just set or clear all at once; each row stays editable, and the right is stored per asset.'));
|
|
3392
|
+
detail.append(note);
|
|
3393
|
+
|
|
3394
|
+
/* The assets in the group, each opens its own detail. */
|
|
3395
|
+
detail.append(chapter('Assets in the group'));
|
|
3396
|
+
const rowsBox = el('div', 'as-group-members');
|
|
3397
|
+
for (const m of members) rowsBox.append(assetRow(m, { chosen: '', choose: openAsset }));
|
|
3398
|
+
if (members.length === 0) rowsBox.append(el('p', 'hint', 'Open an asset and pick this group to put it here.'));
|
|
3399
|
+
detail.append(rowsBox);
|
|
3400
|
+
|
|
3401
|
+
/* Rename, then remove (a plain link -- it only drops the grouping). */
|
|
3402
|
+
detail.append(chapter('Name'));
|
|
3403
|
+
const form = el('form', 'as-group-rename'); form.autocomplete = 'off';
|
|
3365
3404
|
const name = el('input'); name.value = group.label; name.maxLength = 40; name.setAttribute('aria-label', 'Group name');
|
|
3366
|
-
const go = el('button', '', 'Rename'); go.type = 'submit';
|
|
3367
|
-
|
|
3368
|
-
const control = el('div', 'set-control'); control.append(name, go);
|
|
3369
|
-
form.append(what, control);
|
|
3405
|
+
const go = el('button', 'btn', 'Rename'); go.type = 'submit';
|
|
3406
|
+
form.append(name, go);
|
|
3370
3407
|
form.addEventListener('submit', async (event) => {
|
|
3371
3408
|
event.preventDefault(); $('assets-error').hidden = true;
|
|
3372
|
-
try { await post(`${API}/asset-groups/${group.id}/rename`, { label: name.value.trim() }); }
|
|
3373
|
-
|
|
3374
|
-
void paintAssets();
|
|
3409
|
+
try { await post(`${API}/asset-groups/${group.id}/rename`, { label: name.value.trim() }); } catch (error) { $('assets-error').textContent = error.message; $('assets-error').hidden = false; }
|
|
3410
|
+
repaint();
|
|
3375
3411
|
});
|
|
3376
|
-
|
|
3412
|
+
detail.append(form);
|
|
3413
|
+
const remove = el('div', 'as-group-remove');
|
|
3414
|
+
const del = el('button', 'as-remove-link', 'Remove the group'); del.type = 'button';
|
|
3377
3415
|
del.addEventListener('click', async () => {
|
|
3378
3416
|
$('assets-error').hidden = true;
|
|
3379
|
-
try { await post(`${API}/asset-groups/${group.id}/remove`, {}); assetOpen = ''; remember(); }
|
|
3380
|
-
|
|
3381
|
-
void paintAssets();
|
|
3417
|
+
try { await post(`${API}/asset-groups/${group.id}/remove`, {}); groupGiveShow.clear(); assetOpen = ''; remember(); } catch (error) { $('assets-error').textContent = error.message; $('assets-error').hidden = false; }
|
|
3418
|
+
repaint();
|
|
3382
3419
|
});
|
|
3383
|
-
|
|
3384
|
-
detail.append(
|
|
3385
|
-
/* Give the whole group. none / read / write turned into each type's own
|
|
3386
|
-
default; each asset keeps its own right after (set one by one above). */
|
|
3387
|
-
const ready = conversations.filter((c) => c.phase === 'ready');
|
|
3388
|
-
const give = async (c, level) => {
|
|
3389
|
-
for (const item of members) { try { await applyMemberGrant(item, c.name, memberGrantValue(item, level)); } catch { /* error shown by the grant; keep going */ } }
|
|
3390
|
-
await paintAssets();
|
|
3391
|
-
};
|
|
3392
|
-
const row = (c) => {
|
|
3393
|
-
const line = el('div', 'given-row'); line.dataset.conversation = c.name;
|
|
3394
|
-
line.append(el('span', '', shownName(c)), modes(GROUP_LEVELS, groupLevelFor(members, c.name), (v) => give(c, v), `Give ${group.label} to ${c.name}`));
|
|
3395
|
-
return line;
|
|
3396
|
-
};
|
|
3397
|
-
const using = ready.filter((c) => groupLevelFor(members, c.name) !== 'none');
|
|
3398
|
-
const others = ready.filter((c) => groupLevelFor(members, c.name) === 'none');
|
|
3399
|
-
const givenBox = el('div', 'as-users'); const picker = el('div', 'as-users as-picker'); picker.hidden = true;
|
|
3400
|
-
for (const c of using) givenBox.append(row(c));
|
|
3401
|
-
if (using.length === 0) givenBox.append(el('p', 'hint', members.length ? 'No conversation has the group.' : 'The group is empty.'));
|
|
3402
|
-
for (const c of others) picker.append(row(c));
|
|
3403
|
-
if (others.length === 0) picker.append(el('p', 'hint', ready.length ? 'Every conversation has it.' : 'No conversation is ready.'));
|
|
3404
|
-
detail.append(chapter('Give the group to a conversation', roundPlus('Give the group to a conversation', () => { picker.hidden = !picker.hidden; })), givenBox, picker);
|
|
3405
|
-
const note = el('p', 'as-assoc hint');
|
|
3406
|
-
note.append(el('b', '', 'Per type'), document.createTextNode(': repositories and folders read or write, a mailbox reads, a secret is used, a connexion is given at the matching level. Each asset keeps its own right, set one by one.'));
|
|
3407
|
-
detail.append(note);
|
|
3408
|
-
/* The members, each opens its own detail. */
|
|
3409
|
-
const rowsBox = el('div', 'as-group-members');
|
|
3410
|
-
for (const item of members) rowsBox.append(assetRow(item, { chosen: '', choose: (key) => { placeAssetStep(); assetOpen = key; remember(); void paintAssets(); } }));
|
|
3411
|
-
if (members.length === 0) rowsBox.append(el('p', 'hint', 'Open an asset and pick this group to put it here.'));
|
|
3412
|
-
detail.append(chapter('Assets in the group'), rowsBox);
|
|
3420
|
+
remove.append(del, el('p', 'hint', 'The assets stay; only the group is removed.'));
|
|
3421
|
+
detail.append(remove);
|
|
3413
3422
|
}
|
|
3414
3423
|
/* The top of a detail: "All assets" (a phone), the icon, the name, a badge. */
|
|
3415
3424
|
function asTitle(item, back) {
|
|
@@ -4011,6 +4020,10 @@
|
|
|
4011
4020
|
const keepAssetsBy = () => { try { localStorage.setItem('clavarium-assets-by', assetsBy); } catch { /* as above */ } };
|
|
4012
4021
|
/* The "+ New group" inline form being shown in the by-group view. */
|
|
4013
4022
|
let groupAdding = false;
|
|
4023
|
+
/* Conversations shown in a group's "give" settings although none of its
|
|
4024
|
+
assets is given to them yet (the owner just added them to set levels).
|
|
4025
|
+
Cleared when the open group changes. */
|
|
4026
|
+
const groupGiveShow = new Set();
|
|
4014
4027
|
/* A binder opened in Assets: its screen, the card of the address (a reload); a card, a step (binderSteps). */
|
|
4015
4028
|
let assetsView = null; let assetsAt = null;
|
|
4016
4029
|
const assetsSteps = binderSteps(() => assetsView, { address: () => remember() });
|
|
@@ -4086,7 +4099,7 @@
|
|
|
4086
4099
|
$('assets-as').dataset.open = chosen || chosenGroup || assetsAdding ? 'detail' : 'list';
|
|
4087
4100
|
/* The "by type / by group" toggle sits above the rows (built once, kept). */
|
|
4088
4101
|
paintAssetsView();
|
|
4089
|
-
const choose = (key) => { placeAssetStep(); assetOpen = key; assetsAdding = ''; remoteEditing = false; remember(); void paintAssets(); };
|
|
4102
|
+
const choose = (key) => { placeAssetStep(); if (key !== assetOpen) groupGiveShow.clear(); assetOpen = key; assetsAdding = ''; remoteEditing = false; remember(); void paintAssets(); };
|
|
4090
4103
|
if (assetsBy === 'group') {
|
|
4091
4104
|
paintAsGroups($('assets-rows'), shown, assetGroups, { chosen: chosen?.key ?? (chosenGroup ? `group:${chosenGroup.id}` : ''), choose, empty: assetsQuery ? 'Nothing by that name.' : '' });
|
|
4092
4105
|
} else {
|
|
@@ -6169,8 +6182,8 @@
|
|
|
6169
6182
|
$('connexion-error').hidden = true;
|
|
6170
6183
|
const who = MAILBOX_PROVIDER[provider];
|
|
6171
6184
|
$('connexion-notice').textContent = google
|
|
6172
|
-
?
|
|
6173
|
-
: 'Clavarium signs in as Thunderbird — that is what Microsoft sees. Mail
|
|
6185
|
+
? "Clavarium signs in with GNOME Online Accounts' app — that is what Google sees. Mail, calendar and contacts can be connected together."
|
|
6186
|
+
: 'Clavarium signs in as Thunderbird — that is what Microsoft sees. Mail for now; calendar and contacts are coming.';
|
|
6174
6187
|
$('connexion-open').textContent = `Open the ${who} sign-in page`;
|
|
6175
6188
|
};
|
|
6176
6189
|
for (const b of $('connexion-provider').querySelectorAll('button')) b.addEventListener('click', () => setConnexionProvider(b.dataset.provider));
|
package/web/index.html
CHANGED
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
</form>
|
|
532
532
|
</div>
|
|
533
533
|
<div id="connexion-box" class="as-form" data-kind="connexion"><h3>Connect an account</h3>
|
|
534
|
-
<div class="hint">A live link to a mailbox, calendar or address book. The agent uses it through Tether, within the rights you give; the account's token stays on the server and never enters a machine. <details class="more"><summary>How the sign-in works</summary><span>Clavarium signs in
|
|
534
|
+
<div class="hint">A live link to a mailbox, calendar or address book. The agent uses it through Tether, within the rights you give; the account's token stays on the server and never enters a machine. <details class="more"><summary>How the sign-in works</summary><span>Clavarium signs in by borrowing a trusted open-source desktop app's sign-in — that is what the provider sees. You sign in in your own browser; Clavarium never sees your password, and keeps only a token it uses on your behalf.</span></details></div>
|
|
535
535
|
<form id="connexion-new" autocomplete="off" data-provider="google">
|
|
536
536
|
<div id="connexion-provider" class="choices" role="group" aria-label="Kind of account">
|
|
537
537
|
<button type="button" data-provider="google" aria-pressed="true">Google</button>
|
package/web/style.css
CHANGED
|
@@ -167,6 +167,8 @@ code { font-family: ui-monospace, Menlo, Consolas, monospace; }
|
|
|
167
167
|
.check { font-size: .8125rem; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
|
|
168
168
|
.check.off { opacity: .5; }
|
|
169
169
|
#connexion-kinds { gap: 16px; }
|
|
170
|
+
/* The Google / Microsoft choice shows which is selected. */
|
|
171
|
+
#connexion-provider button[aria-pressed="true"] { border-color: var(--brass); color: var(--brass-ink); background: rgba(210, 169, 78, .16); }
|
|
170
172
|
footer#keys { border-top: 0; }
|
|
171
173
|
#voice-line { margin: 0; padding: 5px 12px; font-size: .8125rem; color: var(--ink2); background: var(--bar); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
|
|
172
174
|
#voice-line::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--ok); }
|
|
@@ -1115,12 +1117,34 @@ header .ic, #folders .ic { width: 18px; height: 18px; fill: none; stroke: curren
|
|
|
1115
1117
|
/* The by-group view: make-a-group bar, a group's name button, its inline editor. */
|
|
1116
1118
|
.as-group-new { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; }
|
|
1117
1119
|
.as-group-new .hint { color: var(--ink2); }
|
|
1118
|
-
.as-group-head { gap:
|
|
1119
|
-
.as-chev { flex: 0 0 auto; width:
|
|
1120
|
-
.as-group-name { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; justify-content: flex-start; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; padding:
|
|
1120
|
+
.as-group-head { gap: 4px; }
|
|
1121
|
+
.as-chev { flex: 0 0 auto; width: 16px; text-align: center; color: var(--ink2); font-size: .72rem; }
|
|
1122
|
+
.as-group-name { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; justify-content: flex-start; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 3px 6px; }
|
|
1121
1123
|
.as-group-name:hover { border-color: var(--line); }
|
|
1122
1124
|
.as-group-name[aria-current="true"] { background: var(--panel); border-color: var(--line); }
|
|
1125
|
+
.as-gear { flex: 0 0 auto; width: 30px; height: 30px; min-width: 0 !important; min-height: 0 !important; padding: 0; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--ink2); font-size: 1rem; opacity: 0; }
|
|
1126
|
+
.as-group-head:hover .as-gear, .as-group-name[aria-current="true"] + .as-gear { opacity: 1; }
|
|
1127
|
+
.as-gear:hover { border-color: var(--line); color: var(--ink); }
|
|
1123
1128
|
.as-group-members { display: flex; flex-direction: column; gap: 2px; }
|
|
1129
|
+
/* Give the group: a block per conversation, a row per asset at its own level. */
|
|
1130
|
+
.as-give { display: flex; flex-direction: column; gap: 12px; }
|
|
1131
|
+
.as-give-conv { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
|
|
1132
|
+
.as-give-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
|
|
1133
|
+
.as-give-acts { display: flex; gap: 6px; }
|
|
1134
|
+
.as-mini { font-size: .72rem; padding: 3px 8px; border-radius: 7px; background: transparent; color: var(--ink2); }
|
|
1135
|
+
.as-mini:hover { border-color: var(--line); color: var(--ink); }
|
|
1136
|
+
.as-give-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; }
|
|
1137
|
+
.as-give-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
1138
|
+
.as-give-name > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1139
|
+
.as-give-row .levels button { padding: 4px 9px; font-size: .78rem; }
|
|
1140
|
+
.as-add-conv { align-self: flex-start; }
|
|
1141
|
+
.as-pick { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
1142
|
+
.as-pick-conv { font-size: .82rem; padding: 5px 10px; border-radius: 8px; }
|
|
1143
|
+
.as-group-rename { display: flex; gap: 8px; align-items: center; }
|
|
1144
|
+
.as-group-rename input { flex: 1 1 8rem; min-width: 0; padding: 7px 10px; border-radius: 8px; }
|
|
1145
|
+
.as-group-remove { margin-top: 6px; }
|
|
1146
|
+
.as-remove-link { background: transparent; border: 0; color: var(--danger); text-decoration: underline; padding: 2px 0; font: inherit; font-size: .82rem; }
|
|
1147
|
+
.as-group-remove .hint { margin: 2px 0 0; }
|
|
1124
1148
|
.as-group-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
|
|
1125
1149
|
.as-group-form input { flex: 1 1 8rem; min-width: 0; padding: 6px 9px; border-radius: 8px; }
|
|
1126
1150
|
.as-group-form button { font-size: .8125rem; }
|