mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix mentions and hashtags in editor
This commit is contained in:
parent
c5ff3b5c6d
commit
43c2764fcf
@ -212,7 +212,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
// Set array of optional extensions by analysing the props.
|
// Set array of optional extensions by analysing the props.
|
||||||
let optionalExtensions = []
|
let optionalExtensions = []
|
||||||
if (this.users && this.users.length) {
|
// Don't change the following line. The functionallity is in danger!
|
||||||
|
if (this.users) {
|
||||||
optionalExtensions.push(
|
optionalExtensions.push(
|
||||||
new Mention({
|
new Mention({
|
||||||
// a list of all suggested items
|
// a list of all suggested items
|
||||||
@ -287,7 +288,8 @@ export default {
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (this.hashtags && this.hashtags.length) {
|
// Don't change the following line. The functionallity is in danger!
|
||||||
|
if (this.hashtags) {
|
||||||
optionalExtensions.push(
|
optionalExtensions.push(
|
||||||
new Hashtag({
|
new Hashtag({
|
||||||
// a list of all suggested items
|
// a list of all suggested items
|
||||||
|
|||||||
@ -104,14 +104,16 @@ export default {
|
|||||||
apollo: {
|
apollo: {
|
||||||
User: {
|
User: {
|
||||||
query() {
|
query() {
|
||||||
return gql(`{
|
return gql`
|
||||||
User(orderBy: slug_asc) {
|
{
|
||||||
id
|
User(orderBy: slug_asc) {
|
||||||
slug
|
id
|
||||||
name
|
slug
|
||||||
avatar
|
name
|
||||||
|
avatar
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}`)
|
`
|
||||||
},
|
},
|
||||||
result(result) {
|
result(result) {
|
||||||
this.users = result.data.User
|
this.users = result.data.User
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user