From 35ffaf3e48b6bc95ae403857c90e95275d131208 Mon Sep 17 00:00:00 2001 From: purifetchi <0xlunaric@gmail.com> Date: Mon, 13 Jan 2025 00:17:12 +0100 Subject: [PATCH] more --- mizuki-frontend/src/components/FileListItem.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mizuki-frontend/src/components/FileListItem.vue b/mizuki-frontend/src/components/FileListItem.vue index b61c622..cf3afd0 100644 --- a/mizuki-frontend/src/components/FileListItem.vue +++ b/mizuki-frontend/src/components/FileListItem.vue @@ -9,11 +9,21 @@ const url = computed(() => { return `http://localhost:5118/f/${props.item.filename}`; }) + + const removeItem = async () => { + await fetch(`/api/file/delete?filename=${props.item.filename}`, { + method: 'GET', + credentials: 'include' + }); + + window.location.reload(); + } {{ item.filename }} - {{ item.originalFilename }} - Download + Download + Delete