[admin] show n of unconfirmed users/events
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
template(slot='label')
|
template(slot='label')
|
||||||
v-icon(name='users')
|
v-icon(name='users')
|
||||||
span.ml-1 {{$t('common.users')}}
|
span.ml-1 {{$t('common.users')}}
|
||||||
|
el-badge(v-show='unconfirmedUsers.length>0' :value='unconfirmedUsers.length')
|
||||||
Users(:users='users')
|
Users(:users='users')
|
||||||
|
|
||||||
//- PLACES
|
//- PLACES
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
template(slot='label')
|
template(slot='label')
|
||||||
v-icon(name='calendar')
|
v-icon(name='calendar')
|
||||||
span.ml-1 {{$t('common.events')}}
|
span.ml-1 {{$t('common.events')}}
|
||||||
|
el-badge(v-show='events.length>0' :value='events.length')
|
||||||
p {{$t('admin.event_confirm_description')}}
|
p {{$t('admin.event_confirm_description')}}
|
||||||
el-table(:data='paginatedEvents' small primary-key='id' v-loading='loading')
|
el-table(:data='paginatedEvents' small primary-key='id' v-loading='loading')
|
||||||
el-table-column(:label='$t("common.name")' width='300')
|
el-table-column(:label='$t("common.name")' width='300')
|
||||||
@@ -83,13 +85,16 @@ export default {
|
|||||||
const users = await $axios.$get('/users')
|
const users = await $axios.$get('/users')
|
||||||
const events = await $axios.$get('/event/unconfirmed')
|
const events = await $axios.$get('/event/unconfirmed')
|
||||||
const instances = await $axios.$get('/instances')
|
const instances = await $axios.$get('/instances')
|
||||||
return { users, events, instances, mastodon_instance: store.state.settings.mastodon_instance }
|
return { users, events, instances }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['settings']),
|
...mapState(['settings']),
|
||||||
|
unconfirmedUsers () {
|
||||||
|
return this.users.filter(u => !u.is_active)
|
||||||
|
},
|
||||||
paginatedEvents () {
|
paginatedEvents () {
|
||||||
return this.events.slice((this.eventPage - 1) * this.perPage,
|
return this.events.slice((this.eventPage - 1) * this.perPage,
|
||||||
this.eventPage * this.perPage)
|
this.eventPage * this.perPage)
|
||||||
|
|||||||
Reference in New Issue
Block a user