taskchef 5.10.0 → 5.11.0
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
package/src/dashboard/app.js
CHANGED
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
findCurrentTask,
|
|
3
3
|
KNOWN_TASK_STATUSES,
|
|
4
4
|
nextDateFilterRefreshDelay,
|
|
5
|
+
notificationTitle,
|
|
5
6
|
reconcileNotifications,
|
|
6
7
|
taskStatusLabel,
|
|
7
8
|
taskWithinDateFilter,
|
|
@@ -78,7 +79,7 @@ function notificationToast(notification) {
|
|
|
78
79
|
text.type = "button";
|
|
79
80
|
text.className = "toast-content";
|
|
80
81
|
const title = document.createElement("strong");
|
|
81
|
-
title.textContent = notification.kind
|
|
82
|
+
title.textContent = notificationTitle(task, notification.kind);
|
|
82
83
|
const description = document.createElement("span");
|
|
83
84
|
description.textContent = `${task.title} · ${taskStatusLabel(task)}`;
|
|
84
85
|
text.append(title, description);
|
package/src/dashboard/state.js
CHANGED
|
@@ -21,6 +21,10 @@ export function taskStatusLabel(task) {
|
|
|
21
21
|
return task.status === null ? "unresolved" : task.status.replaceAll("_", " ");
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
export function notificationTitle(task, kind) {
|
|
25
|
+
return kind === "new" ? "New task" : `Task ${taskStatusLabel(task)}`;
|
|
26
|
+
}
|
|
27
|
+
|
|
24
28
|
export function taskWithinDateFilter(task, filter, now = Date.now()) {
|
|
25
29
|
const windowMs = DATE_WINDOWS_MS.get(filter);
|
|
26
30
|
if (windowMs === null) return true;
|