mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
linkable admin tabs
This commit is contained in:
parent
5baff1adb1
commit
d00ef15811
1 changed files with 31 additions and 24 deletions
|
@ -6,56 +6,56 @@ v-container.container.pa-0.pa-md-3
|
||||||
v-tabs(v-model='selectedTab' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft')
|
v-tabs(v-model='selectedTab' show-arrows :next-icon='mdiChevronRight' :prev-icon='mdiChevronLeft')
|
||||||
|
|
||||||
//- SETTINGS
|
//- SETTINGS
|
||||||
v-tab {{$t('common.settings')}}
|
v-tab(href='#settings') {{$t('common.settings')}}
|
||||||
v-tab-item
|
v-tab-item(value='settings')
|
||||||
Settings
|
Settings
|
||||||
|
|
||||||
//- THEME
|
//- THEME
|
||||||
v-tab {{$t('common.theme')}}
|
v-tab(href='#theme') {{$t('common.theme')}}
|
||||||
v-tab-item
|
v-tab-item(value='theme')
|
||||||
Theme
|
Theme
|
||||||
|
|
||||||
//- USERS
|
//- USERS
|
||||||
v-tab
|
v-tab(href='#users')
|
||||||
v-badge(:value='!!unconfirmedUsers.length' :content='unconfirmedUsers.length') {{$t('common.users')}}
|
v-badge(:value='!!unconfirmedUsers.length' :content='unconfirmedUsers.length') {{$t('common.users')}}
|
||||||
v-tab-item
|
v-tab-item(value='users')
|
||||||
Users(:users='users' @update='updateUsers')
|
Users(:users='users' @update='updateUsers')
|
||||||
|
|
||||||
//- PLACES
|
//- PLACES
|
||||||
v-tab {{$t('common.places')}}
|
v-tab(href='#places') {{$t('common.places')}}
|
||||||
v-tab-item
|
v-tab-item(value='places')
|
||||||
Places
|
Places
|
||||||
|
|
||||||
//- Collections
|
//- Collections
|
||||||
v-tab {{$t('common.collections')}}
|
v-tab(href='#collections') {{$t('common.collections')}}
|
||||||
v-tab-item
|
v-tab-item(value='collections')
|
||||||
Collections
|
Collections
|
||||||
|
|
||||||
//- EVENTS
|
//- EVENTS
|
||||||
v-tab
|
v-tab(href='#unconfirmed_events')
|
||||||
v-badge(:value='!!unconfirmedEvents.length' :content='unconfirmedEvents.length') {{$t('common.events')}}
|
v-badge(:value='!!unconfirmedEvents.length' :content='unconfirmedEvents.length') {{$t('common.events')}}
|
||||||
v-tab-item
|
v-tab-item(value='unconfirmed_events')
|
||||||
Events(:unconfirmedEvents='unconfirmedEvents'
|
Events(:unconfirmedEvents='unconfirmedEvents'
|
||||||
@confirmed='id => { unconfirmedEvents = unconfirmedEvents.filter(e => e.id !== id)}')
|
@confirmed='id => { unconfirmedEvents = unconfirmedEvents.filter(e => e.id !== id)}')
|
||||||
|
|
||||||
//- ANNOUNCEMENTS
|
//- ANNOUNCEMENTS
|
||||||
v-tab {{$t('common.announcements')}}
|
v-tab(href='#announcements') {{$t('common.announcements')}}
|
||||||
v-tab-item
|
v-tab-item(value='announcements')
|
||||||
Announcement
|
Announcement
|
||||||
|
|
||||||
//- PLUGINS
|
//- PLUGINS
|
||||||
v-tab {{$t('common.plugins')}}
|
v-tab(href='#plugins') {{$t('common.plugins')}}
|
||||||
v-tab-item
|
v-tab-item(value='plugins')
|
||||||
Plugin
|
Plugin
|
||||||
|
|
||||||
//- FEDERATION
|
//- FEDERATION
|
||||||
v-tab {{$t('common.federation')}}
|
v-tab(href='#federation') {{$t('common.federation')}}
|
||||||
v-tab-item
|
v-tab-item(value='federation')
|
||||||
Federation
|
Federation
|
||||||
|
|
||||||
//- MODERATION
|
//- MODERATION
|
||||||
v-tab(v-if='settings.enable_federation') {{$t('common.moderation')}}
|
v-tab(v-if='settings.enable_federation' href='#moderation') {{$t('common.moderation')}}
|
||||||
v-tab-item
|
v-tab-item(value='moderation')
|
||||||
Moderation
|
Moderation
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -88,9 +88,9 @@ export default {
|
||||||
try {
|
try {
|
||||||
const users = await $axios.$get('/users')
|
const users = await $axios.$get('/users')
|
||||||
const unconfirmedEvents = await $axios.$get('/event/unconfirmed')
|
const unconfirmedEvents = await $axios.$get('/event/unconfirmed')
|
||||||
return { users, unconfirmedEvents, selectedTab: 0, url }
|
return { users, unconfirmedEvents, url }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return { users: [], unconfirmedEvents: [], selectedTab: 0, url }
|
return { users: [], unconfirmedEvents: [], url }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -99,7 +99,6 @@ export default {
|
||||||
users: [],
|
users: [],
|
||||||
description: '',
|
description: '',
|
||||||
unconfirmedEvents: [],
|
unconfirmedEvents: [],
|
||||||
selectedTab: 0
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
head () {
|
head () {
|
||||||
|
@ -109,7 +108,15 @@ export default {
|
||||||
...mapState(['settings']),
|
...mapState(['settings']),
|
||||||
unconfirmedUsers () {
|
unconfirmedUsers () {
|
||||||
return this.users.filter(u => !u.is_active)
|
return this.users.filter(u => !u.is_active)
|
||||||
}
|
},
|
||||||
|
selectedTab: {
|
||||||
|
set (tab) {
|
||||||
|
this.$router.replace({ query: { ...this.$route.query, tab } })
|
||||||
|
},
|
||||||
|
get () {
|
||||||
|
return this.$route.query.tab
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async updateUsers () {
|
async updateUsers () {
|
||||||
|
|
Loading…
Reference in a new issue