feat: Implement core application structure with frontend styling, JavaScript, and Python backend services.

This commit is contained in:
2026-03-27 13:54:08 -04:00
parent 4afa0ab5f9
commit f71d97e06c
4 changed files with 150 additions and 41 deletions
+12 -16
View File
@@ -2868,11 +2868,12 @@
_currentFilter: "",
async load(vaultFilter = "") {
this._currentFilter = vaultFilter;
const v = vaultFilter || selectedContextVault || "all";
this._currentFilter = v;
this.showLoading();
let url = "/api/recent";
if (vaultFilter) url += `?vault=${encodeURIComponent(vaultFilter)}`;
let url = "/api/recent?mode=opened";
if (v !== "all") url += `&vault=${encodeURIComponent(v)}`;
try {
const data = await api(url);
@@ -2954,7 +2955,7 @@
title.title = file.title || file.path;
card.appendChild(title);
// Path
// Path (compact)
const pathParts = file.path.split("/");
if (pathParts.length > 1) {
const path = document.createElement("div");
@@ -2964,14 +2965,6 @@
card.appendChild(path);
}
// Preview
if (file.preview) {
const preview = document.createElement("p");
preview.className = "dashboard-card-preview";
preview.textContent = file.preview;
card.appendChild(preview);
}
// Footer with time and tags
const footer = document.createElement("div");
footer.className = "dashboard-card-footer";
@@ -3057,12 +3050,12 @@
const select = document.getElementById("dashboard-vault-filter");
if (select) {
select.addEventListener("change", () => {
this.load(select.value || null);
this.load(select.value);
});
}
this.populateVaultFilter();
this.load(null);
this.load(selectedContextVault);
},
};
@@ -4663,8 +4656,11 @@
// Show the dashboard widget instead of simple welcome message
if (typeof DashboardRecentWidget !== "undefined") {
// Re-init the widget to refresh data and populate vault filter
DashboardRecentWidget.populateVaultFilter();
DashboardRecentWidget.load(DashboardRecentWidget._currentFilter || null);
const dashboardVaultFilter = document.getElementById("dashboard-vault-filter");
if (dashboardVaultFilter) {
dashboardVaultFilter.value = selectedContextVault === "all" ? "" : selectedContextVault;
}
DashboardRecentWidget.load(selectedContextVault);
}
}