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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user