mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix feed with filters
This commit is contained in:
parent
2018cc0e1e
commit
dc94f433b9
2 changed files with 20 additions and 4 deletions
|
@ -42,7 +42,7 @@
|
|||
i.el-icon-switch-button
|
||||
span {{$t('common.logout')}}
|
||||
|
||||
el-menu-item(type='text' v-clipboard:copy='`${settings.baseurl}/feed/rss`' v-clipboard:success='copyLink')
|
||||
el-menu-item(type='text' v-clipboard:copy='feedLink' v-clipboard:success='copyLink')
|
||||
v-icon(color='orange' name='rss')
|
||||
|
||||
</template>
|
||||
|
@ -53,10 +53,26 @@ import { mapState } from 'vuex'
|
|||
export default {
|
||||
name: 'Nav',
|
||||
computed: {
|
||||
...mapState(['filters', 'settings']),
|
||||
feedLink () {
|
||||
const tags = this.filters.tags.join(',')
|
||||
const places = this.filters.places.join(',')
|
||||
let query = ''
|
||||
if (tags || places) {
|
||||
query = '?'
|
||||
if (tags) {
|
||||
query += 'tags=' + tags
|
||||
if (places) { query += '&places=' + places }
|
||||
} else {
|
||||
query += 'places=' + places
|
||||
}
|
||||
}
|
||||
|
||||
return `${this.settings.baseurl}/feed/rss${query}`
|
||||
},
|
||||
could_add () {
|
||||
return (this.$auth.loggedIn || this.settings.allow_anon_event)
|
||||
},
|
||||
...mapState(['filters', 'settings'])
|
||||
},
|
||||
methods: {
|
||||
copyLink () {
|
||||
|
|
|
@ -99,8 +99,8 @@ export default {
|
|||
return `<iframe style='border: 0px; width: 100%;' src="${this.settings.baseurl}/embed/list?${params.join('&')}"></iframe>`
|
||||
},
|
||||
link () {
|
||||
const tags = this.filters.tags.map(t => t.id).join(',')
|
||||
const places = this.filters.places.map(p => p.id).join(',')
|
||||
const tags = this.filters.tags.join(',')
|
||||
const places = this.filters.places.join(',')
|
||||
let query = ''
|
||||
if (tags || places) {
|
||||
query = '?'
|
||||
|
|
Loading…
Reference in a new issue