From ec3323077a42c84ece2ee7c6dd0be57a99cf1476 Mon Sep 17 00:00:00 2001 From: Sacha Weatherstone Date: Sat, 19 Feb 2022 23:57:34 +1100 Subject: [PATCH] More tooltips & Plugin enabled status indicators --- .../layout/Sidebar/Settings/Index.tsx | 64 +++++++++++++++++-- src/pages/Nodes/NodeCard.tsx | 2 + 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/src/components/layout/Sidebar/Settings/Index.tsx b/src/components/layout/Sidebar/Settings/Index.tsx index d327cbe5..ecd84afc 100644 --- a/src/components/layout/Sidebar/Settings/Index.tsx +++ b/src/components/layout/Sidebar/Settings/Index.tsx @@ -15,6 +15,7 @@ import { FiZap, } from 'react-icons/fi'; +import { useAppSelector } from '@app/hooks/useAppSelector.js'; import { CollapsibleSection } from '@components/generic/Sidebar/CollapsibleSection'; import { ExternalSection } from '@components/generic/Sidebar/ExternalSection'; import { SidebarOverlay } from '@components/generic/Sidebar/SidebarOverlay'; @@ -39,7 +40,12 @@ export interface SettingsProps { export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => { const [pluginsOpen, setPluginsOpen] = React.useState(false); const [channelsOpen, setChannelsOpen] = React.useState(false); - // const { hasGps, hasWifi } = useAppSelector((state) => state.meshtastic.radio.hardware); + const { + rangeTestPluginEnabled, + extNotificationPluginEnabled, + serialpluginEnabled, + storeForwardPluginEnabled, + } = useAppSelector((state) => state.meshtastic.radio.preferences); const hasGps = true; const hasWifi = true; @@ -100,16 +106,64 @@ export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => { }} direction="x" > - }> + + +
+
+ } + >
- }> + + +
+
+ } + >
- }> + + +
+
+ } + >
- }> + + +
+
+ } + >
diff --git a/src/pages/Nodes/NodeCard.tsx b/src/pages/Nodes/NodeCard.tsx index 4ac150b7..668b2432 100644 --- a/src/pages/Nodes/NodeCard.tsx +++ b/src/pages/Nodes/NodeCard.tsx @@ -59,6 +59,7 @@ export const NodeCard = ({ actions={ <> { e.stopPropagation(); @@ -84,6 +85,7 @@ export const NodeCard = ({ } /> { e.stopPropagation(); setInfoOpen(true);