make more generic
This commit is contained in:
parent
fc5f4fba8c
commit
1cf9780e05
4 changed files with 7 additions and 8 deletions
|
@ -1,5 +1,3 @@
|
||||||
import BlockCard from '../block_card/block_card.vue'
|
|
||||||
|
|
||||||
const debounceMilliseconds = 500
|
const debounceMilliseconds = 500
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -16,9 +14,6 @@ export default {
|
||||||
default: 'Search...'
|
default: 'Search...'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
|
||||||
BlockCard
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
term: '',
|
term: '',
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
<div class="user-autosuggest" v-click-outside="onClickOutside">
|
<div class="user-autosuggest" v-click-outside="onClickOutside">
|
||||||
<input v-model="term" :placeholder="placeholder" @click="onInputClick" class="user-autosuggest-input" />
|
<input v-model="term" :placeholder="placeholder" @click="onInputClick" class="user-autosuggest-input" />
|
||||||
<div class="user-autosuggest-results" v-if="resultsVisible && filtered.length > 0">
|
<div class="user-autosuggest-results" v-if="resultsVisible && filtered.length > 0">
|
||||||
<BlockCard v-for="userId in filtered" :key="userId" :userId="userId"/>
|
<slot v-for="item in filtered" :item="item">
|
||||||
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -78,7 +78,8 @@ const UserSettings = {
|
||||||
BlockList,
|
BlockList,
|
||||||
MuteList,
|
MuteList,
|
||||||
EmojiInput,
|
EmojiInput,
|
||||||
UserAutoSuggest
|
UserAutoSuggest,
|
||||||
|
BlockCard
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
user () {
|
user () {
|
||||||
|
|
|
@ -196,7 +196,9 @@
|
||||||
|
|
||||||
<div :label="$t('settings.blocks_tab')">
|
<div :label="$t('settings.blocks_tab')">
|
||||||
<div class="profile-edit-usersearch-wrapper">
|
<div class="profile-edit-usersearch-wrapper">
|
||||||
<UserAutoSuggest :filter="filterUnblockedUsers" :query="queryUserIds" placeholder="Search whom you want to block" />
|
<UserAutoSuggest :filter="filterUnblockedUsers" :query="queryUserIds" placeholder="Search whom you want to block">
|
||||||
|
<BlockCard slot-scope="row" :userId="row.item"/>
|
||||||
|
</UserAutoSuggest>
|
||||||
</div>
|
</div>
|
||||||
<block-list :refresh="true">
|
<block-list :refresh="true">
|
||||||
<template slot="empty">{{$t('settings.no_blocks')}}</template>
|
<template slot="empty">{{$t('settings.no_blocks')}}</template>
|
||||||
|
|
Loading…
Reference in a new issue