Changement des ilink vers markdown pur

This commit is contained in:
2025-11-12 20:17:43 +01:00
parent 6585b1765a
commit a09b73e4f1
25 changed files with 803 additions and 315 deletions

View File

@ -1,3 +1,4 @@
import { debug, debugError } from './debug.js';
/**
* SidebarSections - Gère les sections rétractables de la sidebar
* Permet de replier/déplier les favoris et le répertoire de notes
@ -12,7 +13,7 @@ class SidebarSections {
}
init() {
console.log('SidebarSections: Initialisation...');
debug('SidebarSections: Initialisation...');
// Restaurer l'état sauvegardé au démarrage
this.restoreStates();
@ -22,12 +23,12 @@ class SidebarSections {
const targetId = event.detail?.target?.id;
if (targetId === 'favorites-list') {
console.log('Favoris rechargés, restauration de l\'état...');
debug('Favoris rechargés, restauration de l\'état...');
setTimeout(() => this.restoreSectionState('favorites'), 50);
}
if (targetId === 'file-tree') {
console.log('File-tree rechargé, restauration de l\'état...');
debug('File-tree rechargé, restauration de l\'état...');
setTimeout(() => this.restoreSectionState('notes'), 50);
}
});
@ -38,14 +39,14 @@ class SidebarSections {
// Ne restaurer l'état que pour les swaps du file-tree complet
// Les swaps de statut (auto-save-status) ne doivent pas déclencher la restauration
if (targetId === 'file-tree') {
console.log('File-tree rechargé (oob), restauration de l\'état...');
debug('File-tree rechargé (oob), restauration de l\'état...');
setTimeout(() => this.restoreSectionState('notes'), 50);
}
});
// Écouter les restaurations d'historique (bouton retour du navigateur)
document.body.addEventListener('htmx:historyRestore', () => {
console.log('SidebarSections: History restored, restoring section states...');
debug('SidebarSections: History restored, restoring section states...');
// Restaurer les états des sections après restauration de l'historique
setTimeout(() => {
this.restoreSectionState('favorites');
@ -53,7 +54,7 @@ class SidebarSections {
}, 100);
});
console.log('SidebarSections: Initialisé');
debug('SidebarSections: Initialisé');
}
/**
@ -75,7 +76,7 @@ class SidebarSections {
if (!section) return;
localStorage.setItem(section.key, isExpanded.toString());
console.log(`État sauvegardé: ${sectionName} = ${isExpanded}`);
debug(`État sauvegardé: ${sectionName} = ${isExpanded}`);
}
/**
@ -113,7 +114,7 @@ class SidebarSections {
}
this.setSectionState(sectionName, newState);
console.log(`Section ${sectionName} ${newState ? 'ouverte' : 'fermée'}`);
debug(`Section ${sectionName} ${newState ? 'ouverte' : 'fermée'}`);
}
/**
@ -148,7 +149,7 @@ class SidebarSections {
}
}
console.log(`État restauré: ${sectionName} = ${isExpanded ? 'ouvert' : 'fermé'}`);
debug(`État restauré: ${sectionName} = ${isExpanded ? 'ouvert' : 'fermé'}`);
}
/**