allow_anon_event, comment via mastodon

This commit is contained in:
lesion
2019-06-25 01:05:38 +02:00
parent 3c9c85e268
commit b093dae3f3
32 changed files with 259 additions and 219 deletions

View File

@@ -42,7 +42,7 @@ export default {
...mapGetters(['filteredEvents']),
attributes () {
let attributes = []
attributes.push ({ key: 'today', dates: new Date(), highlight: { color: 'yellow' }})
attributes.push ({ key: 'today', dates: new Date(), highlight: { color: 'green' }})
attributes = attributes.concat(this.filteredEvents
.filter(e => !e.multidate)

View File

@@ -9,7 +9,7 @@
el-menu-item(v-if='!$auth.loggedIn' :title="$t('common.login')")
v-icon(color='lightgreen' name='user')
nuxt-link(to='/add')
nuxt-link(v-if='could_add' to='/add')
el-menu-item(:title="$t('common.add_event')")
v-icon(color='lightgreen' name='plus')
@@ -17,8 +17,9 @@
placement="bottom"
trigger="click")
Search(past-filter)
el-menu-item(slot='reference')
el-menu-item(slot='reference' :title="$t('common.search')" icon='el-share-button')
v-icon(color='lightblue' name='search')
el-badge(v-if='filters.tags.length+filters.places.length>0' is-dot type='warning')
nuxt-link(to='/settings')
el-menu-item(v-if='$auth.loggedIn' :title="$t('common.settings')")
@@ -38,14 +39,22 @@
</template>
<script>
import { Message } from 'element-ui'
import { mapState } from 'vuex'
import Search from '@/components/Search'
export default {
name: 'Nav',
components: { Search },
computed: {
could_add () {
return (this.$auth.loggedIn || this.settings.allow_anon_event)
},
...mapState(['filters', 'settings']),
},
methods: {
logout () {
Message({
showClose: true,
message: this.$t('common.logout_ok'),
type: 'success'
})

View File

@@ -13,12 +13,13 @@
inactive-color='lightgreen'
v-model='showPast'
)
el-select.search(v-model='filter' multiple
filterable collapse-tags default-first-option
:placeholder='$t("common.search")')
el-option(v-for='(keyword, id) in keywords' :key='keyword.value'
:label='keyword.label' :value='keyword.value')
no-ssr
el-select.search(v-model='filter'
multiple
filterable collapse-tags default-first-option
:placeholder='$t("common.search")')
el-option(v-for='(keyword, id) in keywords' :key='keyword.value'
:label='keyword.label' :value='keyword.value')
</template>