@@ -5,6 +5,7 @@ import { useTheme } from "vuetify";
55import { axiosPost } from " @/lib/PhotonUtils" ;
66import { useCameraSettingsStore } from " @/stores/settings/CameraSettingsStore" ;
77import PvSelect from " @/components/common/pv-select.vue" ;
8+ import PvDeleteModal from " @/components/common/pv-delete-modal.vue" ;
89import { useSettingsStore } from " @/stores/settings/GeneralSettingsStore" ;
910
1011const theme = useTheme ();
@@ -33,8 +34,6 @@ const deleteRecordings = async (recordingsToDelete: string[], cameraUniqueName:
3334 recordings: recordingsToDelete ,
3435 cameraUniqueName: cameraUniqueName
3536 });
36-
37- confirmDeleteDialog .value .show = false ;
3837};
3938
4039const exportRecordings = ref ();
@@ -245,31 +244,14 @@ const nukeRecordings = () => {
245244 </v-card-text >
246245 </v-card >
247246 </v-dialog >
248- <v-dialog v-model =" confirmDeleteDialog.show" width =" 600" >
249- <v-card color =" surface" dark >
250- <v-card-title >Delete Recording</v-card-title >
251- <v-card-text class =" pt-0" >
252- Are you sure you want to delete the recording(s) {{ confirmDeleteDialog.recordings.join(", ") }}?
253- <v-card-actions class =" pt-5 pb-0 pr-0" style =" justify-content : flex-end " >
254- <v-btn
255- :variant =" theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
256- color =" buttonPassive"
257- @click =" confirmDeleteDialog.show = false"
258- >
259- Cancel
260- </v-btn >
261- <v-btn
262- :variant =" theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
263- color =" error"
264- @click =" deleteRecordings(confirmDeleteDialog.recordings, confirmDeleteDialog.cameraUniqueName)"
265- >
266- Delete
267- </v-btn >
268- </v-card-actions >
269- </v-card-text >
270- </v-card >
271- </v-dialog >
272247 </v-card >
248+
249+ <pv-delete-modal
250+ v-model =" confirmDeleteDialog.show"
251+ title =" Confirm Delete Recordings"
252+ :description =" 'Are you sure you want to delete the recording(s) ' + confirmDeleteDialog.recordings.join(', ') + '?'"
253+ @confirm =" () => deleteRecordings(confirmDeleteDialog.recordings, confirmDeleteDialog.cameraUniqueName)"
254+ />
273255</template >
274256
275257<style scoped lang="scss">
0 commit comments