From c51268836e6191c6a752b3463a5289a25930e48d Mon Sep 17 00:00:00 2001 From: Matthew Davies Date: Thu, 12 Sep 2024 10:15:31 -0700 Subject: [PATCH] you wanted dark mode? (#106) --- frontend/index.html | 2 +- frontend/src/components/HardwareImg.tsx | 2 +- frontend/src/components/HeardBy.tsx | 5 +- frontend/src/components/Layout.tsx | 2 +- frontend/src/components/Menu.tsx | 95 ++++++++++++++----- frontend/src/pages/Chat.tsx | 31 +++--- frontend/src/pages/Map.tsx | 41 +++++--- frontend/src/pages/MeshLog.tsx | 10 +- frontend/src/pages/MqttLog.tsx | 14 ++- frontend/src/pages/Neighbors.tsx | 74 ++++++++++----- frontend/src/pages/Node.tsx | 30 ++++-- frontend/src/pages/NodeMap.tsx | 30 ++++-- frontend/src/pages/Nodes.tsx | 120 +++++++++++++++--------- frontend/src/pages/Telemetry.tsx | 59 +++++++----- frontend/src/pages/Traceroutes.tsx | 52 ++++++++-- frontend/src/slices/appSlice.ts | 27 ++---- 16 files changed, 409 insertions(+), 185 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 796f71b..67a2fff 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,5 +1,5 @@ - + diff --git a/frontend/src/components/HardwareImg.tsx b/frontend/src/components/HardwareImg.tsx index dfa1300..a97f933 100644 --- a/frontend/src/components/HardwareImg.tsx +++ b/frontend/src/components/HardwareImg.tsx @@ -18,7 +18,7 @@ export const HardwareImg = ({ model }: { model: number }) => { src={`${import.meta.env.BASE_URL}images/hardware/${image}`} alt={modelName} title={modelName} - className="w-8 h-8 object-cover" + className="w-8 h-8 object-cover dark:brightness-5" /> ); }; diff --git a/frontend/src/components/HeardBy.tsx b/frontend/src/components/HeardBy.tsx index c1582b6..c8d44f4 100644 --- a/frontend/src/components/HeardBy.tsx +++ b/frontend/src/components/HeardBy.tsx @@ -9,7 +9,10 @@ export const HeardBy = () => { <> {" "} that have been heard by the mesh by{" "} - + {config?.server?.node_id} {" "} ({config?.server?.node_id}) diff --git a/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx index 1c03fcc..ffdb2a4 100644 --- a/frontend/src/components/Layout.tsx +++ b/frontend/src/components/Layout.tsx @@ -10,7 +10,7 @@ export const Layout = ({ children }: { children: React.ReactNode }) => {
{
-
+
{config?.mesh?.name?.split(" ").map((word, index) => ( - // eslint-disable-next-line react/no-array-index-key -
+
{word[0]} - {word.slice(1)} + + {word.slice(1)} +
))}
@@ -59,7 +64,10 @@ export const Menu = () => {
{config?.mesh?.description}
@@ -67,12 +75,16 @@ export const Menu = () => {