@tenonhq/dovetail-dashboard 0.0.16 → 0.0.18

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenonhq/dovetail-dashboard",
3
- "version": "0.0.16",
3
+ "version": "0.0.18",
4
4
  "description": "Update Set Dashboard for Dovetail",
5
5
  "main": "server.js",
6
6
  "scripts": {
package/public/app.js CHANGED
@@ -578,8 +578,9 @@ function renderTaskList() {
578
578
 
579
579
  var priorityHtml = "";
580
580
  if (task.priority) {
581
- var colors = { urgent: "#f50057", high: "#ff7043", normal: "#ffab40", low: "#29b6f6" };
582
- var color = colors[task.priority] || "#888";
581
+ // Tenon tertiary + status palette (see tokens.css)
582
+ var colors = { urgent: "#d92b2b", high: "#f16b19", normal: "#f4dc00", low: "#76d6ff" };
583
+ var color = colors[task.priority] || "#9caaa1";
583
584
  priorityHtml = '<span class="task-priority-dot" style="background:' + color + '"></span>';
584
585
  }
585
586
 
@@ -1045,3 +1046,31 @@ document.getElementById("task-search").addEventListener("input", function (e) {
1045
1046
 
1046
1047
  // Render task toggles (My Tasks)
1047
1048
  renderTaskToggles();
1049
+
1050
+ // --- Theme toggle ---
1051
+
1052
+ function currentTheme() {
1053
+ return document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light";
1054
+ }
1055
+
1056
+ function applyTheme(theme) {
1057
+ document.documentElement.setAttribute("data-theme", theme);
1058
+ try {
1059
+ localStorage.setItem("cp-theme", theme);
1060
+ } catch (e) {}
1061
+ var btn = document.getElementById("cp-theme-toggle");
1062
+ if (btn) {
1063
+ btn.textContent = theme === "dark" ? "☀︎" : "☾";
1064
+ btn.title = theme === "dark" ? "Switch to light mode" : "Switch to dark mode";
1065
+ }
1066
+ }
1067
+
1068
+ (function setupTheme() {
1069
+ applyTheme(currentTheme());
1070
+ var btn = document.getElementById("cp-theme-toggle");
1071
+ if (btn) {
1072
+ btn.addEventListener("click", function () {
1073
+ applyTheme(currentTheme() === "dark" ? "light" : "dark");
1074
+ });
1075
+ }
1076
+ })();