From df41c196eb0a18cd1a6c1fc7965392422723690f Mon Sep 17 00:00:00 2001 From: the1812 Date: Tue, 15 Nov 2022 22:38:27 +0800 Subject: [PATCH] Support V2 comment area (#3807) --- .../style/simplify/comments/comments-v2.scss | 84 +++++++++++++++++++ .../style/simplify/comments/index.md | 10 +++ .../style/simplify/comments/index.ts | 17 +--- 3 files changed, 98 insertions(+), 13 deletions(-) create mode 100644 registry/lib/components/style/simplify/comments/comments-v2.scss create mode 100644 registry/lib/components/style/simplify/comments/index.md diff --git a/registry/lib/components/style/simplify/comments/comments-v2.scss b/registry/lib/components/style/simplify/comments/comments-v2.scss new file mode 100644 index 000000000..0bf22d662 --- /dev/null +++ b/registry/lib/components/style/simplify/comments/comments-v2.scss @@ -0,0 +1,84 @@ +@import 'common'; + +$prefix: 'simplifyComments-switch'; + +.bili-comment { + .reply-item { + // body.#{$prefix}-level & { + .user-level, + .sub-user-level { + display: none !important; + } + // } + // body.#{$prefix}-subReplyNewline & { + .sub-user-info { + display: flex !important; + } + // } + // body.#{$prefix}-layout & { + .reply-decorate { + display: none !important; + } + .sub-user-info, + .sub-user-name { + line-height: 1.5 !important; + } + .sub-user-info { + margin-bottom: 2px !important; + } + .reply-content { + display: block !important; + flex-basis: 100% !important; + } + .sub-reply-content { + padding: 4px 0 !important; + } + .root-reply { + display: flex !important; + align-items: center !important; + flex-wrap: wrap !important; + } + .root-reply, + .reply-info, + .sub-reply-info { + position: static !important; + } + .reply-info, + .sub-reply-info { + display: inline-flex !important; + } + .reply-time, + .sub-reply-time { + position: absolute !important; + top: 0 !important; + right: 0 !important; + margin-right: 0 !important; + line-height: 1.5 !important; + } + .sub-reply-time { + top: 8px !important; + } + .reply-operation-warp, + .sub-reply-operation-warp { + right: 0 !important; + } + .reply-tag-list { + display: inline-flex !important; + margin: 2px 0 0 18px !important; + .reply-tag-item { + padding: 4px 6px !important; + } + } + // } + } + // body.#{$prefix}-replyEditor & { + .reply-box-send { + .send-text { + font-size: 14px !important; + } + } + .reply-box-textarea { + line-height: normal !important; + } + // } +} diff --git a/registry/lib/components/style/simplify/comments/index.md b/registry/lib/components/style/simplify/comments/index.md new file mode 100644 index 000000000..9397c398a --- /dev/null +++ b/registry/lib/components/style/simplify/comments/index.md @@ -0,0 +1,10 @@ +- 删除热评头像下方的关注按钮 +- 删除用户的等级标识 +- 删除发送源信息(\`来自安卓客户端\` 这种) +- 删除用户名右边的勋章 +- 删除评论区顶部的横幅 +- 发送时间移动到右上角 +- 位图图标全部换用矢量图标, 高分屏不会模糊 +- 投票仅显示链接, 隐藏下面的大框. + +> 注: 关注和等级可以通过鼠标停留在头像上, 在弹出的资料卡小窗中查看. diff --git a/registry/lib/components/style/simplify/comments/index.ts b/registry/lib/components/style/simplify/comments/index.ts index df4ba4429..2f49e04d5 100644 --- a/registry/lib/components/style/simplify/comments/index.ts +++ b/registry/lib/components/style/simplify/comments/index.ts @@ -18,20 +18,11 @@ export const component = defineComponentMetadata({ name, style: () => import('./comments.scss'), }, + { + name, + style: () => import('./comments-v2.scss'), + }, ], displayName: '简化评论区', - description: { - 'zh-CN': ` -- 删除热评头像下方的关注按钮 -- 删除用户的等级标识 -- 删除发送源信息(\`来自安卓客户端\` 这种) -- 删除用户名右边的勋章 -- 删除评论区顶部的横幅 -- 发送时间移动到右上角 -- 位图图标全部换用矢量图标, 高分屏不会模糊 -- 投票仅显示链接, 隐藏下面的大框. - -> 注: 关注和等级可以通过鼠标停留在头像上, 在弹出的资料卡小窗中查看.`.trim(), - }, tags: [componentsTags.style], })