add new webcomponent "fullwidth" layout
This commit is contained in:
@@ -53,14 +53,16 @@
|
||||
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')
|
||||
v-switch(v-model='list.sidebar' inset true-value='true' false-value='false' :label="$t('admin.widget')")
|
||||
v-col.col-12.col-lg-8
|
||||
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(",")'
|
||||
:show_recurrent='filters.show_recurrent')
|
||||
:show_recurrent='filters.show_recurrent'
|
||||
:sidebar="list.sidebar")
|
||||
v-alert.pa-5.my-4.blue-grey.darken-4.text-body-1.lime--text.text--lighten-3 <pre>{{code}}</pre>
|
||||
v-btn.float-end(text color='primary' @click='clipboard(code)') {{$t("common.copy")}}
|
||||
v-icon.ml-1 mdi-content-copy
|
||||
@@ -101,7 +103,12 @@ export default {
|
||||
return {
|
||||
type: 'rss',
|
||||
notification: { email: '' },
|
||||
list: { title: $store.state.settings.title, maxEvents: null, theme: 'dark' },
|
||||
list: {
|
||||
title: $store.state.settings.title,
|
||||
maxEvents: null,
|
||||
theme: $store.state.settings['theme.is_dark'] ? 'dark' : 'light',
|
||||
sidebar: 'true'
|
||||
},
|
||||
filters: { tags: [], places: [], show_recurrent: false },
|
||||
events: []
|
||||
}
|
||||
@@ -116,7 +123,7 @@ export default {
|
||||
code () {
|
||||
const params = [`baseurl="${this.settings.baseurl}"`]
|
||||
|
||||
if (this.list.title) {
|
||||
if (this.list.title && this.list.sidebar === 'true') {
|
||||
params.push(`title="${this.list.title}"`)
|
||||
}
|
||||
|
||||
@@ -136,6 +143,8 @@ export default {
|
||||
params.push('maxlength=' + this.list.maxEvents)
|
||||
}
|
||||
|
||||
params.push('sidebar="' + this.list.sidebar + '"')
|
||||
|
||||
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`
|
||||
|
||||
Reference in New Issue
Block a user