fix bug in start page settings + a bit of progress

This commit is contained in:
janis
2023-09-05 10:33:55 +02:00
parent a52ec14845
commit 1ad22482a4
4 changed files with 19 additions and 8 deletions

View File

@@ -11,9 +11,13 @@
<div>
<h2>Pages</h2>
<p>Here you can modify your landing page (the start page of libreǝvent)</p>
<select name="templateSel" id="templateSel" v-bind="selectedTemplate">
<select name="templateSel" id="templateSel" v-model="selectedTemplate">
<option v-for="el in startPageTemplates" :value="el">{{ el }}</option>
</select>
<!-- Start page settings -> Defined by startPage.json file -->
<div class="start-page-settings">
</div>
</div>
</template>
@@ -32,6 +36,7 @@
if ( res.status === 200 ) {
res.json().then( json => {
this.startPageSettings = json;
console.log( json );
} );
}
} );
@@ -54,8 +59,7 @@
fetch( '/admin/getAPI/getSettings' ).then( res => {
if ( res.status === 200 ) {
res.json().then( json => {
console.log( json[ 'startPage' ] );
this.selectedTemplate = json[ 'startPage' ];
this.selectedTemplate = String( json[ 'startPage' ] );
} );
}
} );