Commit 6f15781 Ferenc Nánási
committed
1 parent bf97c97 commit 6f15781 Copy full SHA for 6f15781
File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 9
9
</ion-button >
10
10
</ion-buttons >
11
11
12
- <ion-buttons slot =" end" >
12
+ <ion-buttons slot =" end" v-if = " allowDelete " >
13
13
<ion-button @click =" onDeleteCollectionCliced" >
14
14
<ion-icon slot =" icon-only" :icon =" trash" ></ion-icon >
15
15
</ion-button >
@@ -83,6 +83,7 @@ import {
83
83
IonListHeader ,
84
84
IonIcon ,
85
85
modalController ,
86
+ IonButtons ,
86
87
} from " @ionic/vue" ;
87
88
import fileBrowserModal from " ../components/fileBrowserModal.vue" ;
88
89
import { apiInstance } from " ../api" ;
@@ -91,13 +92,15 @@ import { FileBrowserActions } from "../enums";
91
92
export default {
92
93
props: [" modalController" , " collection" ],
93
94
setup (props ) {
95
+ const allowDelete = ref (false );
94
96
const dialog = ref ({
95
97
name: " " ,
96
98
type: 1 ,
97
99
paths: [],
98
100
});
99
101
if (props .collection ) {
100
102
dialog .value = structuredClone (props .collection );
103
+ allowDelete .value = true ;
101
104
}
102
105
103
106
const modalTitle = computed (() =>
@@ -178,6 +181,7 @@ export default {
178
181
arrowBack,
179
182
trashBin,
180
183
onDeleteCollectionCliced,
184
+ allowDelete,
181
185
};
182
186
},
183
187
components: {
@@ -195,6 +199,7 @@ export default {
195
199
IonList,
196
200
IonListHeader,
197
201
IonIcon,
202
+ IonButtons,
198
203
},
199
204
};
200
205
</script >
You can’t perform that action at this time.
0 commit comments