shadok-ai 0.2.38 → 0.2.39
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 +1 -1
- package/public/index.html +16 -6
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -2812,17 +2812,27 @@
|
|
|
2812
2812
|
if (tab === active && el._stickBottom !== false) el.scrollTop = el.scrollHeight;
|
|
2813
2813
|
}
|
|
2814
2814
|
|
|
2815
|
-
/*
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2815
|
+
/* Date/heure d'un message. Aujourd'hui → heure seule (« 21:57 »). Un autre
|
|
2816
|
+
jour → date + heure (« 3 août, 21:57 »), avec l'année si elle diffère —
|
|
2817
|
+
sinon un historique repris de plusieurs jours affichait juste « 21:57 », ce
|
|
2818
|
+
qui induit en erreur. Date complète en title=. `at` vient du .jsonl (même
|
|
2819
|
+
valeur en direct et au rechargement) ; absent sur les vieux transcripts →
|
|
2820
|
+
on n'affiche rien plutôt qu'une heure inventée. */
|
|
2820
2821
|
function fmtTime(at) {
|
|
2821
2822
|
if (!Number.isFinite(at)) return null;
|
|
2822
2823
|
const d = new Date(at);
|
|
2824
|
+
const now = new Date();
|
|
2825
|
+
const time = d.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" });
|
|
2823
2826
|
const el = document.createElement("span");
|
|
2824
2827
|
el.className = "time";
|
|
2825
|
-
|
|
2828
|
+
if (d.toDateString() === now.toDateString()) {
|
|
2829
|
+
el.textContent = time;
|
|
2830
|
+
} else {
|
|
2831
|
+
const date = d.toLocaleDateString([], d.getFullYear() === now.getFullYear()
|
|
2832
|
+
? { day: "numeric", month: "short" }
|
|
2833
|
+
: { day: "numeric", month: "short", year: "numeric" });
|
|
2834
|
+
el.textContent = date + ", " + time;
|
|
2835
|
+
}
|
|
2826
2836
|
el.title = d.toLocaleString();
|
|
2827
2837
|
return el;
|
|
2828
2838
|
}
|