diff --git a/apps/desktop/src/renderer/main/lib/settings-navigation.ts b/apps/desktop/src/renderer/main/lib/settings-navigation.ts
new file mode 100644
index 0000000..e36f418
--- /dev/null
+++ b/apps/desktop/src/renderer/main/lib/settings-navigation.ts
@@ -0,0 +1,86 @@
+import {
+ IconSettings,
+ IconMicrophone,
+ IconBook,
+ IconBrain,
+ IconHistory,
+ IconInfoCircle,
+ IconKeyboard,
+ IconAdjustments,
+ IconNotes,
+ type Icon,
+} from "@tabler/icons-react";
+
+export interface SettingsNavItem {
+ title: string;
+ url: string;
+ description: string;
+ icon: Icon | string;
+ type: "settings";
+}
+
+export const SETTINGS_NAV_ITEMS: SettingsNavItem[] = [
+ {
+ title: "Preferences",
+ url: "/settings/preferences",
+ description: "Configure general application preferences and behavior",
+ icon: IconSettings,
+ type: "settings",
+ },
+ {
+ title: "Dictation",
+ url: "/settings/dictation",
+ description: "Configure speech recognition and dictation settings",
+ icon: IconMicrophone,
+ type: "settings",
+ },
+ {
+ title: "Shortcuts",
+ url: "/settings/shortcuts",
+ description: "Customize keyboard shortcuts and hotkeys",
+ icon: IconKeyboard,
+ type: "settings",
+ },
+ {
+ title: "Notes",
+ url: "/settings/notes",
+ description: "Manage your notes",
+ icon: IconNotes,
+ type: "settings",
+ },
+ {
+ title: "Vocabulary",
+ url: "/settings/vocabulary",
+ description: "Manage custom vocabulary and word recognition",
+ icon: IconBook,
+ type: "settings",
+ },
+ {
+ title: "AI Models",
+ url: "/settings/ai-models",
+ description: "Configure AI models and providers",
+ icon: IconBrain,
+ type: "settings",
+ },
+ {
+ title: "History",
+ url: "/settings/history",
+ description: "View and manage transcription history",
+ icon: IconHistory,
+ type: "settings",
+ },
+ {
+ title: "Advanced",
+ url: "/settings/advanced",
+ description: "Advanced configuration options",
+ icon: IconAdjustments,
+ type: "settings",
+ },
+ {
+ title: "About",
+ url: "/settings/about",
+ description: "About Amical and version information",
+ icon: IconInfoCircle,
+ type: "settings",
+ },
+];
diff --git a/apps/desktop/src/renderer/main/pages/notes/components/note-card.tsx b/apps/desktop/src/renderer/main/pages/notes/components/note-card.tsx
index 9367dc9..c698f3d 100644
--- a/apps/desktop/src/renderer/main/pages/notes/components/note-card.tsx
+++ b/apps/desktop/src/renderer/main/pages/notes/components/note-card.tsx
@@ -1,7 +1,7 @@
"use client";
import { FileText, Calendar } from "lucide-react";
-import { cn } from "@/lib/utils";
+import { cn, formatDate } from "@/lib/utils";
import { Note } from "../types";
interface RecentNoteCardProps {
@@ -9,22 +9,6 @@ interface RecentNoteCardProps {
onNoteClick: (noteId: number) => void;
}
-function formatDate(date: Date): string {
- const now = new Date();
- const diffInDays = Math.floor(
- (now.getTime() - date.getTime()) / (1000 * 60 * 60 * 24),
- );
-
- if (diffInDays === 0) return "Today";
- if (diffInDays === 1) return "Yesterday";
-
- return date.toLocaleDateString("en-US", {
- month: "short",
- day: "numeric",
- year: date.getFullYear() !== now.getFullYear() ? "numeric" : undefined,
- });
-}
-
export function NoteCard({ note, onNoteClick }: RecentNoteCardProps) {
return (
{
+ const notes = await notesService.listNotes({
+ search: input.query || "",
+ limit: input.limit,
+ });
+ return notes.map((note) => ({
+ id: note.id,
+ title: note.title,
+ createdAt: note.createdAt,
+ icon: note.icon || "file-text",
+ }));
+ }),
});
diff --git a/apps/desktop/src/types/electron-api.ts b/apps/desktop/src/types/electron-api.ts
index 2a1a127..ece6dd8 100644
--- a/apps/desktop/src/types/electron-api.ts
+++ b/apps/desktop/src/types/electron-api.ts
@@ -5,6 +5,9 @@ declare global {
}
export interface ElectronAPI {
+ // Platform information
+ platform: NodeJS.Platform;
+
// Listeners remain the same (two-way to renderer)
onGlobalShortcut: (
callback: (data: { shortcut: string }) => void,