feat: optimiser l'interface des notes avec émoji 📝 automatique dans les titres, redirection intelligente vers vue Notes au clic sur titre, retour URL dynamique post-sauvegarde, auto-ouverture note via hash #open-note-{id}, réduction tailles boutons actions (36px→28px hover, 32px→30px), suppression gaps entre boutons (0.25rem→0), link-footer nowrap avec overflow hidden, et changement placeholder "Page title"→"Note title"
This commit is contained in:
@@ -1846,6 +1846,21 @@ function initNoteView(linkList, container) {
|
||||
container.appendChild(wrapper);
|
||||
}
|
||||
|
||||
// Check for hash parameter to auto-open a specific note
|
||||
const hash = window.location.hash;
|
||||
if (hash && hash.startsWith('#open-note-')) {
|
||||
const noteId = hash.replace('#open-note-', '');
|
||||
const targetNote = notes.find(n => String(n.id) === String(noteId));
|
||||
if (targetNote) {
|
||||
// Clear the hash to avoid reopening on refresh
|
||||
history.replaceState(null, null, window.location.pathname + window.location.search);
|
||||
// Open the note modal after a short delay to ensure DOM is ready
|
||||
setTimeout(() => {
|
||||
openNoteModal(targetNote);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
// Modal Container
|
||||
const modalOverlay = document.createElement("div");
|
||||
modalOverlay.className = "note-modal-overlay";
|
||||
|
||||
Reference in New Issue
Block a user