PR feedback and removed some comments

This commit is contained in:
Dean 2023-06-23 11:56:59 +01:00
parent 2bdf855217
commit fd8400bee5
4 changed files with 7 additions and 10 deletions

View File

@ -76,12 +76,9 @@ export const createLicensingStore = () => {
await actions.setQuotaUsage()
},
setNavigation: () => {
//"/builder/portal/account/upgrade"
const adminStore = get(admin)
const authStore = get(auth)
//Add cloud check here too???
const upgradeUrl = authStore?.user?.accountPortalAccess
? `${adminStore.accountPortalUrl}/portal/upgrade`
: "/builder/portal/account/upgrade"

View File

@ -90,8 +90,7 @@
builderStore.actions.notifyLoaded()
} else {
builderStore.actions.analyticsPing({
source: "app",
...{ embedded: $appStore.embedded || undefined },
embedded: !!$appStore.embedded,
})
}
})
@ -169,7 +168,7 @@
<Layout justifyItems="center" gap="S">
{@html ErrorSVG}
<Heading size="L">
Your application could not be loaded
This Budibase app is not publicly accessible
</Heading>
</Layout>
</div>

View File

@ -46,7 +46,9 @@ const loadBudibase = async () => {
appStore.actions.setAppId(window["##BUDIBASE_APP_ID##"])
// Set the flag used to determine if the app is being loaded via an iframe
appStore.actions.setAppEmbedded(window["##BUDIBASE_APP_EMBEDDED##"] == "true")
appStore.actions.setAppEmbedded(
window["##BUDIBASE_APP_EMBEDDED##"] === "true"
)
// Fetch environment info
if (!get(environmentStore)?.loaded) {

View File

@ -100,9 +100,8 @@ export const deleteObjects = async function (ctx: any) {
}
export const serveApp = async function (ctx: any) {
const bbHeaderEmbed = ctx.request.get("x-budibase-embed")
? ctx.get("x-budibase-embed").toLowerCase() == "true"
: false
const bbHeaderEmbed =
ctx.request.get("x-budibase-embed")?.toLowerCase() === "true"
//Public Settings
const { config } = await configs.getSettingsConfigDoc()