41db1 submission editor theme fix (#501)

* fix password reset bug

* fix: themes on submission editor

* fix form themes

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Favour Olayinka
2024-07-26 10:54:15 +01:00
committed by GitHub
parent bafd190ad2
commit d11f59210b
8 changed files with 79 additions and 12 deletions

View File

@@ -17,8 +17,7 @@
</template>
<script>
import {themes} from "~/lib/forms/themes/form-themes.js"
import CachedDefaultTheme from "~/lib/forms/themes/CachedDefaultTheme.js"
export default {
name: "OpenFormButton",
@@ -43,7 +42,15 @@ export default {
default: false,
},
theme: {type: Object, default: () => themes.default},
theme: {
type: Object, default: () => {
const theme = inject("theme", null)
if (theme) {
return theme.value
}
return CachedDefaultTheme.getInstance()
}
},
},
computed: {

View File

@@ -110,6 +110,7 @@
<script>
import {computed} from 'vue'
import FormLogicPropertyResolver from "~/lib/forms/FormLogicPropertyResolver.js"
import CachedDefaultTheme from "~/lib/forms/themes/CachedDefaultTheme.js"
import {default as _has} from 'lodash/has'
export default {
@@ -129,8 +130,13 @@ export default {
required: true
},
theme: {
type: Object,
required: true
type: Object, default: () => {
const theme = inject("theme", null)
if (theme) {
return theme.value
}
return CachedDefaultTheme.getInstance()
}
},
showHidden: {
type: Boolean,