@@ -523,6 +524,7 @@ const showProgressInteractionDialog = ref(false)
const progressInteractionDialogTitle = ref('')
const progressInteractionDialogActions = ref([])
const isProcessingVideos = ref(false)
+const isPreparingDownload = ref(false)
const overallProcessingProgress = ref(0)
const currentVideoProcessingProgress = ref([{ fileName: '', progress: 0, message: '' }])
const numberOfFilesToProcess = ref(0)
@@ -544,7 +546,7 @@ const fileActionButtons = computed(() => [
tooltip: '',
confirmAction: true,
show: true,
- disabled: showOnScreenProgress.value === true,
+ disabled: showOnScreenProgress.value === true || isPreparingDownload.value === true,
action: () => discardVideosAndUpdateDB(),
},
{
@@ -554,7 +556,7 @@ const fileActionButtons = computed(() => [
tooltip: 'Download selected videos with logs',
confirmAction: false,
show: true,
- disabled: showOnScreenProgress.value === true,
+ disabled: showOnScreenProgress.value === true || isPreparingDownload.value === true,
action: () => downloadVideoAndTelemetryFiles(),
},
])
@@ -763,6 +765,7 @@ const downloadVideoAndTelemetryFiles = async (): Promise => {
if (!confirm) return
}
+ isPreparingDownload.value = true
if (tempProcessedVideos.length > 0) {
const dataLogFilesAdded = addLogDataToFileList(tempProcessedVideos)
@@ -771,6 +774,7 @@ const downloadVideoAndTelemetryFiles = async (): Promise => {
if (tempUnprocessedVideos.length > 0) {
await videoStore.downloadTempVideo(tempUnprocessedVideos, fillProgressData)
}
+ isPreparingDownload.value = false
}
const confirmDownloadOfUnprocessedVideos = async (): Promise => {