Updated config schema .

Updated multi-page config editor.
This commit is contained in:
mmihaly
2023-12-22 22:24:38 -07:00
parent 3bf58308ff
commit e754fcd98c
2 changed files with 112 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
<div class="edit-multi-pages-inner" v-if="allowViewConfig">
<h3>{{ $t('interactive-editor.menu.edit-page-info-btn') }}</h3>
<FormSchema
:schema="schema"
:schema="customSchema"
v-model="formData"
@submit.prevent="saveToState"
class="multi-page-form"
@@ -49,6 +49,32 @@ export default {
pages() {
return this.$store.getters.pages;
},
/* Make a custom schema object, using fields from ConfigSchema */
customSchema() {
return {
type: 'array',
title: this.schema.title,
description: this.schema.description,
items: {
title: this.schema.items.title,
type: this.schema.items.type,
additionalProperties: this.schema.items.additionalProperties,
required: this.schema.items.required,
properties: {
name: this.schema.items.properties.name,
path: this.schema.items.properties.path,
displayData: {
title: 'Display (see documentation for more options)',
description: '',
type: 'object',
properties: {
hideForGuests: this.schema.items.properties.displayData.properties.hideForGuests,
},
},
},
},
};
},
allowViewConfig() {
return this.$store.getters.permissions.allowViewConfig;
},