v1.0.2 - Update banner, smart updater, install type detection

This commit is contained in:
Yuri Karamian
2026-02-10 01:31:54 +01:00
parent c105b83570
commit 6a40f553f1
12 changed files with 110 additions and 13 deletions
+20
View File
@@ -23,6 +23,7 @@ export const searchQuery = writable("");
export const showCommandPalette = writable(false);
export const showSearch = writable(false);
export const showSettings = writable(false);
export const settingsTab = writable<string | null>(null);
export const showInfo = writable(false);
export const notebookIcons = writable<Record<string, string>>({});
export const quickAccessPaths = writable<string[]>([]);
@@ -45,6 +46,25 @@ export const focusMode = writable(false);
// Theme
export const theme = writable<string>("system");
// Update state
export const updateAvailable = writable<{
version: string;
body?: string;
} | null>(null);
export const installType = writable<string>("native");
export async function checkForUpdate() {
try {
const { check } = await import("@tauri-apps/plugin-updater");
const update = await check();
if (update) {
updateAvailable.set({ version: update.version, body: update.body });
}
} catch {
// Silent fail — don't disrupt app startup
}
}
// Derived
export const sortedNotes = derived([notes, sortMode], ([$notes, $sortMode]) => {
const pinned = $notes.filter((n) => n.meta.pinned);