feat: panneau A propos elegant + retrait Editor POC
CI / lint (push) Failing after 2s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Failing after -8s

- Remplace Editor POC par A propos (sparkles) dans le menu header
- Modale About avec animation fade+scale, logo SVG, hero gradient
- Stats live: fichiers, vaults (API /health), tests (285)
- Stack techno: 12 badges (FastAPI, vanilla JS, Docker, etc.)
- Footer: date livraison, blague aleatoire (10 variantes humour)
- Touche d'humour: git push --force accidentels, CSS > backend
- Fermeture: bouton X, clic overlay, Escape
- initAboutModal dans sync.js + config.js export
This commit is contained in:
2026-06-16 07:37:39 -04:00
parent fccee296a5
commit 66039028a5
6 changed files with 197 additions and 8289 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ async function init() {
Legacy.initSidebarTabs();
Legacy.initHelpModal();
Legacy.initConfigModal();
Legacy.initEditorPocBtn();
Legacy.initAboutModal();
Sidebar.initSidebarFilter();
UI.initSidebarResize();
Utils.initEditor();
+57
View File
@@ -1386,6 +1386,7 @@ export {
loadAbout as initAboutSection,
loadHiddenFilesSettings as initHiddenFilesConfig,
initThemePicker,
initAboutModal,
switchSidebarTab,
};
@@ -1451,3 +1452,59 @@ function initThemePicker() {
renderCards();
});
}
// ── About Modal ──────────────────────────────────────────────────────
function initAboutModal() {
var overlay = document.getElementById('about-overlay');
var closeBtn = document.getElementById('about-close');
if (!overlay) return;
// Open button
var openBtn = document.getElementById('about-open-btn');
if (openBtn) {
openBtn.addEventListener('click', function() {
overlay.classList.add('active');
populateAbout();
});
}
// Close
closeBtn.addEventListener('click', function() { overlay.classList.remove('active'); });
overlay.addEventListener('click', function(e) { if (e.target === overlay) overlay.classList.remove('active'); });
document.addEventListener('keydown', function(e) { if (e.key === 'Escape' && overlay.classList.contains('active')) overlay.classList.remove('active'); });
function populateAbout() {
// Live stats from health endpoint
fetch('/api/health')
.then(function(r) { return r.json(); })
.then(function(d) {
var fEl = document.getElementById('about-stat-files');
var vEl = document.getElementById('about-stat-vaults');
if (fEl) fEl.textContent = d.total_files || '—';
if (vEl) vEl.textContent = d.vaults || '—';
})
.catch(function() {});
// Build date (today)
var now = new Date();
var months = ['Janvier','Fevrier','Mars','Avril','Mai','Juin','Juillet','Aout','Septembre','Octobre','Novembre','Decembre'];
var dateEl = document.getElementById('about-build-date');
if (dateEl) dateEl.textContent = months[now.getMonth()] + ' ' + now.getFullYear();
// Random joke
var jokes = [
'0 bug connu. Les autres sont timides.',
'Compile du premier coup. (Sauf le lundi matin.)',
'Ecrit par un humain. Probablement.',
'Aucun LLM n\'a ete blesse durant ce developpement.',
'Quand ca marche, on appelle ca une feature.',
'CSS: 90% du temps de dev, 10% du code.',
'Dark mode active depuis la naissance du projet.',
'Ca marche sur ma machine™',
'Techniquement, tout est un edge case.',
'Le CSS de ce panneau a pris plus de temps que le backend.'
];
var jokeEl = document.getElementById('about-joke');
if (jokeEl) jokeEl.textContent = '« ' + jokes[Math.floor(Math.random() * jokes.length)] + ' »';
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ import {
} from './dashboard.js';
// --- Re-exports from modules that already have these functions ---
export { initSidebarTabs, initConfigModal, initHelpModal, initRecentTab, initEditorPocBtn } from './config.js';
export { initSidebarTabs, initConfigModal, initHelpModal, initRecentTab, initAboutModal } from './config.js';
export { initSyncStatus } from './sync.js';
export { DashboardRecentWidget } from './dashboard.js';
+2 -1
View File
@@ -3,7 +3,7 @@ import { state } from './state.js';
import { showToast } from './ui.js';
import { api } from './auth.js';
import { loadVaults, loadTags, refreshTagsForContext, refreshSidebarTreePreservingState } from './sidebar.js';
import { loadRecentFiles } from './config.js';
import { loadRecentFiles, initAboutModal } from './config.js';
import { openFile } from './viewer.js';
import { initOffline, syncFileIndexFromServer } from './offline.js';
import { initThemes } from './themes.js';
@@ -554,6 +554,7 @@ export function init() {
registerServiceWorker();
initOffline();
initThemes();
initAboutModal();
// Sync file index after a short delay (let vaults load first)
setTimeout(() => syncFileIndexFromServer(), 3000);
initDashboardTabs();