biome format --write
This commit is contained in:
parent
8372348148
commit
9262e803ec
415 changed files with 54076 additions and 17419 deletions
|
|
@ -4,30 +4,32 @@ import { mapGetters, mapState } from 'vuex'
|
|||
import BasicUserCard from '../basic_user_card/basic_user_card.vue'
|
||||
|
||||
const StaffPanel = {
|
||||
created () {
|
||||
created() {
|
||||
const nicknames = this.$store.state.instance.staffAccounts
|
||||
nicknames.forEach(nickname => this.$store.dispatch('fetchUserIfMissing', nickname))
|
||||
nicknames.forEach((nickname) =>
|
||||
this.$store.dispatch('fetchUserIfMissing', nickname),
|
||||
)
|
||||
},
|
||||
components: {
|
||||
BasicUserCard
|
||||
BasicUserCard,
|
||||
},
|
||||
computed: {
|
||||
groupedStaffAccounts () {
|
||||
const staffAccounts = map(this.staffAccounts, this.findUserByName).filter(_ => _)
|
||||
groupedStaffAccounts() {
|
||||
const staffAccounts = map(this.staffAccounts, this.findUserByName).filter(
|
||||
(_) => _,
|
||||
)
|
||||
const groupedStaffAccounts = groupBy(staffAccounts, 'role')
|
||||
|
||||
return [
|
||||
{ role: 'admin', users: groupedStaffAccounts.admin },
|
||||
{ role: 'moderator', users: groupedStaffAccounts.moderator }
|
||||
].filter(group => group.users)
|
||||
{ role: 'moderator', users: groupedStaffAccounts.moderator },
|
||||
].filter((group) => group.users)
|
||||
},
|
||||
...mapGetters([
|
||||
'findUserByName'
|
||||
]),
|
||||
...mapGetters(['findUserByName']),
|
||||
...mapState({
|
||||
staffAccounts: state => state.instance.staffAccounts
|
||||
})
|
||||
}
|
||||
staffAccounts: (state) => state.instance.staffAccounts,
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
export default StaffPanel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue