implement user suggestor for profile fields

This commit is contained in:
kPherox 2020-06-19 21:18:36 +09:00
parent fd2157efe4
commit bad3dacfac
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D
2 changed files with 10 additions and 2 deletions

View File

@ -65,6 +65,12 @@ const ProfileTab = {
...this.$store.state.instance.customEmoji
] })
},
userSuggestor () {
return suggestor({
users: this.$store.state.users.users,
updateUsersList: (query) => this.$store.dispatch('searchUsers', { query })
})
},
fieldsLimits () {
return this.$store.state.instance.fieldsLimits
},

View File

@ -104,8 +104,9 @@
>
<EmojiInput
v-model="newFields[i].name"
:suggest="emojiSuggestor"
enable-emoji-picker
hide-emoji-button
:suggest="userSuggestor"
>
<input
v-model="newFields[i].name"
@ -114,8 +115,9 @@
</EmojiInput>
<EmojiInput
v-model="newFields[i].value"
:suggest="emojiSuggestor"
enable-emoji-picker
hide-emoji-button
:suggest="userSuggestor"
>
<input
v-model="newFields[i].value"