forked from AkkomaGang/akkoma-fe
add search to the mutes tab as well
This commit is contained in:
parent
0bdb0e5a81
commit
d58e08cf52
2 changed files with 13 additions and 1 deletions
|
@ -79,7 +79,8 @@ const UserSettings = {
|
||||||
MuteList,
|
MuteList,
|
||||||
EmojiInput,
|
EmojiInput,
|
||||||
Autosuggest,
|
Autosuggest,
|
||||||
BlockCard
|
BlockCard,
|
||||||
|
MuteCard
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
user () {
|
user () {
|
||||||
|
@ -347,6 +348,12 @@ const UserSettings = {
|
||||||
return !user || user.statusnet_blocking || user.id === this.$store.state.users.currentUser.id
|
return !user || user.statusnet_blocking || user.id === this.$store.state.users.currentUser.id
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
filterUnMutedUsers (userIds) {
|
||||||
|
return reject(userIds, (userId) => {
|
||||||
|
const user = this.$store.getters.findUser(userId)
|
||||||
|
return !user || user.muted || user.id === this.$store.state.users.currentUser.id
|
||||||
|
})
|
||||||
|
},
|
||||||
queryUserIds (query) {
|
queryUserIds (query) {
|
||||||
return userSearchApi.search({query, store: this.$store})
|
return userSearchApi.search({query, store: this.$store})
|
||||||
.then((users) => {
|
.then((users) => {
|
||||||
|
|
|
@ -206,6 +206,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :label="$t('settings.mutes_tab')">
|
<div :label="$t('settings.mutes_tab')">
|
||||||
|
<div class="profile-edit-usersearch-wrapper">
|
||||||
|
<Autosuggest :filter="filterUnMutedUsers" :query="queryUserIds" placeholder="Search whom you want to mute">
|
||||||
|
<MuteCard slot-scope="row" :userId="row.item"/>
|
||||||
|
</Autosuggest>
|
||||||
|
</div>
|
||||||
<mute-list :refresh="true">
|
<mute-list :refresh="true">
|
||||||
<template slot="empty">{{$t('settings.no_mutes')}}</template>
|
<template slot="empty">{{$t('settings.no_mutes')}}</template>
|
||||||
</mute-list>
|
</mute-list>
|
||||||
|
|
Loading…
Reference in a new issue