CLASSROOMIO-T-105: Add try again + sentry replay

This commit is contained in:
Rotimi Best
2023-08-12 18:46:35 +01:00
parent 6490e4d9bd
commit 7c34b32525
5 changed files with 22 additions and 10 deletions
@@ -75,6 +75,11 @@
}
}
function tryAgain() {
formRes = null;
isLoaded = false;
}
$: isDoneUploading(formRes);
</script>
@@ -124,7 +129,7 @@
Sorry we video wasn’t uploaded. The file size is too big,<br /> maximum size is 50 MB. Try again!
</p>
</span>
<PrimaryButton label="Try again" onClick={() => fileInput?.click()} />
<PrimaryButton label="Try another file" onClick={tryAgain} />
</div>
{:else if !formRes?.success}
<div class="h-full w-full flex flex-col items-center justify-center rounded-xl">
@@ -134,14 +139,11 @@
Oops 😬, couldn’t upload video
</h3>
<p class="text-center text-xs font-normal text-[#ADADAD]">
Sorry we video wasn’t uploaded, the file format isn’t supported.<br /> Upload MP4, MOV and AVI
files.
Sorry we video wasn’t uploaded, the file format isn’t supported or something went wrong on
the server.<br /> Upload MP4, MOV and AVI files.
</p>
</span>
<PrimaryButton
label="Try again later"
onClick={() => ($uploadCourseVideoStore.isModalOpen = false)}
/>
<PrimaryButton label="Please try again" onClick={tryAgain} />
</div>
{:else}
<div class="flex flex-col w-full h-full items-start justify-between">
@@ -162,6 +164,7 @@
<img src="/delete-video.svg" alt="deletevideo" class="dark:invert" />
</button>
</div>
<PrimaryButton label="Done" onClick={() => ($uploadCourseVideoStore.isModalOpen = false)} />
</div>
</div>
{/if}
+2 -1
View File
@@ -55,7 +55,8 @@
new Integrations.BrowserTracing(),
new CaptureConsole({
levels: ['error']
})
}),
new Sentry.Replay()
],
environment: !dev ? 'production' : 'development',
// Set tracesSampleRate to 1.0 to capture 100%