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:
2
client/lib/file-uploads.js
vendored
2
client/lib/file-uploads.js
vendored
@@ -10,7 +10,7 @@ async function storeLocalFile(file) {
|
||||
}
|
||||
|
||||
export const storeFile = async (file, options = {}) => {
|
||||
if (!useRuntimeConfig().public.s3Enabled)
|
||||
if (useFeatureFlag('storage.local'))
|
||||
return storeLocalFile(file, options)
|
||||
|
||||
const response = await opnFetch(
|
||||
|
||||
1
client/lib/forms/public-page.js
vendored
1
client/lib/forms/public-page.js
vendored
@@ -83,7 +83,6 @@ export function darkModeEnabled (elem = ref(null)) {
|
||||
|
||||
// Update isDark based on the current class
|
||||
const updateIsDark = () => {
|
||||
console.log(elem.value, 'test')
|
||||
const finalElement = elem.value ?? document.body
|
||||
isDark.value = finalElement.classList.contains('dark')
|
||||
}
|
||||
|
||||
2
client/lib/utils.js
vendored
2
client/lib/utils.js
vendored
@@ -103,7 +103,7 @@ export const getDomain = function (url) {
|
||||
*/
|
||||
export const customDomainUsed = function () {
|
||||
const config = useRuntimeConfig()
|
||||
if (!config.public.customDomainsEnabled) return false
|
||||
if (!useFeatureFlag('custom_domains')) return false
|
||||
const appDomain = getDomain(config.public.appUrl)
|
||||
const host = getHost()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user