feat: Notes manager — Заметки редактора в app.zeropost.ru
- app/notes/page.js: страница управления заметками (создать/редактировать/ удалить/закрепить/скрыть). Список с превью, inline-форма. - app/api/notes/route.js: GET+POST прокси к engine /api/notes - app/api/notes/[id]/route.js: PATCH+DELETE прокси - lib/engine.js: listNotes, createNote, updateNote, deleteNote - Header.js: ссылка «Заметки» в навигации (MessageCircle иконка)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Sparkles, LogOut, Settings2, CalendarDays } from 'lucide-react';
|
||||
import { Sparkles, LogOut, Settings2, CalendarDays, MessageCircle } from 'lucide-react';
|
||||
import ThemeToggle from './ThemeToggle';
|
||||
|
||||
export default function Header({ user }) {
|
||||
@@ -22,6 +22,10 @@ export default function Header({ user }) {
|
||||
<CalendarDays className="w-4 h-4" />
|
||||
<span>Календарь</span>
|
||||
</Link>
|
||||
<Link href="/notes" className="btn-ghost px-3 py-1.5 text-sm flex items-center gap-1.5">
|
||||
<MessageCircle className="w-4 h-4" />
|
||||
<span>Заметки</span>
|
||||
</Link>
|
||||
</nav>
|
||||
<div className="flex items-center gap-2">
|
||||
{user?.isAdmin && (
|
||||
|
||||
Reference in New Issue
Block a user