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