Don't show budibase logo on free plan in self hosted installations
This commit is contained in:
parent
6834b33932
commit
c8789412e2
|
@ -9,7 +9,14 @@
|
|||
import licensing from "../../licensing"
|
||||
|
||||
const sdk = getContext("sdk")
|
||||
const { routeStore, styleable, linkable, builderStore, currentRole } = sdk
|
||||
const {
|
||||
routeStore,
|
||||
styleable,
|
||||
linkable,
|
||||
builderStore,
|
||||
currentRole,
|
||||
environmentStore,
|
||||
} = sdk
|
||||
const component = getContext("component")
|
||||
const context = getContext("context")
|
||||
|
||||
|
@ -228,7 +235,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
|
||||
{#if !$builderStore.inBuilder && licensing.logoEnabled()}
|
||||
{#if !$builderStore.inBuilder && licensing.logoEnabled() && $environmentStore.cloud}
|
||||
<MadeInBudibase />
|
||||
{/if}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import {
|
|||
rowSelectionStore,
|
||||
componentStore,
|
||||
currentRole,
|
||||
environmentStore,
|
||||
} from "stores"
|
||||
import { styleable } from "utils/styleable"
|
||||
import { linkable } from "utils/linkable"
|
||||
|
@ -27,6 +28,7 @@ export default {
|
|||
builderStore,
|
||||
uploadStore,
|
||||
componentStore,
|
||||
environmentStore,
|
||||
currentRole,
|
||||
styleable,
|
||||
linkable,
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
import { API } from "api"
|
||||
import { writable } from "svelte/store"
|
||||
|
||||
const initialState = {
|
||||
cloud: false,
|
||||
}
|
||||
|
||||
const createEnvironmentStore = () => {
|
||||
const store = writable(initialState)
|
||||
|
||||
const actions = {
|
||||
fetchEnvironment: async () => {
|
||||
try {
|
||||
const environment = await API.getEnvironment()
|
||||
store.set({
|
||||
...initialState,
|
||||
...environment,
|
||||
})
|
||||
} catch (error) {
|
||||
store.set(initialState)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
subscribe: store.subscribe,
|
||||
actions,
|
||||
}
|
||||
}
|
||||
|
||||
export const environmentStore = createEnvironmentStore()
|
|
@ -17,6 +17,7 @@ export { devToolsStore } from "./devTools"
|
|||
export { componentStore } from "./components"
|
||||
export { uploadStore } from "./uploads.js"
|
||||
export { rowSelectionStore } from "./rowSelection.js"
|
||||
export { environmentStore } from "./environment"
|
||||
|
||||
// Context stores are layered and duplicated, so it is not a singleton
|
||||
export { createContextStore } from "./context"
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import { routeStore } from "./routes"
|
||||
import { appStore } from "./app"
|
||||
import { environmentStore } from "./environment"
|
||||
|
||||
export async function initialise() {
|
||||
await routeStore.actions.fetchRoutes()
|
||||
await appStore.actions.fetchAppDefinition()
|
||||
await environmentStore.actions.fetchEnvironment()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue