feat: section aide rapide dans le dashboard stats
CI / lint (push) Failing after 1s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / security (push) Failing after -8s

- Boite elegante sous les statistiques avec icone clavier
- 10 raccourcis clavier essentiels (palette, recherche, edition)
- Badges style touches clavier (mono, accent, bordure)
- Astuce Ctrl+survol et editeur Forge
- Toggle masquer/afficher avec persistence localStorage
- Layout grid responsive (auto-fill minmax 260px)
This commit is contained in:
2026-06-15 14:11:49 -04:00
parent dd52f379bf
commit 0f4a7405db
3 changed files with 155 additions and 0 deletions
+55
View File
@@ -979,6 +979,61 @@
id="dashboard-conflicts-container"
style="margin-top: 16px"
></div>
<!-- Quick Help -->
<div class="quick-help" id="quick-help">
<div class="qh-header">
<i data-lucide="keyboard" style="width:16px;height:16px"></i>
<span>Raccourcis &amp; Astuces</span>
<button class="qh-toggle" id="qh-toggle" title="Masquer" aria-label="Masquer l'aide">&minus;</button>
</div>
<div class="qh-body" id="qh-body">
<div class="qh-row">
<span class="qh-kbd">Ctrl+Shift+Space</span>
<span class="qh-desc">Palette de commandes</span>
</div>
<div class="qh-row">
<span class="qh-kbd">Ctrl+Alt+Space</span>
<span class="qh-desc">Palette de fichiers (navigation rapide)</span>
</div>
<div class="qh-row">
<span class="qh-kbd">Ctrl+K</span>
<span class="qh-desc">Focus barre de recherche</span>
</div>
<div class="qh-row">
<span class="qh-kbd">/</span>
<span class="qh-desc">Recherche rapide (hors champ texte)</span>
</div>
<div class="qh-row">
<span class="qh-kbd">Ctrl+S</span>
<span class="qh-desc">Sauvegarder le fichier ouvert</span>
</div>
<div class="qh-row">
<span class="qh-kbd">Ctrl+F</span>
<span class="qh-desc">Rechercher dans le document</span>
</div>
<div class="qh-row">
<span class="qh-kbd">Esc</span>
<span class="qh-desc">Fermer l'editeur / modale</span>
</div>
<div class="qh-row">
<span class="qh-kbd">Ctrl+J</span>
<span class="qh-desc">Completion IA inline (dans l'editeur)</span>
</div>
<div class="qh-row">
<span class="qh-kbd">Alt+I</span>
<span class="qh-desc">Insertion rapide (editeur Forge)</span>
</div>
<div class="qh-row">
<span class="qh-kbd">F1</span>
<span class="qh-desc">Aide de l'editeur Forge</span>
</div>
<div class="qh-divider"></div>
<div class="qh-tip">
<i data-lucide="lightbulb" style="width:14px;height:14px"></i>
<span>Survolez un document avec <strong>Ctrl</strong> pour un apercu rapide. Cliquez sur <strong>Forge</strong> dans la barre d'outils pour l'editeur avance.</span>
</div>
</div>
</div>
</div>
<!-- Bookmarks Panel -->
+18
View File
@@ -395,6 +395,24 @@ const DashboardRecentWidget = {
}
this.populateVaultFilter();
// Quick Help toggle (with localStorage persistence)
var qhToggle = document.getElementById('qh-toggle');
var qhBody = document.getElementById('qh-body');
if (qhToggle && qhBody) {
// Restore saved state
if (localStorage.getItem('obsigate-qh-collapsed') === '1') {
qhBody.classList.add('collapsed');
qhToggle.textContent = '+';
qhToggle.title = 'Afficher';
}
qhToggle.addEventListener('click', function() {
var collapsed = qhBody.classList.toggle('collapsed');
qhToggle.textContent = collapsed ? '+' : '\u2212';
qhToggle.title = collapsed ? 'Afficher' : 'Masquer';
localStorage.setItem('obsigate-qh-collapsed', collapsed ? '1' : '0');
});
}
},
};
+82
View File
@@ -6446,6 +6446,88 @@ body.popup-mode .content-area {
}
.conflict-btn:hover { background: var(--bg-hover); }
/* ── Quick Help (Dashboard) ── */
.quick-help {
margin-top: 16px;
background: var(--bg-card, var(--bg-secondary));
border: 1px solid var(--border);
border-radius: var(--radius-lg);
overflow: hidden;
}
.qh-header {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
font-size: 0.8rem;
font-weight: 600;
color: var(--text-secondary);
border-bottom: 1px solid var(--border);
user-select: none;
}
.qh-header i { color: var(--accent); opacity: 0.7; }
.qh-toggle {
margin-left: auto;
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 1rem;
line-height: 1;
padding: 2px 6px;
border-radius: 4px;
}
.qh-toggle:hover { color: var(--text-secondary); background: var(--bg-hover); }
.qh-body {
padding: 10px 14px 14px;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: 6px 20px;
}
.qh-body.collapsed { display: none; }
.qh-row {
display: flex;
align-items: center;
gap: 10px;
padding: 4px 0;
}
.qh-kbd {
display: inline-flex;
align-items: center;
padding: 2px 8px;
font-family: var(--mono);
font-size: 0.7rem;
font-weight: 500;
color: var(--accent-text, #79c0ff);
background: var(--accent-bg, #1f2a3a);
border: 1px solid var(--border-md, #30363d);
border-radius: 4px;
white-space: nowrap;
min-width: 0;
letter-spacing: 0.3px;
}
.qh-desc {
font-size: 0.78rem;
color: var(--text-secondary);
}
.qh-divider {
grid-column: 1 / -1;
height: 1px;
background: var(--border);
margin: 6px 0 8px;
}
.qh-tip {
grid-column: 1 / -1;
display: flex;
align-items: flex-start;
gap: 8px;
font-size: 0.75rem;
color: var(--text-muted);
line-height: 1.5;
}
.qh-tip i { color: var(--warn); flex-shrink: 0; margin-top: 1px; }
.qh-tip strong { color: var(--text-secondary); }
/* ── Webhooks UI ── */
.webhook-item {
display: flex;