From 7c5509ffeb924aea7ccbc3456c0fa4a7c2bd9779 Mon Sep 17 00:00:00 2001 From: Frederik Pytlick Date: Mon, 9 Oct 2023 09:39:05 +0200 Subject: [PATCH] #16 - Last changes before review --- src/components/item/Browser.vue | 5 +---- src/components/item/file/EditModal.vue | 5 +---- src/components/item/folder/CreateModal.vue | 5 +---- src/components/item/folder/EditModal.vue | 7 ++----- src/lang/da.ts | 1 + src/lang/en.ts | 1 + 6 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/components/item/Browser.vue b/src/components/item/Browser.vue index 5f771ad..5d5b78f 100644 --- a/src/components/item/Browser.vue +++ b/src/components/item/Browser.vue @@ -104,10 +104,7 @@ getItems(); async function getItems() { try { const response = await fetch( - /* TODO: use api function */ - `http://localhost:3000/api/${ - FolderClass.isFolder(props.modelValue) ? `${props.modelValue.id}` : '' - }`, + api(`item/${FolderClass.isFolder(props.modelValue) ? `${props.modelValue.id}` : ''}`), { method: 'GET', headers: { diff --git a/src/components/item/file/EditModal.vue b/src/components/item/file/EditModal.vue index 3ae3f4d..21ad0c2 100644 --- a/src/components/item/file/EditModal.vue +++ b/src/components/item/file/EditModal.vue @@ -52,10 +52,7 @@ async function updateFile() { updateItem(updatedFile); - /*toasts.value.push({ - message: `Folder ${folder.value.name} created`, - type: ToastType.Success, - });*/ + // TODO: Show success toast closeUpdateFileModal(); } catch (e) {} diff --git a/src/components/item/folder/CreateModal.vue b/src/components/item/folder/CreateModal.vue index d40c325..a9690df 100644 --- a/src/components/item/folder/CreateModal.vue +++ b/src/components/item/folder/CreateModal.vue @@ -83,10 +83,7 @@ async function createFolder() { addItem(createdFolder); - /*toasts.value.push({ - message: `Folder ${folder.value.name} created`, - type: ToastType.Success, - });*/ + // TODO: Show success toast closeCreateFolderModal(); } catch (e) {} diff --git a/src/components/item/folder/EditModal.vue b/src/components/item/folder/EditModal.vue index 6380203..9b49922 100644 --- a/src/components/item/folder/EditModal.vue +++ b/src/components/item/folder/EditModal.vue @@ -1,6 +1,6 @@