clavarium 0.2.383-next.1 → 0.2.384-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/gitkeeper.mjs +2 -1
- package/server/settingswords.mjs +12 -0
- package/web/app.js +8 -8
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.384-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.384-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/server/gitkeeper.mjs
CHANGED
|
@@ -190,7 +190,8 @@ export function withoutOldSetting(record) {
|
|
|
190
190
|
/* WHAT TO DO about a refused automatic sending, said after it in the chat;
|
|
191
191
|
by the reason #once is given (its first word when not listed whole). */
|
|
192
192
|
const TODO = Object.freeze({
|
|
193
|
-
|
|
193
|
+
/* 07-11: where it is set, said (the owner asked « on configure ça où ? »). */
|
|
194
|
+
cap: 'Raise the cap in this conversation: Assets, the repository, Automatic sending, « Sendings an hour ». Or send it from the review.',
|
|
194
195
|
create: 'Make the branch on the remote, send it from the review, or let this conversation create branches.',
|
|
195
196
|
'checks-failed': 'The agent was told; see the checks in the review.',
|
|
196
197
|
'checks-none': 'Set a check command or a pre-push hook, or stop asking for checks for this conversation.',
|
package/server/settingswords.mjs
CHANGED
|
@@ -26,6 +26,18 @@ export const SETTINGS_WORDS_FR = {
|
|
|
26
26
|
'set-update-out': '{v} est sortie', 'set-up-to-date': 'À jour · {v}', 'set-wifi-on': 'Wi-Fi · {name}', 'set-wifi-off': 'Wi-Fi non utilisé', 'set-cable': 'Câble',
|
|
27
27
|
/* A room message an AI could not get (its chat off): rooms.mjs say, missed. */
|
|
28
28
|
'set-room-missed': '{names} ne l\'a pas reçu : discussion coupée',
|
|
29
|
+
/* A repository's automatic sending (gitkeeper.mjs), in a conversation's Assets. */
|
|
30
|
+
'set-auto-title': 'Envoi automatique',
|
|
31
|
+
'set-auto-branches': 'Branches envoyées seules (vide : jamais)',
|
|
32
|
+
'set-auto-quiet': 'Délai de calme, en secondes',
|
|
33
|
+
'set-auto-hour': 'Envois par heure, au plus (0 : sans limite)',
|
|
34
|
+
'set-auto-create': 'Peut créer une branche absente du distant',
|
|
35
|
+
'set-auto-checks': 'Seulement après les vérifications',
|
|
36
|
+
'set-auto-off': 'désactivé',
|
|
37
|
+
'set-auto-on': 'activé : {list}',
|
|
38
|
+
'set-auto-saved': 'Enregistré.',
|
|
39
|
+
'set-auto-save': 'Enregistrer',
|
|
40
|
+
'set-auto-confirm': 'Confirmer et enregistrer',
|
|
29
41
|
/* A box's learning session (boxcollect.mjs): the radio, its false wakes kept. */
|
|
30
42
|
'set-collect': 'Séance d\'apprentissage (radio)', 'set-collect-from': 'de', 'set-collect-to': 'à',
|
|
31
43
|
'set-collect-go': 'Programmer', 'set-collect-stop': 'Arrêter', 'set-collect-scheduled': 'Programmée de {from} à {to}',
|
package/web/app.js
CHANGED
|
@@ -2328,7 +2328,7 @@
|
|
|
2328
2328
|
const box = document.createElement('details'); box.className = 'auto-send'; box.dataset.repository = name;
|
|
2329
2329
|
box.open = autoOpen.has(`${conversation}/${name}`);
|
|
2330
2330
|
box.addEventListener('toggle', () => { if (box.open) autoOpen.add(`${conversation}/${name}`); else autoOpen.delete(`${conversation}/${name}`); });
|
|
2331
|
-
const summary = document.createElement('summary'); summary.textContent = 'Automatic sending';
|
|
2331
|
+
const summary = document.createElement('summary'); summary.textContent = uiSaid('set-auto-title', 'Automatic sending');
|
|
2332
2332
|
const state = document.createElement('small'); state.className = 'hint auto-state'; summary.append(' ', state);
|
|
2333
2333
|
const form = document.createElement('form'); form.autocomplete = 'off';
|
|
2334
2334
|
const field = (text, input) => { const label = document.createElement('label'); label.textContent = text; label.append(input); return label; };
|
|
@@ -2345,23 +2345,23 @@
|
|
|
2345
2345
|
const unknown = document.createElement('p'); unknown.className = 'hint auto-unknown'; unknown.hidden = true;
|
|
2346
2346
|
unknown.textContent = 'The remote\'s default branch is not known yet (it is learnt at a refresh): until it is, nothing is sent by itself unless you confirm each branch or pattern of the list.';
|
|
2347
2347
|
const shared = document.createElement('p'); shared.className = 'hint auto-shared'; shared.hidden = true;
|
|
2348
|
-
const sure = document.createElement('button'); sure.type = 'button'; sure.className = 'danger auto-sure'; sure.textContent = 'Confirm and save'; sure.hidden = true;
|
|
2349
|
-
const save = document.createElement('button'); save.type = 'submit'; save.className = 'primary'; save.textContent = 'Save';
|
|
2348
|
+
const sure = document.createElement('button'); sure.type = 'button'; sure.className = 'danger auto-sure'; sure.textContent = uiSaid('set-auto-confirm', 'Confirm and save'); sure.hidden = true;
|
|
2349
|
+
const save = document.createElement('button'); save.type = 'submit'; save.className = 'primary'; save.textContent = uiSaid('set-auto-save', 'Save');
|
|
2350
2350
|
const said = document.createElement('span'); said.className = 'hint auto-said'; said.setAttribute('role', 'status');
|
|
2351
2351
|
const actions = document.createElement('div'); actions.className = 'row'; actions.append(save, sure, said);
|
|
2352
2352
|
/* Closed until the settings there are have arrived: a list typed
|
|
2353
2353
|
before would be overwritten by them. */
|
|
2354
2354
|
const fields = document.createElement('fieldset'); fields.disabled = true;
|
|
2355
2355
|
form.append(fields);
|
|
2356
|
-
fields.append(field('Branches it may send to by itself (one per line or comma, "try/*" allowed). Empty: never.', branches), hint,
|
|
2357
|
-
field('Quiet delay, in seconds', quiet), field('Sendings an hour, at most (0: no cap)', perHour),
|
|
2358
|
-
check('It may create a branch the remote does not have', create), check('Only after the checks passed in its machine', checks), unknown, shared, asking, actions);
|
|
2356
|
+
fields.append(field(uiSaid('set-auto-branches', 'Branches it may send to by itself (one per line or comma, "try/*" allowed). Empty: never.'), branches), hint,
|
|
2357
|
+
field(uiSaid('set-auto-quiet', 'Quiet delay, in seconds'), quiet), field(uiSaid('set-auto-hour', 'Sendings an hour, at most (0: no cap)'), perHour),
|
|
2358
|
+
check(uiSaid('set-auto-create', 'It may create a branch the remote does not have'), create), check(uiSaid('set-auto-checks', 'Only after the checks passed in its machine'), checks), unknown, shared, asking, actions);
|
|
2359
2359
|
box.append(summary, form);
|
|
2360
2360
|
const fill = (about) => {
|
|
2361
2361
|
const s = about.settings;
|
|
2362
2362
|
branches.value = s.branches.join('\n'); quiet.value = String(s.quietSeconds); perHour.value = String(s.perHour);
|
|
2363
2363
|
create.checked = s.create; checks.checked = s.checks;
|
|
2364
|
-
state.textContent = s.branches.length ?
|
|
2364
|
+
state.textContent = s.branches.length ? uiSaid('set-auto-on', 'on: {list}', { list: s.branches.join(', ') }) : uiSaid('set-auto-off', 'off');
|
|
2365
2365
|
unknown.hidden = Boolean(about.defaultBranch);
|
|
2366
2366
|
const others = about.sharedWith ?? [];
|
|
2367
2367
|
shared.hidden = others.length === 0;
|
|
@@ -2376,7 +2376,7 @@
|
|
|
2376
2376
|
const body = { branches: branches.value, quietSeconds: quiet.value === '' ? '' : Number(quiet.value), perHour: perHour.value === '' ? '' : Number(perHour.value), create: create.checked, checks: checks.checked, ...flags };
|
|
2377
2377
|
const r = await fetch(where, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) });
|
|
2378
2378
|
const j = await r.json().catch(() => ({}));
|
|
2379
|
-
if (r.ok) { for (const k of Object.keys(flags)) delete flags[k]; fill(j); said.textContent = 'Saved.'; return; }
|
|
2379
|
+
if (r.ok) { for (const k of Object.keys(flags)) delete flags[k]; fill(j); said.textContent = uiSaid('set-auto-saved', 'Saved.'); return; }
|
|
2380
2380
|
/* Nothing was saved: the owner reads what it would allow, then confirms or changes the list. */
|
|
2381
2381
|
if (j.kind === 'confirm-wide' || j.kind === 'confirm-shared') { asking.textContent = j.error; asking.hidden = false; sure.hidden = false; sure.dataset.kind = j.kind; return; }
|
|
2382
2382
|
said.textContent = j.error || 'The request failed.';
|