feat(frontend): 搭建桌面端基础界面与 Workspace

- App Shell 壳层:主导航、次导航、Title Bar、状态栏
- Vault 入口页:最近 Vault、打开/创建 Vault、AI Core 状态
- Workspace 与文件树:浏览、打开、创建笔记/文件夹
- Design Token:浅色/深色主题 CSS Variables
- Contracts / Service / Store / Router 基础架构
- 统一 ApiClient 与 SseClient,对接后端 API 契约
This commit is contained in:
2026-08-29 10:36:16 +08:00
parent 694c1b27c1
commit f9efc4f4a2
42 changed files with 8044 additions and 167 deletions
+38
View File
@@ -0,0 +1,38 @@
import apiClient from './apiClient'
import type { Note, NoteBlock } from '@/contracts'
export async function listNotes(params?: {
folder?: string
tag?: string
limit?: number
offset?: number
}): Promise<{ items: Note[]; total: number }> {
return apiClient.get('/api/notes', { params })
}
export async function getNote(noteId: string): Promise<{ note: Note; blocks: NoteBlock[] }> {
return apiClient.get(`/api/notes/${noteId}`)
}
export async function createNote(data: {
title: string
folder_path?: string
content?: string
}): Promise<Note> {
return apiClient.post('/api/notes', data)
}
export async function updateNote(
noteId: string,
data: { title?: string; content?: string; tags?: string[] }
): Promise<Note> {
return apiClient.patch(`/api/notes/${noteId}`, data)
}
export async function deleteNote(noteId: string): Promise<void> {
return apiClient.delete(`/api/notes/${noteId}`)
}
export async function moveNote(noteId: string, target_folder: string): Promise<Note> {
return apiClient.post(`/api/notes/${noteId}/move`, { target_folder })
}