clavarium 0.2.391-next.1 → 0.2.392-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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.391-next.1",
3
+ "version": "0.2.392-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.391-next.1",
9
+ "version": "0.2.392-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.391-next.1",
3
+ "version": "0.2.392-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.",
@@ -238,7 +238,7 @@ export const SETTINGS_WORDS_FR = {
238
238
  'set-mwhy-busy': 'Une autre action est en cours', 'set-mwhy-notready': 'Pas encore prête', 'set-mwhy-runs': 'Elle tourne déjà',
239
239
  'set-mwhy-stopped': 'Déjà arrêtée', 'set-mwhy-asleep': 'Déjà endormie', 'set-mwhy-nothing': 'Endormie : rien ne tourne',
240
240
  'set-mwhat-start': 'Démarre sa machine et son outil', 'set-mwhat-stop': 'L’arrête proprement, de force si ça bloque',
241
- 'set-mwhat-restart': 'L’arrête, puis la redémarre', 'set-mwhat-force': 'Coupe tout, comme une coupure de courant',
241
+ 'set-mwhat-restart': 'L’arrête, puis la redémarre', 'set-mwhat-force': 'Coupe tout, comme une coupure de courant', 'set-mdanger-title': 'Si la machine est bloquée',
242
242
  'set-mconf-stop': 'L’arrêter ? Le travail en cours s’interrompt.', 'set-mconf-restart': 'Redémarrer ? L’outil repart, fichiers gardés.',
243
243
  'set-mconf-force': 'Comme une coupure de courant : rien n’est sauvé.', 'set-mconf-no': 'Annuler',
244
244
  'set-mesc': 'Si un arrêt bloque', 'set-mesc-auto': 'Forcer seul', 'set-mesc-ask': 'Me demander',
package/web/app.js CHANGED
@@ -289,7 +289,7 @@
289
289
  now.title = uiSaid('set-m-force-now-why', 'Ends this step, starts the next');
290
290
  now.addEventListener('click', () => void machineAct('force-now'));
291
291
  const force = document.createElement('button'); force.type = 'button'; force.className = 'danger m-force-stop'; force.textContent = uiSaid('set-m-force', 'Force stop');
292
- force.addEventListener('click', () => askMachine('force'));
292
+ force.addEventListener('click', () => askMachine('force', row));
293
293
  row.append(now, force);
294
294
  el.replaceChildren(ol, row);
295
295
  }
@@ -1104,6 +1104,7 @@
1104
1104
  $('quick-wake').hidden = !c || c.asleep !== true;
1105
1105
  $('hand-terminal').hidden = !usable || noTerminal();
1106
1106
  $('panel-actions').hidden = DEVICE || !c;
1107
+ $('m-danger').hidden = DEVICE || !c;
1107
1108
  /* Its own sheet is there as soon as it exists: archiving one that failed is done from it. */
1108
1109
  $('folders').hidden = DEVICE || !c;
1109
1110
  }
@@ -1135,8 +1136,11 @@
1135
1136
  restart: () => [uiSaid('set-mconf-restart', 'Restart it? The tool restarts; its files stay.'), uiSaid('set-m-restart', 'Restart')],
1136
1137
  force: () => [uiSaid('set-mconf-force', 'Like a power cut: nothing is saved.'), uiSaid('set-m-force', 'Force stop')],
1137
1138
  };
1138
- function askMachine(kind) {
1139
+ /* `near`: where it was asked (the zone apart, the steps over the chat): the question comes right under it. */
1140
+ function askMachine(kind, near) {
1139
1141
  const [line, yes] = MCONFIRM[kind]();
1142
+ const where = near ?? (kind === 'force' ? $('m-danger') : $('panel-actions'));
1143
+ where.after($('m-confirm'));
1140
1144
  $('m-confirm-text').textContent = line;
1141
1145
  $('m-confirm-yes').textContent = yes;
1142
1146
  $('m-confirm-yes').className = kind === 'force' ? 'danger' : 'primary';
package/web/index.html CHANGED
@@ -137,7 +137,6 @@
137
137
  <button type="button" id="m-stop" data-said="set-m-stop">Stop</button>
138
138
  <button type="button" id="restart" data-said="set-restart-dots">Restart&hellip;</button>
139
139
  <button type="button" id="sleep" title="Freezes the tool as it is; it wakes when you open the conversation" data-said="set-sleep">Sleep</button>
140
- <button type="button" id="m-force" class="danger" data-said="set-m-force">Force stop</button>
141
140
  <button type="button" id="hand-terminal" data-said="set-terminal">Terminal</button>
142
141
  </div>
143
142
  <!-- Asked in the page, in one line: what is lost. -->
@@ -145,6 +144,11 @@
145
144
  <!-- The action under way, step by step (the escalation, in one line), then its report. -->
146
145
  <div id="m-live" class="m-live" hidden></div>
147
146
  <p id="m-report" class="hint m-report" role="status" hidden></p>
147
+ <!-- THE DANGEROUS ONE, APART (10-11): away from the buttons of every day, said what it does, confirmed here. -->
148
+ <div id="m-danger" class="m-danger" hidden>
149
+ <span class="m-danger-title" data-said="set-mdanger-title">If the machine is stuck</span>
150
+ <div class="m-danger-row"><button type="button" id="m-force" class="danger" data-said="set-m-force">Force stop</button><span class="hint" data-said="set-mwhat-force">Cuts it off, like a power cut</span></div>
151
+ </div>
148
152
  </section>
149
153
  <nav id="panel-tabs" class="settings-tabs" role="tablist" aria-label="Categories of its settings">
150
154
  <button type="button" role="tab" data-group="general" data-said="set-tab-general">General</button>
package/web/style.css CHANGED
@@ -2990,6 +2990,12 @@ button.kit-switch[aria-checked="true"]::after { left: 18px; background: var(--ok
2990
2990
  two ways to hurry it right under. A list down the page on a phone. */
2991
2991
  .m-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: .875rem; }
2992
2992
  .m-confirm[hidden], .m-live[hidden], .m-report[hidden] { display: none; }
2993
+ /* Force stop, apart from the buttons of every day (10-11). */
2994
+ .m-danger { display: grid; gap: 6px; margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--danger); border-radius: 10px; background: color-mix(in srgb, var(--danger) 8%, transparent); }
2995
+ .m-danger[hidden] { display: none; }
2996
+ .m-danger-title { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--danger); }
2997
+ .m-danger-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
2998
+ .m-danger-row .hint { margin: 0; }
2993
2999
  .m-confirm span { flex: 1 1 14rem; }
2994
3000
  .m-live { display: grid; gap: 8px; margin-top: 10px; justify-items: start; }
2995
3001
  #notice .m-live { justify-items: center; margin: 0; }