Skip to content

Commit 6f15781

Browse files
author
Ferenc Nánási
committed
[Create collection fix]: Disabled deleting on creating
1 parent bf97c97 commit 6f15781

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/addCollectionModal.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</ion-button>
1010
</ion-buttons>
1111

12-
<ion-buttons slot="end">
12+
<ion-buttons slot="end" v-if="allowDelete">
1313
<ion-button @click="onDeleteCollectionCliced">
1414
<ion-icon slot="icon-only" :icon="trash"></ion-icon>
1515
</ion-button>
@@ -83,6 +83,7 @@ import {
8383
IonListHeader,
8484
IonIcon,
8585
modalController,
86+
IonButtons,
8687
} from "@ionic/vue";
8788
import fileBrowserModal from "../components/fileBrowserModal.vue";
8889
import { apiInstance } from "../api";
@@ -91,13 +92,15 @@ import { FileBrowserActions } from "../enums";
9192
export default {
9293
props: ["modalController", "collection"],
9394
setup(props) {
95+
const allowDelete = ref(false);
9496
const dialog = ref({
9597
name: "",
9698
type: 1,
9799
paths: [],
98100
});
99101
if (props.collection) {
100102
dialog.value = structuredClone(props.collection);
103+
allowDelete.value = true;
101104
}
102105
103106
const modalTitle = computed(() =>
@@ -178,6 +181,7 @@ export default {
178181
arrowBack,
179182
trashBin,
180183
onDeleteCollectionCliced,
184+
allowDelete,
181185
};
182186
},
183187
components: {
@@ -195,6 +199,7 @@ export default {
195199
IonList,
196200
IonListHeader,
197201
IonIcon,
202+
IonButtons,
198203
},
199204
};
200205
</script>

0 commit comments

Comments
 (0)