From 587ecddb135afac3e6bdbdff2a257b7f87b0af07 Mon Sep 17 00:00:00 2001 From: abron Date: Tue, 26 Aug 2025 16:59:44 +0330 Subject: [PATCH] colour problem --- src/pages/home/Home.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/pages/home/Home.tsx b/src/pages/home/Home.tsx index b2222386..57660200 100644 --- a/src/pages/home/Home.tsx +++ b/src/pages/home/Home.tsx @@ -50,6 +50,7 @@ interface Server { disabled: boolean; new: boolean; sortorder: number; + showcolor: string; } interface CachedData { @@ -67,6 +68,15 @@ const NewServerWrapper = styled.div` } `; +// Add a styled component for servers with custom colors +const ColoredServerWrapper = styled.div<{ customColor: string }>` + display: contents; + + a { + color: ${props => props.customColor}; + } +`; + const CACHE_KEY = "server_list_cache"; const CACHE_DURATION = 1 * 60 * 1000; // 1 minutes in milliseconds @@ -200,6 +210,15 @@ const Home: React.FC = () => { {buttonContent} ); + // Apply custom color if showcolor is specified + if (server.showcolor && server.showcolor.trim() !== '') { + content = ( + + {content} + + ); + } + return server.new ? ( {content} ) : (