add dark mode setup in webcomponent embed

This commit is contained in:
lesion 2022-01-13 21:53:54 +01:00
parent 603b7c4132
commit 8835cfaf74
No known key found for this signature in database
GPG key ID: 352918250B012177

View file

@ -52,10 +52,12 @@
v-col.mr-2(:span='11')
v-text-field(v-model='list.title' :label='$t("common.title")')
v-text-field(v-model='list.maxEvents' type='number' min='1' :label='$t("common.max_events")')
v-switch(v-model='list.theme' inset true-value='dark' false-value='light' :label="$t('admin.is_dark')")
v-col.float-right(:span='12')
gancio-events(:baseurl='settings.baseurl'
:maxlength='list.maxEvents && Number(list.maxEvents)'
:title='list.title'
:theme='list.theme'
:places='filters.places.join(",")'
:tags='filters.tags.join(",")')
v-alert.pa-5.my-4.blue-grey.darken-4.text-body-1.lime--text.text--lighten-3 <pre>{{code}}</pre>
@ -98,7 +100,7 @@ export default {
return {
type: 'rss',
notification: { email: '' },
list: { title: 'Gancio', maxEvents: null },
list: { title: 'Gancio', maxEvents: null, theme: 'dark' },
filters: { tags: [], places: [], show_recurrent: false },
events: []
}
@ -133,6 +135,8 @@ export default {
params.push('maxlength=' + this.list.maxEvents)
}
params.push(`theme="${this.list.theme}"`)
return `<script src="${this.settings.baseurl}\/gancio-events.es.js"><\/script>\n<gancio-events ${params.join(' ')}></gancio-events>\n\n`