Feature flags (#543)

* Re-organize a bit controllers

* Added the featureflagcontroller

* Implement feature flags in the front-end

* Clean env files

* Clean console.log messages

* Fix feature flag test
This commit is contained in:
Julien Nahum
2024-08-27 16:49:43 +02:00
committed by GitHub
parent 1dffd27390
commit 79d3dd7888
40 changed files with 304 additions and 147 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div
v-if="customDomainsEnabled"
v-if="useFeatureFlag('custom_domains')"
id="custom-domains"
>
<UButton
@@ -82,10 +82,6 @@ const customDomainsForm = useForm({
const customDomainsLoading = ref(false)
const showCustomDomainModal = ref(false)
const customDomainsEnabled = computed(
() => useRuntimeConfig().public.customDomainsEnabled,
)
onMounted(() => {
initCustomDomains()
})

View File

@@ -202,7 +202,7 @@ const showEditUserModal = ref(false)
const selectedUser = ref(null)
const userNewRole = ref("")
const paidPlansEnabled = computed(() => useRuntimeConfig().public.paidPlansEnabled)
const paidPlansEnabled = ref(useFeatureFlag('billing.enabled'))
const canInviteUser = computed(() => {
return paidPlansEnabled.value ? workspace.value.is_pro : true
})