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:
Ник (Claude)
2026-06-09 11:44:33 +03:00
parent d413f5f018
commit 3e04df32c5
5 changed files with 233 additions and 1 deletions
+6
View File
@@ -76,6 +76,12 @@ export const engine = {
},
usageRecent: (limit = 20) => call(`/api/usage/recent?limit=${limit}`),
// Editor notes
listNotes: () => call('/api/notes?limit=100'),
createNote: (data) => call('/api/notes', { method: 'POST', body: data }),
updateNote: (id, data) => call(`/api/notes/${id}`, { method: 'PATCH', body: data }),
deleteNote: (id) => call(`/api/notes/${id}`, { method: 'DELETE' }),
// Calendar
getCalendar: (userId, params = {}) => {
const qs = new URLSearchParams(params).toString();