@nanocollective/roster 0.1.0-alpha.48 → 0.1.0-alpha.49
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/package.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.homeworking{display:flex;flex-direction:column;padding:4px 16px}
|
|
43
|
-
.homerun{display:grid;grid-template-columns:minmax(150px,220px)
|
|
43
|
+
.homerun{display:grid;grid-template-columns:minmax(150px,220px) auto 1fr auto;align-items:center;
|
|
44
44
|
gap:12px;padding:12px 0;font-size:13.5px}
|
|
45
45
|
.homerun + .homerun{border-top:1px solid var(--line)}
|
|
46
46
|
.homewho2{display:inline-flex;align-items:center;gap:8px;min-width:0}
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.homerest{margin-top:26px}
|
|
64
|
-
.homecard.gone,.
|
|
64
|
+
.homecard.gone,.homeline.gone{opacity:0;transform:translateX(12px);
|
|
65
65
|
transition:opacity .2s var(--ease),transform .2s var(--ease)}
|
|
66
66
|
|
|
67
67
|
/* Activity you have not seen, as Trackers marks it: a blue edge and a bold title. Opening the
|
|
68
68
|
thread marks it read, here and on GitHub. */
|
|
69
69
|
.homecard.unread{box-shadow:inset 3px 0 0 var(--blue)}
|
|
70
|
-
.
|
|
70
|
+
.homeline.unread{box-shadow:inset 3px 0 0 var(--blue);margin:0 -16px;padding-left:13px;padding-right:16px}
|
|
71
71
|
.unread .homeopen,.unread .homerowtitle{font-weight:700}
|
|
72
72
|
.unread .homeopen::before,.unread .homerowtitle::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;
|
|
73
73
|
background:var(--blue);margin:0 7px 1px 0;vertical-align:middle}
|
|
@@ -83,8 +83,11 @@
|
|
|
83
83
|
.homehead{flex-wrap:wrap}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
/* Rows in
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
.
|
|
86
|
+
/* Rows in a list card (Unread, Your requests, Closed today) that open a thread. */
|
|
87
|
+
.homeline{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;
|
|
88
|
+
padding:12px 0;font-size:13.5px;cursor:pointer}
|
|
89
|
+
.homeline + .homeline{border-top:1px solid var(--line)}
|
|
90
|
+
.homeline .homestate{min-width:64px;justify-content:center}
|
|
91
|
+
.homeline:hover .homerowtitle{text-decoration:underline}
|
|
92
|
+
.homeline:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
|
|
90
93
|
.homerowtitle{font-weight:600;color:var(--ink)}
|
|
@@ -247,7 +247,7 @@ async function act(note, actions, payload, ok) {
|
|
|
247
247
|
await post(payload);
|
|
248
248
|
note.textContent = ok;
|
|
249
249
|
// Done is done: the card goes now, rather than when GitHub next answers.
|
|
250
|
-
const card = actions.closest?.(".homecard, .
|
|
250
|
+
const card = actions.closest?.(".homecard, .homeline");
|
|
251
251
|
if (card) {
|
|
252
252
|
card.classList.add("gone");
|
|
253
253
|
setTimeout(() => card.remove(), 220);
|
|
@@ -379,23 +379,18 @@ function listBox(rows) {
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
/**
|
|
382
|
-
* One row in
|
|
383
|
-
*
|
|
382
|
+
* One row in a list card: a status chip, the title with one line under it, and a button on the
|
|
383
|
+
* right. The whole row opens the thread, except the button.
|
|
384
384
|
*/
|
|
385
385
|
function listRow(e, { chip, tone = "", sub, action = null }) {
|
|
386
|
-
const s = e.staff;
|
|
387
386
|
const row = el(
|
|
388
387
|
"div",
|
|
389
|
-
{ className: "
|
|
388
|
+
{ className: "homeline homeclick" + (e.item.unread ? " unread" : ""), tabIndex: 0, role: "button" },
|
|
390
389
|
[
|
|
391
|
-
el("span", { className: "homewho2" }, [
|
|
392
|
-
icon(s ? staffIcon(s) : "issue-open", "ic"),
|
|
393
|
-
el("b", { textContent: s?.name ?? (e.item.repo.split("/")[1] ?? e.item.repo) }),
|
|
394
|
-
]),
|
|
395
390
|
el("span", { className: "chip homestate " + tone, textContent: chip }),
|
|
396
391
|
el("div", { className: "homerunwhat" }, [
|
|
397
392
|
el("div", { className: "homerowtitle", textContent: e.item.title }),
|
|
398
|
-
el("div", { className: "homerunsub", textContent: sub }),
|
|
393
|
+
el("div", { className: "homerunsub", textContent: `${whereOf(e)} · ${sub}` }),
|
|
399
394
|
]),
|
|
400
395
|
el("div", { className: "homerunlog" }, action ? [action] : []),
|
|
401
396
|
],
|
|
@@ -426,7 +421,7 @@ function unreadRow(e) {
|
|
|
426
421
|
return listRow(e, {
|
|
427
422
|
chip: WHY[e.why] ?? "Issue",
|
|
428
423
|
tone: "cool",
|
|
429
|
-
sub:
|
|
424
|
+
sub: ago(e.item.updatedAt),
|
|
430
425
|
});
|
|
431
426
|
}
|
|
432
427
|
|
|
@@ -436,7 +431,7 @@ function requestRow(e) {
|
|
|
436
431
|
return listRow(e, {
|
|
437
432
|
chip: STATUS[e.status],
|
|
438
433
|
tone: e.status === "answered" ? "cool" : e.status === "working" ? "ok" : "",
|
|
439
|
-
sub:
|
|
434
|
+
sub: ago(e.item.updatedAt),
|
|
440
435
|
});
|
|
441
436
|
}
|
|
442
437
|
|
|
@@ -448,7 +443,7 @@ function closedRow(e) {
|
|
|
448
443
|
const holder = el("div", { className: "row" }, [note, reopen]);
|
|
449
444
|
return listRow(e, {
|
|
450
445
|
chip: "Closed",
|
|
451
|
-
sub:
|
|
446
|
+
sub: e.reason || "No reason given.",
|
|
452
447
|
action: holder,
|
|
453
448
|
});
|
|
454
449
|
}
|