feat: components with custom background use transparent background

This commit is contained in:
hamster1963
2024-12-19 10:40:11 +08:00
parent d8c68ffe5f
commit 3d66582a3a
10 changed files with 106 additions and 8 deletions

View File

@@ -37,6 +37,10 @@ export default function ServerCardInline({
const showFlag = true
const customBackgroundImage =
// @ts-expect-error ShowNetTransfer is a global variable
(window.CustomBackgroundImage as string) !== "" ? window.CustomBackgroundImage : undefined
const parsedData = parsePublicNote(public_note)
let daysLeft = 0
@@ -55,6 +59,9 @@ export default function ServerCardInline({
<Card
className={cn(
"flex items-center lg:flex-row justify-start gap-3 p-3 md:px-5 cursor-pointer hover:bg-accent/50 transition-colors min-w-[900px] w-full",
{
"bg-card/50": customBackgroundImage,
},
)}
onClick={() => navigate(`/server/${serverInfo.id}`)}
>
@@ -221,6 +228,9 @@ export default function ServerCardInline({
<Card
className={cn(
"flex min-h-[61px] min-w-[900px] items-center justify-start gap-3 p-3 md:px-5 flex-row cursor-pointer hover:bg-accent/50 transition-colors",
{
"bg-card/50": customBackgroundImage,
},
)}
onClick={() => navigate(`/server/${serverInfo.id}`)}
>