1
0
Fork 0
mirror of synced 2024-10-04 03:54:37 +13:00

Server render updating page

This commit is contained in:
Adria Navarro 2023-12-18 16:15:00 +01:00
parent 2cb9f10327
commit 357522ec6e
2 changed files with 12 additions and 2 deletions

View file

@ -156,6 +156,10 @@ export const serveApp = async function (ctx: Ctx) {
appHbsPath = join(__dirname, "templates", "app.hbs")
}
const App = !needMigrations
? require("./templates/BudibaseApp.svelte").default
: require("./templates/Updating.svelte").default
let db
try {
db = context.getAppDB({ skip_setup: true })
@ -163,7 +167,6 @@ export const serveApp = async function (ctx: Ctx) {
let appId = context.getAppId()
if (!env.isJest()) {
const App = require("./templates/BudibaseApp.svelte").default
const plugins = objectStore.enrichPluginURLs(appInfo.usedPlugins)
const { head, html, css } = App.render({
metaImage:
@ -200,7 +203,6 @@ export const serveApp = async function (ctx: Ctx) {
}
} catch (error) {
if (!env.isJest()) {
const App = require("./templates/BudibaseApp.svelte").default
const { head, html, css } = App.render({
title: branding?.metaTitle,
metaTitle: branding?.metaTitle,

View file

@ -0,0 +1,8 @@
<div class="loading">Updating the system...</div>
<style>
.loading {
display: flex;
justify-content: center;
}
</style>