Skip to content

Commit

Permalink
#16 - Last changes before review
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikpyt committed Oct 9, 2023
1 parent b8d2a18 commit 7c5509f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
5 changes: 1 addition & 4 deletions src/components/item/Browser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
5 changes: 1 addition & 4 deletions src/components/item/file/EditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
5 changes: 1 addition & 4 deletions src/components/item/folder/CreateModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down
7 changes: 2 additions & 5 deletions src/components/item/folder/EditModal.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<BaseModal @close="closeUpdateFolderModal">
<h3 class="mb-4 text-xl font-medium">{{ t('fileBrowser.folder.createFolder') }}</h3>
<h3 class="mb-4 text-xl font-medium">{{ t('fileBrowser.folder.editFolder') }}</h3>
<form class="space-y-6" @submit.prevent="updateFolder" ref="form">
<BaseInput id="folderName" type="text" v-model="folder.name" :required="true">{{
t('fileBrowser.folder.name')
Expand Down Expand Up @@ -85,10 +85,7 @@ async function updateFolder() {
updateItem(updatedFolder);
/*toasts.value.push({
message: `Folder ${folder.value.name} created`,
type: ToastType.Success,
});*/
// TODO: Show success toast
closeUpdateFolderModal();
} catch (e) {}
Expand Down
1 change: 1 addition & 0 deletions src/lang/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default {
folder: {
name: 'Navn',
createFolder: 'Opret mappe',
editFolder: 'Rediger mappe',
create: 'Opret',
edit: 'Rediger',
share: 'Del',
Expand Down
1 change: 1 addition & 0 deletions src/lang/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default {
folder: {
name: 'Name',
createFolder: 'Create folder',
editFolder: 'Edit folder',
create: 'Create',
edit: 'Edit',
share: 'Share',
Expand Down

0 comments on commit 7c5509f

Please sign in to comment.