This commit is contained in:
Adria Navarro 2024-01-04 12:28:36 +01:00
parent 401f057b04
commit ec43246974
1 changed files with 17 additions and 7 deletions

View File

@ -7,6 +7,8 @@
const timeoutMs = 60000 // 1 minute
const loadTime = Date.now()
let timedOut = false
async function checkMigrationsFinished() {
setTimeout(async () => {
const response = await API.getMigrationStatus()
@ -27,18 +29,23 @@
checkMigrationsFinished()
function migrationTimeout() {
// TODO
alert("Something went wrong 💀")
timedOut = true
}
</script>
<div class="loading">
{#if !timedOut}
<p class="loading-message">
🛠️ We are updating the system. <br />Please wait, we will be back in a
second!
</p>
<Spinner size="20" />
{:else}
<p class="loading-message timeout">
An error occurred. Please try again later.
</p>
{/if}
</div>
<style>
@ -56,4 +63,7 @@
text-align: center;
font-size: 18px;
}
.timeout {
color: rgb(196, 46, 46);
}
</style>