diff --git a/frontend/lib/main.ts b/frontend/lib/main.ts index e2c9ecc5..4ae7c0da 100644 --- a/frontend/lib/main.ts +++ b/frontend/lib/main.ts @@ -3,6 +3,9 @@ import iconAddComment from "iconify/add-comment-outline-rounded"; import iconComment from "iconify/comment-outline-rounded"; import iconClose from "iconify/close"; import iconDefaultAvatar from "iconify/account-circle"; +import iconShare from "iconify/share"; +import iconEdit from "iconify/edit"; +import iconDelete from "iconify/delete"; const groupBy = function (arr: T[], func: (el: T) => K) { return arr.reduce( @@ -647,9 +650,9 @@ const _renderComments = (comments: Comment[]) => { 发布于 ${dateTimeFormatter.format(new Date(comment.created_time))} 最后编辑于 ${comment.last_edited_time ? dateTimeFormatter.format(new Date(comment.last_edited_time)) : ""}
- - - + + +
@@ -742,9 +745,8 @@ const _renderComments = (comments: Comment[]) => { } for (const actions of container.querySelectorAll(".comment_actions_item")) { - actions.addEventListener("click", (e) => { - if (!(e.target instanceof HTMLButtonElement)) return; - const target = e.target as HTMLButtonElement; + actions.addEventListener("click", () => { + const target = actions as HTMLButtonElement; const textarea = container.querySelector( ".comment_actions_panel textarea", diff --git a/frontend/lib/style.css b/frontend/lib/style.css index 21bcb639..7d19556c 100644 --- a/frontend/lib/style.css +++ b/frontend/lib/style.css @@ -332,7 +332,7 @@ & .comment_header { display: flex; - align-items: baseline; + align-items: center; flex-wrap: wrap;