Show devtools even in client app error states, to fix being locked out when changing to a public preview
This commit is contained in:
parent
12961806ff
commit
c6dbd52c88
|
@ -120,22 +120,6 @@
|
||||||
>
|
>
|
||||||
<DeviceBindingsProvider>
|
<DeviceBindingsProvider>
|
||||||
<UserBindingsProvider>
|
<UserBindingsProvider>
|
||||||
{#if permissionError}
|
|
||||||
<div class="error-wrapper">
|
|
||||||
{#if showDevTools}
|
|
||||||
<DevToolsHeader />
|
|
||||||
{/if}
|
|
||||||
<div class="error">
|
|
||||||
<Layout justifyItems="center" gap="S">
|
|
||||||
{@html ErrorSVG}
|
|
||||||
<Heading size="L"
|
|
||||||
>You don't have permission to use this app</Heading
|
|
||||||
>
|
|
||||||
<Body size="S">Ask your administrator to grant you access</Body>
|
|
||||||
</Layout>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{:else if $screenStore.activeLayout}
|
|
||||||
<StateBindingsProvider>
|
<StateBindingsProvider>
|
||||||
<RowSelectionProvider>
|
<RowSelectionProvider>
|
||||||
<!-- Settings bar can be rendered outside of device preview -->
|
<!-- Settings bar can be rendered outside of device preview -->
|
||||||
|
@ -160,6 +144,31 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div id="app-body">
|
<div id="app-body">
|
||||||
|
{#if permissionError}
|
||||||
|
<div class="error">
|
||||||
|
<Layout justifyItems="center" gap="S">
|
||||||
|
{@html ErrorSVG}
|
||||||
|
<Heading size="L">
|
||||||
|
You don't have permission to use this app
|
||||||
|
</Heading>
|
||||||
|
<Body size="S">
|
||||||
|
Ask your administrator to grant you access
|
||||||
|
</Body>
|
||||||
|
</Layout>
|
||||||
|
</div>
|
||||||
|
{:else if !$screenStore.activeLayout}
|
||||||
|
<div class="error">
|
||||||
|
<Layout justifyItems="center" gap="S">
|
||||||
|
{@html ErrorSVG}
|
||||||
|
<Heading size="L">
|
||||||
|
Something went wrong rendering your app
|
||||||
|
</Heading>
|
||||||
|
<Body size="S">
|
||||||
|
Get in touch with support if this issue persists
|
||||||
|
</Body>
|
||||||
|
</Layout>
|
||||||
|
</div>
|
||||||
|
{:else}
|
||||||
<CustomThemeWrapper>
|
<CustomThemeWrapper>
|
||||||
{#key $screenStore.activeLayout._id}
|
{#key $screenStore.activeLayout._id}
|
||||||
<Component
|
<Component
|
||||||
|
@ -183,6 +192,7 @@
|
||||||
<ConfirmationDisplay />
|
<ConfirmationDisplay />
|
||||||
<PeekScreenDisplay />
|
<PeekScreenDisplay />
|
||||||
</CustomThemeWrapper>
|
</CustomThemeWrapper>
|
||||||
|
{/if}
|
||||||
|
|
||||||
{#if showDevTools}
|
{#if showDevTools}
|
||||||
<DevTools />
|
<DevTools />
|
||||||
|
@ -203,7 +213,6 @@
|
||||||
</div>
|
</div>
|
||||||
</RowSelectionProvider>
|
</RowSelectionProvider>
|
||||||
</StateBindingsProvider>
|
</StateBindingsProvider>
|
||||||
{/if}
|
|
||||||
</UserBindingsProvider>
|
</UserBindingsProvider>
|
||||||
</DeviceBindingsProvider>
|
</DeviceBindingsProvider>
|
||||||
</div>
|
</div>
|
||||||
|
@ -253,10 +262,6 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-wrapper {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.error {
|
.error {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import { get } from "svelte/store"
|
|
||||||
import { createLocalStorageStore } from "@budibase/frontend-core"
|
import { createLocalStorageStore } from "@budibase/frontend-core"
|
||||||
import { appStore } from "./app"
|
|
||||||
import { initialise } from "./initialise"
|
import { initialise } from "./initialise"
|
||||||
import { authStore } from "./auth"
|
import { authStore } from "./auth"
|
||||||
import { API } from "../api"
|
import { API } from "../api"
|
||||||
|
@ -13,8 +11,7 @@ const initialState = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const createDevToolStore = () => {
|
const createDevToolStore = () => {
|
||||||
const localStorageKey = `${get(appStore).appId}.devTools`
|
const store = createLocalStorageStore("bb-devtools", initialState)
|
||||||
const store = createLocalStorageStore(localStorageKey, initialState)
|
|
||||||
|
|
||||||
const setEnabled = enabled => {
|
const setEnabled = enabled => {
|
||||||
store.update(state => ({
|
store.update(state => ({
|
||||||
|
|
Loading…
Reference in New Issue