feat(documents) : viewer Markdown des documents de ticket avec copie en un clic
Auto Tag Develop / tag (push) Successful in 10s
Auto Tag Develop / tag (push) Successful in 10s
Aperçu du contenu source pour les fichiers texte/Markdown (.md, .txt, .csv, .json, .xml) avec bouton Copier (presse-papier + toast) et téléchargement. Détection par MIME ou extension, chargement via getContent. Icône Markdown dédiée dans la liste.
This commit is contained in:
@@ -41,5 +41,12 @@ export function useTaskDocumentService() {
|
||||
return `${baseURL}/task_documents/${id}/download`
|
||||
}
|
||||
|
||||
return { getByTask, upload, remove, getDownloadUrl }
|
||||
async function getContent(id: number): Promise<string> {
|
||||
return $fetch<string>(`${baseURL}/task_documents/${id}/download`, {
|
||||
credentials: 'include',
|
||||
responseType: 'text',
|
||||
})
|
||||
}
|
||||
|
||||
return { getByTask, upload, remove, getDownloadUrl, getContent }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user