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);
}
}
+17 -23
View File
@@ -999,6 +999,7 @@ select {
.content-area {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: clamp(16px, 3vw, 40px) clamp(16px, 4vw, 40px) 60px;
transition:
background 200ms ease,
@@ -4648,9 +4649,8 @@ body.popup-mode .content-area {
--------------------------------------------------------------------------- */
.dashboard-home {
padding: 24px;
height: 100%;
overflow-y: auto;
padding: 0;
width: 100%;
display: flex;
flex-direction: column;
}
@@ -4713,9 +4713,10 @@ body.popup-mode .content-area {
/* Grid */
.dashboard-recent-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 16px;
flex: 1;
width: 100%;
}
@media (max-width: 1200px) {
@@ -4743,13 +4744,13 @@ body.popup-mode .content-area {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
padding: 16px;
padding: 12px;
cursor: pointer;
transition: all 0.2s ease;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
display: flex;
flex-direction: column;
gap: 8px;
gap: 4px;
animation: fadeSlideIn 0.3s ease forwards;
opacity: 0;
}
@@ -4813,11 +4814,11 @@ body.popup-mode .content-area {
}
.dashboard-card-icon {
width: 36px;
height: 36px;
padding: 8px;
width: 28px;
height: 28px;
padding: 6px;
background: var(--accent);
border-radius: 8px;
border-radius: 6px;
color: white;
flex-shrink: 0;
}
@@ -4848,6 +4849,7 @@ body.popup-mode .content-area {
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
@@ -4863,15 +4865,7 @@ body.popup-mode .content-area {
/* Card preview */
.dashboard-card-preview {
font-size: 12px;
color: var(--text-muted);
line-height: 1.5;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
margin: 0;
display: none;
}
/* Card footer */
@@ -4880,9 +4874,9 @@ body.popup-mode .content-area {
align-items: center;
justify-content: space-between;
gap: 8px;
margin-top: auto;
padding-top: 8px;
border-top: 1px solid var(--border);
margin-top: 4px;
padding-top: 6px;
border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.dashboard-card-time {