diff --git a/src/assets/styles/globals.css b/src/assets/styles/globals.css index 953a795..aee6f63 100644 --- a/src/assets/styles/globals.css +++ b/src/assets/styles/globals.css @@ -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); } diff --git a/src/components/comment/CommentItem.astro b/src/components/comment/CommentItem.astro index e2635e3..ef74668 100644 --- a/src/components/comment/CommentItem.astro +++ b/src/components/comment/CommentItem.astro @@ -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; ) } + { + encodedEmail(options.author.email) === comment.email_encrypted && ( + + 站长 + + ) + }
diff --git a/src/components/comment/types.ts b/src/components/comment/types.ts index e7e7f85..a6bc259 100644 --- a/src/components/comment/types.ts +++ b/src/components/comment/types.ts @@ -4,6 +4,7 @@ export interface Comment { content: string; nick: string; user_id: number; + email_encrypted: string; link: string; date: string; rid: number;