feat: notes de bord et sauvegarde position calendrier

- bouton crayon sur la fenêtre calendrier (MJ) → dialogue de note
- date impériale + date réelle préremplies
- append au journal configuré (créé auto si inexistant)
- appendJournalNote : labels passés depuis l'ouverture (pas de re-lecture)
- échappement XSS via jQuery .text().html()
- onSave async + await + try/catch
- sauvegarde position calendrier (client scope, debounced 300ms)
- restore position au constructeur
- close() async avec await settings.set
- boutons note et config groupés dans .mgt2-cal-actions (flex row)
This commit is contained in:
2026-07-25 17:08:54 +02:00
parent 8882cf8ee2
commit 47442be3ef
7 changed files with 282 additions and 6 deletions
+10
View File
@@ -93,3 +93,13 @@ export function formatImperialDate({ year, day, hour, minute, planet } = {}) {
export function getDefaultCalendar() {
return { year: 1116, day: 1, hour: 12, minute: 0, planet: '' };
}
export function formatRealDate() {
const d = new Date();
const y = d.getFullYear();
const m = String(d.getMonth() + 1).padStart(2, '0');
const day = String(d.getDate()).padStart(2, '0');
const h = String(d.getHours()).padStart(2, '0');
const min = String(d.getMinutes()).padStart(2, '0');
return `${day}/${m}/${y} ${h}:${min}`;
}