Remove appconfig in favor of runtimeconfig

This commit is contained in:
Julien Nahum
2024-01-03 17:38:11 +01:00
parent a51ccfebec
commit a6d88278be
18 changed files with 103 additions and 90 deletions

View File

@@ -124,7 +124,9 @@ export default {
},
computed: {
hCaptchaSiteKey: () => useAppConfig().hCaptchaSiteKey,
hCaptchaSiteKey () {
return useRuntimeConfig().public.hCaptchaSiteKey
},
/**
* Create field groups (or Page) using page breaks if any
*/

View File

@@ -96,6 +96,7 @@ import FormSecurityPrivacy from './form-components/FormSecurityPrivacy.vue'
import FormCustomSeo from './form-components/FormCustomSeo.vue'
import FormAccess from './form-components/FormAccess.vue'
import {validatePropertiesLogic} from "~/composables/forms/validatePropertiesLogic.js"
import opnformConfig from "~/opnform.config.js";
export default {
name: 'FormEditor',
@@ -145,10 +146,11 @@ export default {
appStore: useAppStore(),
crisp: useCrisp(),
amplitude: useAmplitude(),
opnformConfig,
workspace,
formsStore,
form,
user,
user
}
},
@@ -200,7 +202,9 @@ export default {
}
]
},
helpUrl: () => useAppConfig().links.help
helpUrl () {
return this.opnformConfig.links.help
}
},
watch: {},

View File

@@ -31,13 +31,13 @@
</template>
<script>
import { useWorkingFormStore } from '../../../../../stores/working_form'
import EditorOptionsPanel from '../../../editors/EditorOptionsPanel.vue'
import FormNotificationsOption from './components/FormNotificationsOption.vue'
import FormNotificationsSlack from './components/FormNotificationsSlack.vue'
import FormNotificationsDiscord from './components/FormNotificationsDiscord.vue'
import FormNotificationsSubmissionConfirmation from './components/FormNotificationsSubmissionConfirmation.vue'
import FormNotificationsWebhook from './components/FormNotificationsWebhook.vue'
import opnformConfig from "~/opnform.config.js";
export default {
components: { FormNotificationsSubmissionConfirmation, FormNotificationsSlack, FormNotificationsDiscord, FormNotificationsOption, EditorOptionsPanel, FormNotificationsWebhook },
@@ -47,22 +47,15 @@ export default {
const {content: form} = storeToRefs(workingFormStore)
return {
workingFormStore,
form
}
},
data () {
return {
form,
opnformConfig
}
},
computed: {
zapierUrl: () => useAppConfig().links.zapier_integration
},
watch: {
},
mounted () {
zapierUrl () {
opnformConfig.links.zapier_integration
}
},
}
</script>