feat: display webmaster in comments.
This commit is contained in:
parent
1edb447f0e
commit
da5e4b7392
@ -894,7 +894,8 @@
|
||||
background-color: var(--bg-warning);
|
||||
}
|
||||
|
||||
.badge-light {
|
||||
.badge-light,
|
||||
.badge-primary:hover {
|
||||
color: var(--color-secondary);
|
||||
background-color: var(--btn-light);
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
---
|
||||
import type { CommentItem } from '@/components/comment/types';
|
||||
import { formatLocalDate } from '@/helpers/formatter';
|
||||
import { urlJoin } from '@/helpers/tools';
|
||||
import { encodedEmail, urlJoin } from '@/helpers/tools';
|
||||
import options from '@/options';
|
||||
|
||||
interface Props {
|
||||
depth: number;
|
||||
@ -36,6 +37,13 @@ const { comment, depth, pending } = Astro.props;
|
||||
</a>
|
||||
)
|
||||
}
|
||||
{
|
||||
encodedEmail(options.author.email) === comment.email_encrypted && (
|
||||
<a class="badge badge-primary badge-pill" href={`mailto:${options.author.email}`}>
|
||||
站长
|
||||
</a>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
<div class="comment-content">
|
||||
<Fragment set:html={comment.content} />
|
||||
|
@ -4,6 +4,7 @@ export interface Comment {
|
||||
content: string;
|
||||
nick: string;
|
||||
user_id: number;
|
||||
email_encrypted: string;
|
||||
link: string;
|
||||
date: string;
|
||||
rid: number;
|
||||
|
Loading…
Reference in New Issue
Block a user