clavarium 0.2.53-next.1 → 0.2.55-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/web/app.js +5 -2
- package/web/style.css +1 -1
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.55-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.55-next.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/web/app.js
CHANGED
|
@@ -1022,7 +1022,8 @@
|
|
|
1022
1022
|
const whenWords = (t) => {
|
|
1023
1023
|
if (!t) return '';
|
|
1024
1024
|
const d = new Date(t); const now = new Date();
|
|
1025
|
-
|
|
1025
|
+
/* Today: how long ago, not the clock -- the list is sorted by it, so "2 min" reads better than "15:05". */
|
|
1026
|
+
if (d.toDateString() === now.toDateString()) { const m = Math.max(0, Math.floor((now - d) / 60_000)); return m < 1 ? 'now' : m < 60 ? `${m} min` : `${Math.floor(m / 60)} h`; }
|
|
1026
1027
|
const y = new Date(now); y.setDate(now.getDate() - 1);
|
|
1027
1028
|
if (d.toDateString() === y.toDateString()) return 'yesterday';
|
|
1028
1029
|
return now - d < 6 * 86_400_000 ? d.toLocaleDateString([], { weekday: 'short' }) : d.toLocaleDateString([], { day: 'numeric', month: 'short' });
|
|
@@ -1054,7 +1055,9 @@
|
|
|
1054
1055
|
const when = document.createElement('small'); when.className = 'when'; when.textContent = whenWords(activityOf(c));
|
|
1055
1056
|
b.append(title);
|
|
1056
1057
|
/* Its last message, and who said it: so it reads as the last message, not as a subject. */
|
|
1057
|
-
|
|
1058
|
+
/* Its last message. The agent is the usual speaker, so its name is left off (just the words); only
|
|
1059
|
+
the person's own last word is marked "You:", which tells you it is your move. */
|
|
1060
|
+
if (c.talk?.lastText) { const last = document.createElement('small'); last.className = 'last'; last.textContent = c.talk.lastFrom === 'person' ? `You: ${c.talk.lastText}` : c.talk.lastText; b.append(last); }
|
|
1058
1061
|
if (!plain) b.append(sub);
|
|
1059
1062
|
b.append(when); b.dataset.when = 'true';
|
|
1060
1063
|
} else b.append(title, ...(plain ? [] : [sub]));
|
package/web/style.css
CHANGED
|
@@ -43,7 +43,7 @@ button:focus-visible, input:focus-visible { outline: 2px solid var(--brass); out
|
|
|
43
43
|
.state-dot[data-state="problem"] { background: var(--danger); }
|
|
44
44
|
.state-dot[data-state="wait"] { background: var(--wait); }
|
|
45
45
|
.state-dot[data-state="work"] { background: var(--brass); }
|
|
46
|
-
.state-dot[data-state="busy"] { background: var(--
|
|
46
|
+
.state-dot[data-state="busy"] { background: var(--ink2); }
|
|
47
47
|
.state-dot[data-state="sleep"] { background: transparent; border: 1.5px solid var(--ink2); }
|
|
48
48
|
.item > .state-dot { position: absolute; right: 10px; top: 13px; }
|
|
49
49
|
.item > .state-dot[data-state="work"], .item > .state-dot[data-state="busy"] { animation: breathe 1.7s ease-in-out infinite; }
|