diff --git a/packages/builder/src/pages/builder/maintenance/index.svelte b/packages/builder/src/pages/builder/maintenance/index.svelte index 95080d0563..1735a93e84 100644 --- a/packages/builder/src/pages/builder/maintenance/index.svelte +++ b/packages/builder/src/pages/builder/maintenance/index.svelte @@ -3,6 +3,12 @@ import { Heading, Body, Button, Layout } from "@budibase/bbui" import { admin } from "stores/portal" import BudibaseLogo from "../portal/_components/BudibaseLogo.svelte" + + $: { + if ($admin.maintenance.length === 0) { + window.location = "/builder" + } + }
diff --git a/packages/client/src/components/ClientApp.svelte b/packages/client/src/components/ClientApp.svelte index 4efa8af4e6..7e30e21ae8 100644 --- a/packages/client/src/components/ClientApp.svelte +++ b/packages/client/src/components/ClientApp.svelte @@ -17,6 +17,7 @@ appStore, devToolsStore, devToolsEnabled, + environmentStore, } from "stores" import NotificationDisplay from "components/overlay/NotificationDisplay.svelte" import ConfirmationDisplay from "components/overlay/ConfirmationDisplay.svelte" @@ -36,6 +37,7 @@ import DevToolsHeader from "components/devtools/DevToolsHeader.svelte" import DevTools from "components/devtools/DevTools.svelte" import FreeFooter from "components/FreeFooter.svelte" + import MaintenanceScreen from "components/MaintenanceScreen.svelte" import licensing from "../licensing" // Provide contexts @@ -111,122 +113,128 @@ class="spectrum spectrum--medium {$themeStore.baseTheme} {$themeStore.theme}" class:builder={$builderStore.inBuilder} > - - - - - - - - {#key $builderStore.selectedComponentId} - {#if $builderStore.inBuilder} - - {/if} - {/key} - - -
- -
- {#if showDevTools} - + {#if $environmentStore.maintenance.length > 0} + + {:else} + + + + + + + + {#key $builderStore.selectedComponentId} + {#if $builderStore.inBuilder} + {/if} + {/key} -
- {#if permissionError} -
- - - {@html ErrorSVG} - - You don't have permission to use this app - - - Ask your administrator to grant you access - - -
- {:else if !$screenStore.activeLayout} -
- - - {@html ErrorSVG} - - Something went wrong rendering your app - - - Get in touch with support if this issue persists - - -
- {:else if embedNoScreens} -
- - - {@html ErrorSVG} - - This Budibase app is not publicly accessible - - -
- {:else} - - {#key $screenStore.activeLayout._id} - - {/key} + +
+ +
+ {#if showDevTools} + + {/if} - + {@html ErrorSVG} + + You don't have permission to use this app + + + Ask your administrator to grant you access + + +
+ {:else if !$screenStore.activeLayout} +
+ + + {@html ErrorSVG} + + Something went wrong rendering your app + + + Get in touch with support if this issue persists + + +
+ {:else if embedNoScreens} +
+ + + {@html ErrorSVG} + + This Budibase app is not publicly accessible + + +
+ {:else} + + {#key $screenStore.activeLayout._id} + + {/key} + + -
+
- - - {#if !$builderStore.inBuilder && licensing.logoEnabled()} - + + {#if $appStore.isDevApp} + + {/if} + {#if $builderStore.inBuilder || $devToolsStore.allowSelection} + + {/if} + {#if $builderStore.inBuilder} + + {/if}
- - - {#if $appStore.isDevApp} - - {/if} - {#if $builderStore.inBuilder || $devToolsStore.allowSelection} - - {/if} - {#if $builderStore.inBuilder} - - - {/if} -
- - - - - + + + + + + {/if}
{/if} diff --git a/packages/client/src/components/MaintenanceScreen.svelte b/packages/client/src/components/MaintenanceScreen.svelte index b43525fdb6..529f20781a 100644 --- a/packages/client/src/components/MaintenanceScreen.svelte +++ b/packages/client/src/components/MaintenanceScreen.svelte @@ -1,6 +1,17 @@ + @@ -11,22 +22,14 @@ {#each maintenanceList as maintenance} {#if maintenance.type === MaintenanceType.SQS_MISSING} - Please upgrade your Budibase installation + Budibase installation requires maintenance - We've detected that the version of Budibase you're using depends - on a more recent version of the CouchDB database than what you - have installed. - - - To resolve this, you can either rollback to a previous version of - Budibase, or follow the migration guide to update to a later - version of CouchDB. + The administrator of this Budibase installation needs to take + actions to update components that are out of date. Please contact + them and show them this warning. More information will be + available when they log into their account. - {/if} {/each}
diff --git a/packages/client/src/index.js b/packages/client/src/index.js index 9a2f0addbc..2c8d310619 100644 --- a/packages/client/src/index.js +++ b/packages/client/src/index.js @@ -1,6 +1,5 @@ import ClientApp from "./components/ClientApp.svelte" import UpdatingApp from "./components/UpdatingApp.svelte" -import MaintenanceScreen from "./components/MaintenanceScreen.svelte" import { builderStore, appStore, @@ -66,15 +65,6 @@ const loadBudibase = async () => { await environmentStore.actions.fetchEnvironment() } - const maintenanceList = get(environmentStore)?.maintenance - if (maintenanceList?.length > 0) { - new MaintenanceScreen({ - target: window.document.body, - props: { maintenanceList }, - }) - return - } - // Register handler for runtime events from the builder window.handleBuilderRuntimeEvent = (type, data) => { if (!window["##BUDIBASE_IN_BUILDER##"]) {