feat: integrate @tailwindcss/typography and enhance folder picker functionality

- Added @tailwindcss/typography dependency to package.json and tailwind.config.js.
- Updated FolderPicker.vue to include additional properties (isGitRepo, hasDocuments) for directories.
- Enhanced Sidebar.vue with folder creation and document handling features, including drag-and-drop functionality.
- Implemented createFolder and moveDocument mutations in gql.ts for managing folder and document operations.
- Added logic to handle folder creation and document creation prompts in Sidebar.vue.
- Updated the layout and interactions in Sidebar.vue to improve user experience.
This commit is contained in:
Björn Blomberg
2026-04-13 10:55:02 +02:00
parent 376b946e73
commit a46d56e2fc
15 changed files with 980 additions and 240 deletions

View File

@@ -28,4 +28,19 @@ export async function gql<T = unknown>(
return json.data as T
}
export async function createFolder(path: string): Promise<{ createFolder: boolean }> {
const query = `mutation CreateFolder($path: String!) { createFolder(path: $path) }`
return gql(query, { path })
}
export async function moveDocument(oldSlug: string, newSlug: string): Promise<{ moveDocument: boolean }> {
const query = `mutation MoveDocument($oldSlug: String!, $newSlug: String!) { moveDocument(oldSlug: $oldSlug, newSlug: $newSlug) }`
return gql(query, { oldSlug, newSlug })
}
export async function getFolders(): Promise<{ folders: string[] }> {
const query = `query GetFolders { folders }`
return gql(query)
}