mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Use slugs instead of names for mentions
This commit is contained in:
parent
7492e6b8c3
commit
f5cf3d9b68
@ -132,9 +132,8 @@ export default {
|
||||
User: {
|
||||
query() {
|
||||
return gql(`{
|
||||
User(orderBy: name_asc) {
|
||||
User(orderBy: slug_asc) {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}`)
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
:class="{ 'is-selected': navigatedUserIndex === index }"
|
||||
@click="selectUser(user)"
|
||||
>
|
||||
{{ user.name }}
|
||||
@{{ user.slug }}
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
@ -287,7 +287,7 @@ export default {
|
||||
}
|
||||
const fuse = new Fuse(items, {
|
||||
threshold: 0.2,
|
||||
keys: ['name']
|
||||
keys: ['slug']
|
||||
})
|
||||
return fuse.search(query)
|
||||
}
|
||||
@ -360,7 +360,7 @@ export default {
|
||||
attrs: {
|
||||
// TODO: use router here
|
||||
url: `/profile/${user.id}`,
|
||||
label: user.name
|
||||
label: user.slug
|
||||
}
|
||||
})
|
||||
this.editor.focus()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user