41db1 submission editor theme fix (#500)
* fix password reset bug * fix: themes on submission editor
This commit is contained in:
@@ -98,11 +98,20 @@
|
||||
|
||||
<script>
|
||||
import Webcam from "webcam-easy"
|
||||
import { themes } from "~/lib/forms/themes/form-themes.js"
|
||||
import CachedDefaultTheme from "~/lib/forms/themes/CachedDefaultTheme.js"
|
||||
|
||||
export default {
|
||||
name: "FileInput",
|
||||
props: {
|
||||
theme: { type: Object, default: () => themes.default },
|
||||
theme: {
|
||||
type: Object, default: () => {
|
||||
const theme = inject("theme", null)
|
||||
if (theme) {
|
||||
return theme.value
|
||||
}
|
||||
return CachedDefaultTheme.getInstance()
|
||||
}
|
||||
},
|
||||
},
|
||||
emits: ['stopWebcam', 'uploadImage'],
|
||||
data: () => ({
|
||||
|
||||
@@ -28,11 +28,20 @@
|
||||
<script setup>
|
||||
import { ref, defineProps, defineEmits } from "vue"
|
||||
import OpenForm from "../forms/OpenForm.vue"
|
||||
import { themes } from "~/lib/forms/themes/form-themes.js"
|
||||
import CachedDefaultTheme from "~/lib/forms/themes/CachedDefaultTheme.js"
|
||||
|
||||
const props = defineProps({
|
||||
show: { type: Boolean, required: true },
|
||||
form: { type: Object, required: true },
|
||||
theme: { type: Object, default: themes.default },
|
||||
theme: {
|
||||
type: Object, default: () => {
|
||||
const theme = inject("theme", null)
|
||||
if (theme) {
|
||||
return theme.value
|
||||
}
|
||||
return CachedDefaultTheme.getInstance()
|
||||
}
|
||||
},
|
||||
submission: { type: Object },
|
||||
})
|
||||
|
||||
|
||||
@@ -141,14 +141,14 @@ export default {
|
||||
required: true
|
||||
},
|
||||
theme: {
|
||||
type: Object, default: () => {
|
||||
const theme = inject("theme", null)
|
||||
if (theme) {
|
||||
return theme.value
|
||||
type: Object, default: () => {
|
||||
const theme = inject("theme", null)
|
||||
if (theme) {
|
||||
return theme.value
|
||||
}
|
||||
return CachedDefaultTheme.getInstance()
|
||||
}
|
||||
return CachedDefaultTheme.getInstance()
|
||||
}
|
||||
},
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
|
||||
Reference in New Issue
Block a user