From eb620ea3ce44eaae27ffcbf08913cedb90e73af2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 6 Jul 2021 18:37:21 +0100 Subject: [PATCH] Add basic fallback error to real apps when client library fails to load --- .../static/templates/BudibaseApp.svelte | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/static/templates/BudibaseApp.svelte b/packages/server/src/api/controllers/static/templates/BudibaseApp.svelte index 670a0f22e2..4943051328 100644 --- a/packages/server/src/api/controllers/static/templates/BudibaseApp.svelte +++ b/packages/server/src/api/controllers/static/templates/BudibaseApp.svelte @@ -34,13 +34,55 @@ *:after { box-sizing: border-box; } + + #error { + position: absolute; + top: 0; + left: 0; + height: 100vh; + width: 100vw; + display: none; + font-family: "Source Sans Pro", sans-serif; + flex-direction: column; + justify-content: center; + align-items: center; + background: #222; + text-align: center; + padding: 2rem; + gap: 2rem; + } + #error h1, + #error h2 { + margin: 0; + } + #error h1 { + color: #ccc; + font-size: 3rem; + font-weight: 600; + } + #error h2 { + color: #888; + font-weight: 400; + } +
+

There was an error loading your app

+

+ The Budibase client library could not be loaded. Try republishing your + app. +

+