Wrap licensing banners and modals in feature flag, disable logo
This commit is contained in:
parent
e408692647
commit
380542d128
|
@ -8,6 +8,7 @@
|
||||||
import { ExpiringKeys } from "./constants"
|
import { ExpiringKeys } from "./constants"
|
||||||
import { getBanners } from "./licensingBanners"
|
import { getBanners } from "./licensingBanners"
|
||||||
import { banner } from "@budibase/bbui"
|
import { banner } from "@budibase/bbui"
|
||||||
|
import { FEATURE_FLAGS, isEnabled } from "../../../helpers/featureFlags"
|
||||||
|
|
||||||
const oneDayInSeconds = 86400
|
const oneDayInSeconds = 86400
|
||||||
|
|
||||||
|
@ -81,7 +82,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$: if (userLoaded && licensingLoaded && loaded) {
|
$: if (
|
||||||
|
userLoaded &&
|
||||||
|
licensingLoaded &&
|
||||||
|
loaded &&
|
||||||
|
isEnabled(FEATURE_FLAGS.LICENSING)
|
||||||
|
) {
|
||||||
queuedModals = processModals()
|
queuedModals = processModals()
|
||||||
queuedBanners = getBanners()
|
queuedBanners = getBanners()
|
||||||
showNextModal()
|
showNextModal()
|
||||||
|
|
|
@ -3,10 +3,12 @@ import { API } from "api"
|
||||||
import { auth } from "stores/portal"
|
import { auth } from "stores/portal"
|
||||||
import { Constants } from "@budibase/frontend-core"
|
import { Constants } from "@budibase/frontend-core"
|
||||||
import { StripeStatus } from "components/portal/licensing/constants"
|
import { StripeStatus } from "components/portal/licensing/constants"
|
||||||
|
import { FEATURE_FLAGS, isEnabled } from "../../helpers/featureFlags"
|
||||||
|
|
||||||
export const createLicensingStore = () => {
|
export const createLicensingStore = () => {
|
||||||
const DEFAULT = {
|
const DEFAULT = {
|
||||||
plans: {},
|
plans: {},
|
||||||
|
usageMetrics: {},
|
||||||
}
|
}
|
||||||
const oneDayInMilliseconds = 86400000
|
const oneDayInMilliseconds = 86400000
|
||||||
|
|
||||||
|
@ -27,6 +29,7 @@ export const createLicensingStore = () => {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUsageMetrics: async () => {
|
getUsageMetrics: async () => {
|
||||||
|
if (isEnabled(FEATURE_FLAGS.LICENSING)) {
|
||||||
const quota = get(store).quotaUsage
|
const quota = get(store).quotaUsage
|
||||||
const license = get(auth).user.license
|
const license = get(auth).user.license
|
||||||
const now = new Date()
|
const now = new Date()
|
||||||
|
@ -99,6 +102,7 @@ export const createLicensingStore = () => {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
export const PlanType = {
|
export const PlanType = {
|
||||||
FREE: "free",
|
FREE: "free",
|
||||||
|
PRO: "pro",
|
||||||
TEAM: "team",
|
TEAM: "team",
|
||||||
BUSINESS: "business",
|
BUSINESS: "business",
|
||||||
ENTERPRISE: "enterprise",
|
ENTERPRISE: "enterprise",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { isFreePlan } from "./utils.js"
|
// import { isFreePlan } from "./utils.js"
|
||||||
|
|
||||||
export const logoEnabled = () => {
|
export const logoEnabled = () => {
|
||||||
return isFreePlan()
|
return false
|
||||||
|
// return isFreePlan()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue