jt-workspace-dashboard 0.1.6 → 0.1.7
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/dist/dashboard.js +3 -2
- package/package.json +1 -1
package/dist/dashboard.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
const BASE_LABELS = Object.assign({today: "In progress", ready: "Paused", waiting: "Waiting", later: "Later", handoff: "Handoff", meeting: "Ask", question: "Question"}, CFG.labels || {});
|
|
9
9
|
let LABELS = BASE_LABELS; // per workspace: BASE_LABELS + workspace.labels
|
|
10
10
|
const OWNER_NAME = String(CFG.ownerName || "").slice(0, 40);
|
|
11
|
-
const VERSION = "0.1.
|
|
11
|
+
const VERSION = "0.1.7";
|
|
12
12
|
|
|
13
13
|
/* ---------- page skeleton ---------- */
|
|
14
14
|
document.title = CFG.title || "Dashboard";
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
};
|
|
33
33
|
const CHEV = '<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 6l4 4 4-4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
|
34
34
|
function el(tag, cls, text){ const e = document.createElement(tag); if(cls) e.className = cls; if(text != null) e.textContent = text; return e; }
|
|
35
|
-
|
|
35
|
+
// Accepts a plain https link or a Markdown one like [title](https://…)
|
|
36
|
+
function safeUrl(u){ if(typeof u !== "string") return null; const m = u.match(/^\[[^\]]*\]\((https:\/\/[^\s)]+)\)/); if(m) return m[1]; return /^https:\/\/\S+$/.test(u.trim()) ? u.trim() : null; }
|
|
36
37
|
const store = (k, d) => { try { return JSON.parse(localStorage.getItem(k) || "null") ?? d; } catch(_){ return d; } };
|
|
37
38
|
const save = (k, v) => { try { localStorage.setItem(k, JSON.stringify(v)); } catch(_){} };
|
|
38
39
|
function setStatus(msg){ const s = $("status"); s.textContent = msg || ""; s.hidden = !msg; }
|
package/package.json
CHANGED