feat: show moderator who resolved report, close #395

This commit is contained in:
Xylight committed 2024-08-02 16:32:51 -07:00
1 parent c54969495b
commit d8975e31a4
6 files changed
+61 -32

No files matched your search

@@ -21,21 +21,26 @@
padding="none"
>
<div class="flex flex-row justify-between items-center gap-2">
<PostMeta
badges={{
nsfw: comment.post.nsfw,
removed: comment.post.removed,
admin: false,
moderator: false,
saved: false,
deleted: comment.post.deleted,
featured:
comment.post.featured_community || comment.post.featured_local,
locked: comment.post.locked,
}}
published={publishedToDate(comment.comment.published)}
community={community ? comment.community : undefined}
/>
<div class="flex flex-col gap-2">
<PostMeta
badges={{
nsfw: comment.post.nsfw,
removed: comment.post.removed,
admin: false,
moderator: false,
saved: false,
deleted: comment.post.deleted,
featured:
comment.post.featured_community || comment.post.featured_local,
locked: comment.post.locked,
}}
published={publishedToDate(comment.comment.published)}
community={community ? comment.community : undefined}
title={comment.post.name}
id={comment.post.id}
titleClass="text-sm"
/>
</div>
<Button
color="secondary"
href="/post/{comment.post.id}?thread={comment.comment.path}#{comment
@@ -44,15 +49,9 @@
class="self-start"
title="Jump"
>
<Icon src={ArrowUturnUp} size="16" mini />
<Icon src={ArrowUturnUp} size="16" micro />
</Button>
</div>
<a
href="/post/{getInstance()}/{comment.post.id}"
class="font-medium text-base"
>
{comment.post.name}
</a>
<div class="list-none">
<Comment
postId={comment.post.id}
@@ -251,7 +251,7 @@
hover:text-primary-900 hover:dark:text-primary-100 transition-colors
{$userSettings.font == 'satoshi/nunito'
? 'font-display font-semibold'
: 'font-medium'}"
: 'font-medium'} {$$props.titleClass ?? ''}"
class:text-slate-600={$userSettings.markReadPosts && read}
class:dark:text-zinc-400={$userSettings.markReadPosts && read}
class:text-base={view == 'compact'}
+8 -1
View File
@@ -1,3 +1,10 @@
<span {...$$restProps} class="text-lg font-semibold {$$props.class}">
<script lang="ts">
export let small: boolean = false
</script>
<span
{...$$restProps}
class="{!small ? 'text-lg' : 'text-xs'} font-semibold {$$props.class}"
>
<slot />
</span>
+3 -1
View File
@@ -252,7 +252,9 @@
},
"reason": "Reason",
"resolve": "Resolve",
"unresolve": "Unresolve"
"resolved": "Resolved",
"unresolve": "Unresolve",
"resolvedBy": "Resolved by"
},
"admin": {
"title": "Administration",
+4
View File
@@ -33,6 +33,7 @@ interface BaseReport {
timestamp: Date
resolved: boolean
id: number
resolver?: Person
}
export const generalizeCommentReport = (
@@ -51,6 +52,7 @@ export const generalizeCommentReport = (
timestamp: publishedToDate(report.comment_report.published),
resolved: report.comment_report.resolved,
id: report.comment_report.id,
resolver: report.resolver,
})
export const generalizePostReport = (report: PostReportView): ReportView => ({
@@ -69,6 +71,7 @@ export const generalizePostReport = (report: PostReportView): ReportView => ({
timestamp: publishedToDate(report.post_report.published),
resolved: report.post_report.resolved,
id: report.post_report.id,
resolver: report.resolver,
})
export const generalizePrivateMessageReport = (
@@ -82,6 +85,7 @@ export const generalizePrivateMessageReport = (
timestamp: publishedToDate(report.private_message_report.published),
resolved: report.private_message_report.resolved,
id: report.private_message_report.id,
resolver: report.resolver,
})
export type Report =