clavarium 0.2.440-next.1 → 0.2.442-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/capacity.mjs +5 -1
- package/server/settingswords.mjs +1 -1
- package/web/app.js +10 -5
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.442-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.442-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/server/capacity.mjs
CHANGED
|
@@ -180,9 +180,13 @@ export class Capacity {
|
|
|
180
180
|
const set = this.reserve();
|
|
181
181
|
const all = this.#conversations.list();
|
|
182
182
|
const records = new Map(all.map((c) => [`clv-${c.name}`, c]));
|
|
183
|
+
/* A shared machine (#221) is no conversation's own: named, with who lives in it (14-11: it showed as « another machine »). */
|
|
184
|
+
const shared = new Map();
|
|
185
|
+
for (const c of all) if (c.sharedMachine) { const s = shared.get(`clv-${c.sharedMachine}`) ?? { shared: c.sharedMachine, who: [], sizeMb: c.machineMb ?? null }; s.who.push(c.title ?? c.name); shared.set(`clv-${c.sharedMachine}`, s); }
|
|
183
186
|
const machines = room.machines.map((m) => {
|
|
184
187
|
const c = records.get(m.vm);
|
|
185
|
-
|
|
188
|
+
const s = c ? null : shared.get(m.vm);
|
|
189
|
+
return { name: c ? c.name : null, ...(s ? { shared: s.shared, who: s.who } : {}), shelf: m.vm.startsWith('clvshelf-'), rssMb: m.rssMb, sizeMb: c?.memoryMb ?? s?.sizeMb ?? null, ...(room.machineAge?.[m.vm] !== undefined ? { ageS: room.machineAge[m.vm] } : {}) };
|
|
186
190
|
});
|
|
187
191
|
/* What the system says is available: the machines' own use is in it already. */
|
|
188
192
|
const memory = room.memory ? { totalMb: room.memory.totalMb, freeMb: room.memory.availableMb, usedPercent: percent(room.memory.totalMb - room.memory.availableMb, room.memory.totalMb) } : null;
|
package/server/settingswords.mjs
CHANGED
|
@@ -166,7 +166,7 @@ export const SETTINGS_WORDS_FR = {
|
|
|
166
166
|
'set-mcp-name': 'Nom', 'set-mcp-url': 'Adresse', 'set-mcp-key': 'Clé', 'set-mcp-add': 'Ajouter',
|
|
167
167
|
/* Où elle tourne, et l'assistant Copier ou déplacer (#221, 14-11). */
|
|
168
168
|
'set-where': 'Où elle tourne', 'set-where-copy': 'Copier…', 'set-where-move': 'Déplacer…', 'set-where-own': 'Sa propre machine',
|
|
169
|
-
'set-where-shared': 'Machine partagée « {m} », avec {others}', 'set-where-alone': 'Machine partagée « {m} », seule', 'set-where-stops': 'L’arrêter les arrête aussi',
|
|
169
|
+
'set-where-shared': 'Machine partagée « {m} », avec {others}', 'set-where-alone': 'Machine partagée « {m} », seule', 'set-where-stops': 'L’arrêter les arrête aussi', 'set-mem-shared': 'Partagée « {m} » : {who}',
|
|
170
170
|
'set-cm-title': 'Copier ou déplacer {t}', 'set-cm-copy': 'Copier', 'set-cm-copy-what': 'Celle-ci reste telle quelle',
|
|
171
171
|
'set-cm-move': 'Déplacer', 'set-cm-move-what': 'La même, sur une autre machine', 'set-cm-cancel': 'Annuler', 'set-cm-next': 'Suivant',
|
|
172
172
|
'set-cm-not-yet': 'Pas encore', 'set-cm-with': 'Avec {who}', 'set-cm-shared': 'Machine partagée « {m} »', 'set-cm-new': 'Une nouvelle machine partagée',
|
package/web/app.js
CHANGED
|
@@ -4304,7 +4304,9 @@
|
|
|
4304
4304
|
});
|
|
4305
4305
|
}
|
|
4306
4306
|
/* Its settings, on the Access chapter. `giving`: « Give… » instead, in its Assets tab (07-11, assets step 4). */
|
|
4307
|
-
|
|
4307
|
+
/* `atAccess`: on its Access chapter (a link that asks for it). The settings button keeps the tab the person was
|
|
4308
|
+
on (14-11: it jumped from Resources to Access by itself, each time the settings were opened or painted again). */
|
|
4309
|
+
async function openAccess(giving = false, { atAccess = true } = {}) {
|
|
4308
4310
|
if (DEVICE || !current) return;
|
|
4309
4311
|
if (place !== 'conversations') leavePlace();
|
|
4310
4312
|
if (giving) { openGive(); return; }
|
|
@@ -4312,10 +4314,13 @@
|
|
|
4312
4314
|
/* What it has may have changed from another screen: asked again before it is shown. */
|
|
4313
4315
|
await refresh();
|
|
4314
4316
|
await paintPanel();
|
|
4315
|
-
|
|
4316
|
-
openChapter('access');
|
|
4317
|
+
if (atAccess) openChapter('access');
|
|
4317
4318
|
}
|
|
4318
|
-
$('folders').addEventListener('click', () => {
|
|
4319
|
+
$('folders').addEventListener('click', () => {
|
|
4320
|
+
/* A tab chosen before on this device: that one. Never chosen: its Access chapter, as it always opened. */
|
|
4321
|
+
let kept = null; try { kept = localStorage.getItem('clavarium-tab-panel'); } catch { /* a private window */ }
|
|
4322
|
+
void openAccess(false, { atAccess: !kept });
|
|
4323
|
+
});
|
|
4319
4324
|
/* « N assets · see »: its Assets tab. */
|
|
4320
4325
|
$('access-assets').addEventListener('click', () => { goTab('assets'); });
|
|
4321
4326
|
|
|
@@ -8899,7 +8904,7 @@
|
|
|
8899
8904
|
$('server-memory-note').textContent = aboveWords(mem.freeMb - r.reserve.memoryMb, r.reserve.memoryMb);
|
|
8900
8905
|
const held = r.machines.reduce((a, x) => a + x.rssMb, 0);
|
|
8901
8906
|
const rest = Math.max(0, mem.totalMb - mem.freeMb - held);
|
|
8902
|
-
const named = r.machines.map((x, i) => ({ key: x.name ?? `vm-${i}`, label: x.shelf ? 'ready-made machine (being made)' :
|
|
8907
|
+
const named = r.machines.map((x, i) => ({ key: x.name ?? `vm-${i}`, label: x.shelf ? 'ready-made machine (being made)' : x.name ? machineTitle(x.name) : x.shared ? uiSaid('set-mem-shared', 'Shared « {m} »: {who}', { m: x.shared, who: (x.who ?? []).join(', ') }) : 'another machine', mb: x.rssMb, x }));
|
|
8903
8908
|
const share = shareOf(named, rest, mem.freeMb);
|
|
8904
8909
|
$('server-memory-share').replaceChildren(...(r.machines.length ? [shareDonut(share.slices, uiSaid('set-share-memory', 'Memory by machine'), mem.totalMb - mem.freeMb, mem.totalMb)] : []));
|
|
8905
8910
|
parts($('server-memory-parts'), [
|