From 20b9a0c3f99e619b5528b60aabf13c27c985cfd8 Mon Sep 17 00:00:00 2001 From: the1812 Date: Fri, 11 Apr 2025 19:45:27 +0800 Subject: [PATCH] Fix vip danmaku styles (fix #5208) --- .../components/style/special-danmaku/index.md | 2 +- .../components/style/special-danmaku/index.ts | 8 ++---- .../special-danmaku/special-danmaku.scss | 25 +++++++++++-------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/registry/lib/components/style/special-danmaku/index.md b/registry/lib/components/style/special-danmaku/index.md index ef4443db6..0ded10f8a 100644 --- a/registry/lib/components/style/special-danmaku/index.md +++ b/registry/lib/components/style/special-danmaku/index.md @@ -1 +1 @@ -移除高赞弹幕或 UP 主弹幕的特殊样式, 弹幕内容不会移除. +移除高亮弹幕或 UP 主弹幕的特殊样式, 弹幕内容不会移除. 高亮弹幕包含点赞多的和大会员的彩色弹幕. diff --git a/registry/lib/components/style/special-danmaku/index.ts b/registry/lib/components/style/special-danmaku/index.ts index 0c2fb4a31..eb0390000 100644 --- a/registry/lib/components/style/special-danmaku/index.ts +++ b/registry/lib/components/style/special-danmaku/index.ts @@ -41,21 +41,17 @@ const watchDanmakuBorderSettings = () => { const options = defineOptionsMetadata({ highlight: { - displayName: '禁用高赞弹幕', + displayName: '禁用高亮弹幕', defaultValue: true, }, up: { - displayName: '禁用UP主弹幕', + displayName: '禁用 UP 主弹幕', defaultValue: true, }, upSlogan: { displayName: '禁用带货弹幕', defaultValue: true, }, - vip: { - displayName: '禁用大会员弹幕', - defaultValue: true, - }, }) type Options = OptionsOfMetadata diff --git a/registry/lib/components/style/special-danmaku/special-danmaku.scss b/registry/lib/components/style/special-danmaku/special-danmaku.scss index 0fd85e3dd..46f9c4c78 100644 --- a/registry/lib/components/style/special-danmaku/special-danmaku.scss +++ b/registry/lib/components/style/special-danmaku/special-danmaku.scss @@ -25,6 +25,21 @@ body.disable-highlight-danmaku-style { text-shadow: inherit; } } + + .bili-danmaku-x-dm-vip, + .bili-dm-vip { + display: contents !important; + text-shadow: inherit !important; + } + :where(.bili-dm, .bili-danmaku-x-dm):not([style*='--textShadow']) { + --textShadow: var(--danmaku-text-shadow); + } + .bili-danmaku-x-colorful { + background-clip: unset !important; + background-image: none !important; + --textShadow: var(--danmaku-text-shadow); + text-shadow: var(--textShadow) !important; + } } body.disable-up-danmaku-style { .bili-danmaku-x-up, @@ -40,16 +55,6 @@ body.disable-up-danmaku-style { } } } -body.disable-vip-danmaku-style { - .bili-danmaku-x-dm-vip, - .bili-dm-vip { - display: contents !important; - text-shadow: inherit !important; - } - :where(.bili-dm, .bili-danmaku-x-dm):not([style*='--textShadow']) { - --textShadow: var(--danmaku-text-shadow); - } -} body.disable-upSlogan-danmaku-style { .bili-danmaku-x-upslogan, .bili-upslogan {