More tooltips & Plugin enabled status indicators
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
|||||||
FiZap,
|
FiZap,
|
||||||
} from 'react-icons/fi';
|
} from 'react-icons/fi';
|
||||||
|
|
||||||
|
import { useAppSelector } from '@app/hooks/useAppSelector.js';
|
||||||
import { CollapsibleSection } from '@components/generic/Sidebar/CollapsibleSection';
|
import { CollapsibleSection } from '@components/generic/Sidebar/CollapsibleSection';
|
||||||
import { ExternalSection } from '@components/generic/Sidebar/ExternalSection';
|
import { ExternalSection } from '@components/generic/Sidebar/ExternalSection';
|
||||||
import { SidebarOverlay } from '@components/generic/Sidebar/SidebarOverlay';
|
import { SidebarOverlay } from '@components/generic/Sidebar/SidebarOverlay';
|
||||||
@@ -39,7 +40,12 @@ export interface SettingsProps {
|
|||||||
export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => {
|
export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => {
|
||||||
const [pluginsOpen, setPluginsOpen] = React.useState(false);
|
const [pluginsOpen, setPluginsOpen] = React.useState(false);
|
||||||
const [channelsOpen, setChannelsOpen] = 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 hasGps = true;
|
||||||
const hasWifi = true;
|
const hasWifi = true;
|
||||||
@@ -100,16 +106,64 @@ export const Settings = ({ open, setOpen }: SettingsProps): JSX.Element => {
|
|||||||
}}
|
}}
|
||||||
direction="x"
|
direction="x"
|
||||||
>
|
>
|
||||||
<CollapsibleSection title="Range Test" icon={<FiRss />}>
|
<CollapsibleSection
|
||||||
|
title="Range Test"
|
||||||
|
icon={
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<FiRss />
|
||||||
|
<div
|
||||||
|
className={`h-3 w-3 rounded-full ${
|
||||||
|
rangeTestPluginEnabled ? 'bg-green-500' : 'bg-red-500'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
<RangeTestSettingsPanel />
|
<RangeTestSettingsPanel />
|
||||||
</CollapsibleSection>
|
</CollapsibleSection>
|
||||||
<CollapsibleSection title="External Notifications" icon={<FiBell />}>
|
<CollapsibleSection
|
||||||
|
title="External Notifications"
|
||||||
|
icon={
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<FiBell />
|
||||||
|
<div
|
||||||
|
className={`h-3 w-3 rounded-full ${
|
||||||
|
extNotificationPluginEnabled ? 'bg-green-500' : 'bg-red-500'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
<ExternalNotificationsSettingsPlanel />
|
<ExternalNotificationsSettingsPlanel />
|
||||||
</CollapsibleSection>
|
</CollapsibleSection>
|
||||||
<CollapsibleSection title="Serial" icon={<FiAlignLeft />}>
|
<CollapsibleSection
|
||||||
|
title="Serial"
|
||||||
|
icon={
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<FiAlignLeft />
|
||||||
|
<div
|
||||||
|
className={`h-3 w-3 rounded-full ${
|
||||||
|
serialpluginEnabled ? 'bg-green-500' : 'bg-red-500'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
<SerialSettingsPanel />
|
<SerialSettingsPanel />
|
||||||
</CollapsibleSection>
|
</CollapsibleSection>
|
||||||
<CollapsibleSection title="Store & Forward" icon={<FiFastForward />}>
|
<CollapsibleSection
|
||||||
|
title="Store & Forward"
|
||||||
|
icon={
|
||||||
|
<div className="flex gap-2">
|
||||||
|
<FiFastForward />
|
||||||
|
<div
|
||||||
|
className={`h-3 w-3 rounded-full ${
|
||||||
|
storeForwardPluginEnabled ? 'bg-green-500' : 'bg-red-500'
|
||||||
|
}`}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
<StoreForwardSettingsPanel />
|
<StoreForwardSettingsPanel />
|
||||||
</CollapsibleSection>
|
</CollapsibleSection>
|
||||||
</SidebarOverlay>
|
</SidebarOverlay>
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export const NodeCard = ({
|
|||||||
actions={
|
actions={
|
||||||
<>
|
<>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
tooltip={PositionConfidence !== 'none' ? 'Fly to Node' : ''}
|
||||||
disabled={PositionConfidence === 'none'}
|
disabled={PositionConfidence === 'none'}
|
||||||
onClick={(e): void => {
|
onClick={(e): void => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -84,6 +85,7 @@ export const NodeCard = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
|
tooltip="Show Node Info"
|
||||||
onClick={(e): void => {
|
onClick={(e): void => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
setInfoOpen(true);
|
setInfoOpen(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user