feat: add initial implementation of the ObsiGate frontend SPA.
This commit is contained in:
parent
f71d97e06c
commit
fff0e94470
@ -4653,13 +4653,35 @@
|
||||
|
||||
function showWelcome() {
|
||||
hideProgressBar();
|
||||
// Show the dashboard widget instead of simple welcome message
|
||||
|
||||
// Ensure the dashboard container exists (it might have been wiped by renderFile)
|
||||
const area = document.getElementById("content-area");
|
||||
if (area && !document.getElementById("dashboard-home")) {
|
||||
area.innerHTML = `
|
||||
<div id="dashboard-home" class="dashboard-home" role="region" aria-label="Derniers fichiers ouverts">
|
||||
<div class="dashboard-header">
|
||||
<div class="dashboard-title-row">
|
||||
<i data-lucide="clock" class="dashboard-icon"></i>
|
||||
<h2>Derniers fichiers ouverts</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dashboard-recent-grid" class="dashboard-recent-grid"></div>
|
||||
<div id="dashboard-loading" class="dashboard-loading">
|
||||
<div class="skeleton-card"></div>
|
||||
<div class="skeleton-card"></div>
|
||||
<div class="skeleton-card"></div>
|
||||
</div>
|
||||
<div id="dashboard-recent-empty" class="dashboard-recent-empty hidden">
|
||||
<i data-lucide="layout"></i>
|
||||
<span>Aucun fichier récent</span>
|
||||
<p>Les fichiers que vous ouvrirez s'afficheront ici.</p>
|
||||
</div>
|
||||
</div>`;
|
||||
safeCreateIcons();
|
||||
}
|
||||
|
||||
// Show the dashboard widget
|
||||
if (typeof DashboardRecentWidget !== "undefined") {
|
||||
// Re-init the widget to refresh data and populate vault filter
|
||||
const dashboardVaultFilter = document.getElementById("dashboard-vault-filter");
|
||||
if (dashboardVaultFilter) {
|
||||
dashboardVaultFilter.value = selectedContextVault === "all" ? "" : selectedContextVault;
|
||||
}
|
||||
DashboardRecentWidget.load(selectedContextVault);
|
||||
}
|
||||
}
|
||||
|
||||
@ -356,11 +356,6 @@
|
||||
<i data-lucide="clock" class="dashboard-icon"></i>
|
||||
<h2>Derniers fichiers ouverts</h2>
|
||||
</div>
|
||||
<div class="dashboard-filter-row">
|
||||
<select id="dashboard-vault-filter" class="dashboard-select">
|
||||
<option value="">Tous les vaults</option>
|
||||
</select>
|
||||
<span class="dashboard-count" id="dashboard-count"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dashboard-recent-grid" class="dashboard-recent-grid"></div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user