Refactor -> Avouid explicit usage of pricing url
This commit is contained in:
parent
3e62cac3a6
commit
17e2a4d7e4
|
@ -314,10 +314,11 @@
|
|||
</Modal>
|
||||
|
||||
<AppLimitModal bind:this={appLimitModal} />
|
||||
<AccountLockedModal bind:this={accountLockedModal} onConfirm={() =>
|
||||
isOwner
|
||||
? $licensing.goToUpgradePage()
|
||||
: window.open("https://budibase.com/pricing/", "_blank")} />
|
||||
<AccountLockedModal
|
||||
bind:this={accountLockedModal}
|
||||
onConfirm={() =>
|
||||
isOwner ? $licensing.goToUpgradePage() : $licensing.goToPricingPage()}
|
||||
/>
|
||||
|
||||
<style>
|
||||
.title {
|
||||
|
|
|
@ -236,8 +236,6 @@
|
|||
notifications.error("Error fetching user group data")
|
||||
}
|
||||
})
|
||||
|
||||
let staticUserLimit = $licensing.license.quotas.usage.static.users.value
|
||||
</script>
|
||||
|
||||
<Layout noPadding gap="M">
|
||||
|
|
|
@ -12,6 +12,7 @@ export const createLicensingStore = () => {
|
|||
const DEFAULT = {
|
||||
// navigation
|
||||
goToUpgradePage: () => {},
|
||||
goToPricingPage: () => {},
|
||||
// the top level license
|
||||
license: undefined,
|
||||
isFreePlan: true,
|
||||
|
@ -71,10 +72,14 @@ export const createLicensingStore = () => {
|
|||
const goToUpgradePage = () => {
|
||||
window.location.href = upgradeUrl
|
||||
}
|
||||
const goToPricingPage = () => {
|
||||
window.open("https://budibase.com/pricing/", "_blank")
|
||||
}
|
||||
store.update(state => {
|
||||
return {
|
||||
...state,
|
||||
goToUpgradePage,
|
||||
goToPricingPage,
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue