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