feat(documents) : viewer Markdown des documents de ticket avec copie en un clic
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:
Matthieu
2026-06-01 22:45:05 +02:00
parent 7f79bdf236
commit 46c27aab42
4 changed files with 95 additions and 8 deletions
+8 -1
View File
@@ -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 }
}