From b2998752a6836bca7783bcd798cb9ba2e18fe7c4 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Fri, 20 Dec 2024 23:32:52 +0800 Subject: [PATCH] fix: opacity on dark mode --- src/components/CycleTransferStatsClient.tsx | 2 +- src/components/GroupSwitch.tsx | 2 +- src/components/LanguageSwitcher.tsx | 2 +- src/components/NetworkChart.tsx | 2 +- src/components/ServerCard.tsx | 4 ++-- src/components/ServerCardInline.tsx | 4 ++-- src/components/ServerDetailChart.tsx | 14 +++++++------- src/components/ServerDetailOverview.tsx | 2 +- src/components/ServerOverview.tsx | 8 ++++---- src/components/ServiceTrackerClient.tsx | 2 +- src/components/TabSwitch.tsx | 2 +- src/components/ThemeSwitcher.tsx | 2 +- src/pages/Server.tsx | 8 ++++---- 13 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/components/CycleTransferStatsClient.tsx b/src/components/CycleTransferStatsClient.tsx index 5858334..ebae6bb 100644 --- a/src/components/CycleTransferStatsClient.tsx +++ b/src/components/CycleTransferStatsClient.tsx @@ -31,7 +31,7 @@ export const CycleTransferStatsClient: React.FC = "w-full bg-white px-4 py-3 rounded-lg border bg-card text-card-foreground shadow-lg shadow-neutral-200/40 dark:shadow-none space-y-2", className, { - "bg-card/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, )} > diff --git a/src/components/GroupSwitch.tsx b/src/components/GroupSwitch.tsx index 78fc34a..144b684 100644 --- a/src/components/GroupSwitch.tsx +++ b/src/components/GroupSwitch.tsx @@ -17,7 +17,7 @@ export default function GroupSwitch({
{tabs.map((tab: string) => ( diff --git a/src/components/LanguageSwitcher.tsx b/src/components/LanguageSwitcher.tsx index a413793..a6bc7db 100644 --- a/src/components/LanguageSwitcher.tsx +++ b/src/components/LanguageSwitcher.tsx @@ -33,7 +33,7 @@ export function LanguageSwitcher() { variant="outline" size="sm" className={cn("rounded-full px-[9px] bg-white dark:bg-black", { - "bg-white/80 dark:bg-black/80": customBackgroundImage, + "bg-white/70 dark:bg-black/70": customBackgroundImage, })} > {localeItems.find((item) => item.code === locale)?.name} diff --git a/src/components/NetworkChart.tsx b/src/components/NetworkChart.tsx index 4b9ebf8..c89de45 100644 --- a/src/components/NetworkChart.tsx +++ b/src/components/NetworkChart.tsx @@ -242,7 +242,7 @@ export const NetworkChartClient = React.memo(function NetworkChart({ return ( diff --git a/src/components/ServerCard.tsx b/src/components/ServerCard.tsx index 09ec320..eaca340 100644 --- a/src/components/ServerCard.tsx +++ b/src/components/ServerCard.tsx @@ -43,7 +43,7 @@ export default function ServerCard({ now, serverInfo }: { now: number; serverInf "lg:flex-row": !fixedTopServerName, }, { - "bg-card/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, )} onClick={() => navigate(`/server/${serverInfo.id}`)} @@ -141,7 +141,7 @@ export default function ServerCard({ now, serverInfo }: { now: number; serverInf "lg:flex-row": !fixedTopServerName, }, { - "bg-card/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, )} onClick={() => navigate(`/server/${serverInfo.id}`, { replace: true })} diff --git a/src/components/ServerCardInline.tsx b/src/components/ServerCardInline.tsx index 4625139..1bd27ab 100644 --- a/src/components/ServerCardInline.tsx +++ b/src/components/ServerCardInline.tsx @@ -34,7 +34,7 @@ export default function ServerCardInline({ now, serverInfo }: { now: number; ser 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/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, )} onClick={() => navigate(`/server/${serverInfo.id}`)} @@ -118,7 +118,7 @@ export default function ServerCardInline({ now, serverInfo }: { now: number; ser className={cn( "flex min-h-[61px] min-w-[900px] items-center justify-start p-3 md:px-5 flex-row cursor-pointer hover:bg-accent/50 transition-colors", { - "bg-card/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, )} onClick={() => navigate(`/server/${serverInfo.id}`)} diff --git a/src/components/ServerDetailChart.tsx b/src/components/ServerDetailChart.tsx index bb17852..a307c0f 100644 --- a/src/components/ServerDetailChart.tsx +++ b/src/components/ServerDetailChart.tsx @@ -125,7 +125,7 @@ function GpuChart({ now, gpuStat, gpuName }: { now: number; gpuStat: number; gpu return ( @@ -207,7 +207,7 @@ function CpuChart({ now, data }: { now: number; data: NezhaServer }) { return ( @@ -287,7 +287,7 @@ function ProcessChart({ now, data }: { now: number; data: NezhaServer }) { return ( @@ -376,7 +376,7 @@ function MemChart({ now, data }: { now: number; data: NezhaServer }) { return ( @@ -489,7 +489,7 @@ function DiskChart({ now, data }: { now: number; data: NezhaServer }) { return ( @@ -583,7 +583,7 @@ function NetworkChart({ now, data }: { now: number; data: NezhaServer }) { return ( @@ -691,7 +691,7 @@ function ConnectChart({ now, data }: { now: number; data: NezhaServer }) { return ( diff --git a/src/components/ServerDetailOverview.tsx b/src/components/ServerDetailOverview.tsx index 553ed42..1e80a9a 100644 --- a/src/components/ServerDetailOverview.tsx +++ b/src/components/ServerDetailOverview.tsx @@ -62,7 +62,7 @@ export default function ServerDetailOverview({ server_id }: { server_id: string return (
@@ -59,7 +59,7 @@ export default function ServerOverview({ online, offline, total, up, down, upSpe className={cn( "cursor-pointer hover:ring-green-500 ring-1 ring-transparent transition-all", { - "bg-card/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, { "ring-green-500 ring-2 border-transparent": status === "online", @@ -87,7 +87,7 @@ export default function ServerOverview({ online, offline, total, up, down, upSpe className={cn( "cursor-pointer hover:ring-red-500 ring-1 ring-transparent transition-all", { - "bg-card/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, { "ring-red-500 ring-2 border-transparent": status === "offline", @@ -109,7 +109,7 @@ export default function ServerOverview({ online, offline, total, up, down, upSpe diff --git a/src/components/ServiceTrackerClient.tsx b/src/components/ServiceTrackerClient.tsx index 3fa16cd..96c502e 100644 --- a/src/components/ServiceTrackerClient.tsx +++ b/src/components/ServiceTrackerClient.tsx @@ -26,7 +26,7 @@ export const ServiceTrackerClient: React.FC = ({ days, clas "w-full space-y-3 bg-white px-4 py-4 rounded-lg border bg-card text-card-foreground shadow-lg shadow-neutral-200/40 dark:shadow-none", className, { - "bg-card/80": customBackgroundImage, + "bg-card/70": customBackgroundImage, }, )} > diff --git a/src/components/TabSwitch.tsx b/src/components/TabSwitch.tsx index 7fb1a37..5ca2970 100644 --- a/src/components/TabSwitch.tsx +++ b/src/components/TabSwitch.tsx @@ -11,7 +11,7 @@ export default function TabSwitch({ tabs, currentTab, setCurrentTab }: { tabs: s
{tabs.map((tab: string) => ( diff --git a/src/components/ThemeSwitcher.tsx b/src/components/ThemeSwitcher.tsx index 6838fc9..94f22d8 100644 --- a/src/components/ThemeSwitcher.tsx +++ b/src/components/ThemeSwitcher.tsx @@ -28,7 +28,7 @@ export function ModeToggle() { variant="outline" size="sm" className={cn("rounded-full px-[9px] bg-white dark:bg-black", { - "bg-white/80 dark:bg-black/80": customBackgroundImage, + "bg-white/70 dark:bg-black/70": customBackgroundImage, })} > diff --git a/src/pages/Server.tsx b/src/pages/Server.tsx index efaa765..c6ee667 100644 --- a/src/pages/Server.tsx +++ b/src/pages/Server.tsx @@ -202,7 +202,7 @@ export default function Servers() { "shadow-[inset_0_1px_0_rgba(0,0,0,0.2)] bg-blue-500": showMap === "1", }, { - "bg-opacity-80": customBackgroundImage, + "bg-opacity-70": customBackgroundImage, }, )} > @@ -219,7 +219,7 @@ export default function Servers() { "shadow-[inset_0_1px_0_rgba(0,0,0,0.2)] bg-blue-500": showServices === "1", }, { - "bg-opacity-80": customBackgroundImage, + "bg-opacity-70": customBackgroundImage, }, )} > @@ -236,7 +236,7 @@ export default function Servers() { "shadow-[inset_0_1px_0_rgba(0,0,0,0.2)] bg-blue-500": inline === "1", }, { - "bg-opacity-80": customBackgroundImage, + "bg-opacity-70": customBackgroundImage, }, )} > @@ -253,7 +253,7 @@ export default function Servers() { "shadow-[inset_0_1px_0_rgba(0,0,0,0.2)] dark:bg-stone-700 bg-stone-200": settingsOpen, }, { - "dark:bg-stone-800/80 bg-stone-100/80 ": customBackgroundImage, + "dark:bg-stone-800/70 bg-stone-100/70 ": customBackgroundImage, }, )} >