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 ...this.$store.state.instance.customEmoji
] }) ] })
}, },
userSuggestor () {
return suggestor({
users: this.$store.state.users.users,
updateUsersList: (query) => this.$store.dispatch('searchUsers', { query })
})
},
fieldsLimits () { fieldsLimits () {
return this.$store.state.instance.fieldsLimits return this.$store.state.instance.fieldsLimits
}, },

View file

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