Commit 0550446b authored by Jean Rabreau's avatar Jean Rabreau
Browse files

馃拕 restore formbuilder layout/input alternated colors

parent cfae6836
...@@ -21,12 +21,15 @@ export default { ...@@ -21,12 +21,15 @@ export default {
}, },
}, },
/** /**
* initialize theme and locale from user's localStorage if available * Initialize theme and locale from user's localStorage if available
* and hack formbuilder plugin to alternate layout/input colors
*/ */
created() { created() {
this.$vuetify.theme.dark = settingsStorage.get('dark', 'false') === 'true' this.$vuetify.theme.dark = settingsStorage.get('dark', 'false') === 'true'
this.$i18n.locale = settingsStorage.get('locale', this.$i18n.locale) this.$i18n.locale = settingsStorage.get('locale', this.$i18n.locale)
this.$vuetify.lang.current = this.$i18n.locale this.$vuetify.lang.current = this.$i18n.locale
this.$store.state.formBuilder.controls.controlsGroups.layouts.color = 'secondary'
}, },
} }
</script> </script>
......
...@@ -2,4 +2,12 @@ import Vue from 'vue' ...@@ -2,4 +2,12 @@ import Vue from 'vue'
import { unistraFormbuilder} from '@vue-unistra/formbuilder' import { unistraFormbuilder} from '@vue-unistra/formbuilder'
import store from '../store' import store from '../store'
Vue.use(unistraFormbuilder, { store }) Vue.use(
unistraFormbuilder,
{
store,
options: {
primaryIsDark: true,
secondaryIsDark: true
},
})
...@@ -35,6 +35,7 @@ describe('Homepage', function () { ...@@ -35,6 +35,7 @@ describe('Homepage', function () {
store.state.community.projectList = { store.state.community.projectList = {
pageContent: [] pageContent: []
} }
store.state.formBuilder = {controls: {controlsGroups: {layouts: {}}}}
storage.clear() storage.clear()
i18n.locale = 'fr' i18n.locale = 'fr'
dispatchStub = sinon.stub(store, 'dispatch').returns(Promise.resolve()) dispatchStub = sinon.stub(store, 'dispatch').returns(Promise.resolve())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment