mirror of
https://github.com/temetro/temetro.git
synced 2026-08-19 22:56:17 +00:00
ea2ecb572c
- lib/notes.ts: list/get/create/update/delete via the API client. - New /notes route + nav item (and shared lib/nav.ts entry, i18n key) so it shows in the sidebar and command palette. - components/notes/notes-view.tsx: a note list + "New note", with save/delete and toasts. - components/notes/notes-editor.tsx: a Word-like COSS Toolbar driving Tiptap (StarterKit + Placeholder) — bold/italic/underline, H1–H2, bullet/numbered lists, undo/redo — plus a title field and Save. Installed @coss/toolbar and @coss/toggle-group and the Tiptap packages. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
33 lines
913 B
TypeScript
33 lines
913 B
TypeScript
import {
|
|
BarChart3,
|
|
type LucideIcon,
|
|
NotebookPen,
|
|
Plus,
|
|
Settings,
|
|
Users,
|
|
} from "lucide-react";
|
|
|
|
export type NavItem = {
|
|
id: string;
|
|
// i18n key resolved with t() at render time.
|
|
labelKey: string;
|
|
icon: LucideIcon;
|
|
link: string;
|
|
};
|
|
|
|
// Single source of truth for the primary navigation. Consumed by the sidebar
|
|
// (components/sidebar-02/app-sidebar.tsx) and the command palette
|
|
// (components/command-palette.tsx) so the two never drift.
|
|
export const navItems: NavItem[] = [
|
|
{ id: "new-chat", labelKey: "nav.newChat", icon: Plus, link: "/" },
|
|
{ id: "patients", labelKey: "nav.patients", icon: Users, link: "/patients" },
|
|
{
|
|
id: "analysis",
|
|
labelKey: "nav.analysis",
|
|
icon: BarChart3,
|
|
link: "/analysis",
|
|
},
|
|
{ id: "notes", labelKey: "nav.notes", icon: NotebookPen, link: "/notes" },
|
|
{ id: "settings", labelKey: "nav.settings", icon: Settings, link: "/settings" },
|
|
];
|