mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
add dark mode setup in webcomponent embed
This commit is contained in:
parent
603b7c4132
commit
8835cfaf74
1 changed files with 5 additions and 1 deletions
|
@ -52,10 +52,12 @@
|
||||||
v-col.mr-2(:span='11')
|
v-col.mr-2(:span='11')
|
||||||
v-text-field(v-model='list.title' :label='$t("common.title")')
|
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-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')
|
v-col.float-right(:span='12')
|
||||||
gancio-events(:baseurl='settings.baseurl'
|
gancio-events(:baseurl='settings.baseurl'
|
||||||
:maxlength='list.maxEvents && Number(list.maxEvents)'
|
:maxlength='list.maxEvents && Number(list.maxEvents)'
|
||||||
:title='list.title'
|
:title='list.title'
|
||||||
|
:theme='list.theme'
|
||||||
:places='filters.places.join(",")'
|
:places='filters.places.join(",")'
|
||||||
:tags='filters.tags.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>
|
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 {
|
return {
|
||||||
type: 'rss',
|
type: 'rss',
|
||||||
notification: { email: '' },
|
notification: { email: '' },
|
||||||
list: { title: 'Gancio', maxEvents: null },
|
list: { title: 'Gancio', maxEvents: null, theme: 'dark' },
|
||||||
filters: { tags: [], places: [], show_recurrent: false },
|
filters: { tags: [], places: [], show_recurrent: false },
|
||||||
events: []
|
events: []
|
||||||
}
|
}
|
||||||
|
@ -133,6 +135,8 @@ export default {
|
||||||
params.push('maxlength=' + this.list.maxEvents)
|
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`
|
return `<script src="${this.settings.baseurl}\/gancio-events.es.js"><\/script>\n<gancio-events ${params.join(' ')}></gancio-events>\n\n`
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue