Use offline indicator which does not tear out the current UI
This commit is contained in:
@@ -72,7 +72,6 @@ function onOnline() {
|
||||
fetcher.globalOptions.errorHook = (error) => {
|
||||
// network error, request killed by browser
|
||||
if (error instanceof TypeError) {
|
||||
ready.value = false;
|
||||
return offlineOverlay.value.open();
|
||||
}
|
||||
|
||||
@@ -81,10 +80,8 @@ fetcher.globalOptions.errorHook = (error) => {
|
||||
|
||||
if (error.status === 500 || error.status === 501) {
|
||||
// actual internal server error, most likely a bug or timeout log to console only to not alert the user
|
||||
if (!ready.value) {
|
||||
console.error(error);
|
||||
console.log('------\nCloudron Internal Error\n\nIf you see this, please send a mail with above log to support@cloudron.io\n------\n');
|
||||
}
|
||||
console.error(error);
|
||||
console.log('------\nCloudron Internal Error\n\nIf you see this, please send a mail with above log to support@cloudron.io\n------\n');
|
||||
}
|
||||
|
||||
if (error.status >= 502) {
|
||||
@@ -241,7 +238,7 @@ onMounted(async () => {
|
||||
<template>
|
||||
<div style="overflow: hidden; height: 100%;">
|
||||
<Notification />
|
||||
<OfflineOverlay ref="offlineOverlay" @online="onOnline()"/>
|
||||
<OfflineOverlay ref="offlineOverlay" @online="onOnline()" :href="'https://docs.cloudron.io/troubleshooting/'" :label="$t('main.offline')" />
|
||||
<SubscriptionRequiredDialog ref="subscriptionRequiredDialog"/>
|
||||
|
||||
<div v-if="ready" style="display: flex; flex-direction: row; overflow: hidden; height: 100%;">
|
||||
|
||||
Reference in New Issue
Block a user