mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Add hashtag for the comment id to the comments links of the list
This commit is contained in:
parent
40103e84e7
commit
f0923ad864
@ -1,7 +1,7 @@
|
|||||||
import gql from 'graphql-tag'
|
import gql from 'graphql-tag'
|
||||||
|
|
||||||
export default app => {
|
export default app => {
|
||||||
return gql(`
|
return gql`
|
||||||
query {
|
query {
|
||||||
Report(first: 20, orderBy: createdAt_desc) {
|
Report(first: 20, orderBy: createdAt_desc) {
|
||||||
id
|
id
|
||||||
@ -30,6 +30,7 @@ export default app => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
comment {
|
comment {
|
||||||
|
id
|
||||||
contentExcerpt
|
contentExcerpt
|
||||||
author {
|
author {
|
||||||
id
|
id
|
||||||
@ -76,5 +77,5 @@ export default app => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`)
|
`
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<ds-card space="small">
|
<ds-card space="small">
|
||||||
<ds-heading tag="h3">
|
<ds-heading tag="h3">{{ $t('moderation.reports.name') }}</ds-heading>
|
||||||
{{ $t('moderation.reports.name') }}
|
|
||||||
</ds-heading>
|
|
||||||
<ds-table v-if="Report && Report.length" :data="Report" :fields="fields" condensed>
|
<ds-table v-if="Report && Report.length" :data="Report" :fields="fields" condensed>
|
||||||
<template slot="name" slot-scope="scope">
|
<template slot="name" slot-scope="scope">
|
||||||
<div v-if="scope.row.type === 'Post'">
|
<div v-if="scope.row.type === 'Post'">
|
||||||
@ -15,23 +13,23 @@
|
|||||||
<b>{{ scope.row.post.title | truncate(50) }}</b>
|
<b>{{ scope.row.post.title | truncate(50) }}</b>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<br />
|
<br />
|
||||||
<ds-text size="small" color="soft">
|
<ds-text size="small" color="soft">{{ scope.row.post.author.name }}</ds-text>
|
||||||
{{ scope.row.post.author.name }}
|
|
||||||
</ds-text>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="scope.row.type === 'Comment'">
|
<div v-else-if="scope.row.type === 'Comment'">
|
||||||
<nuxt-link
|
<nuxt-link
|
||||||
:to="{
|
:to="{
|
||||||
name: 'post-id-slug',
|
name: 'post-id-slug',
|
||||||
params: { id: scope.row.comment.post.id, slug: scope.row.comment.post.slug },
|
params: {
|
||||||
|
id: scope.row.comment.post.id,
|
||||||
|
slug: scope.row.comment.post.slug,
|
||||||
|
},
|
||||||
|
hash: `#commentId-${scope.row.comment.id}`,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<b>{{ scope.row.comment.contentExcerpt | removeHtml | truncate(50) }}</b>
|
<b>{{ scope.row.comment.contentExcerpt | removeHtml | truncate(50) }}</b>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
<br />
|
<br />
|
||||||
<ds-text size="small" color="soft">
|
<ds-text size="small" color="soft">{{ scope.row.comment.author.name }}</ds-text>
|
||||||
{{ scope.row.comment.author.name }}
|
|
||||||
</ds-text>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<nuxt-link
|
<nuxt-link
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user