import React from 'react'; import { FiBell, FiBluetooth, FiCpu, FiGitBranch, FiMoon, FiSun, FiWifi, FiX, } from 'react-icons/fi'; import { RiArrowDownLine, RiArrowUpDownLine, RiArrowUpLine, } from 'react-icons/ri'; import { connType, openConnectionModal, setDarkModeEnabled, } from '@app/core/slices/appSlice'; import { useAppDispatch } from '@hooks/useAppDispatch'; import { useAppSelector } from '@hooks/useAppSelector'; import { Protobuf, Types } from '@meshtastic/meshtasticjs'; import { Tooltip } from '../generic/Tooltip'; // export interface BottomNavProps { // } export const BottomNav = (): JSX.Element => { const [showVersionInfo, setShowVersionInfo] = React.useState(false); const dispatch = useAppDispatch(); const meshtasticState = useAppSelector((state) => state.meshtastic); const appState = useAppSelector((state) => state.app); const primaryChannelSettings = useAppSelector( (state) => state.meshtastic.radio.channels, ).find((channel) => channel.channel.role === Protobuf.Channel_Role.PRIMARY) ?.channel.settings; return (
{ dispatch(dispatch(openConnectionModal())); }} > {appState.connType === connType.BLE ? ( ) : appState.connType === connType.SERIAL ? ( ) : ( )}
{meshtasticState.nodes.find( (node) => node.number === meshtasticState.radio.hardware.myNodeNum, )?.user?.longName ?? 'Disconnected'}
{primaryChannelSettings?.uplinkEnabled && primaryChannelSettings?.downlinkEnabled && !meshtasticState.radio.preferences.mqttDisabled ? ( ) : primaryChannelSettings?.uplinkEnabled && !meshtasticState.radio.preferences.mqttDisabled ? ( ) : primaryChannelSettings?.downlinkEnabled && !meshtasticState.radio.preferences.mqttDisabled ? ( ) : ( )}
{ setShowVersionInfo(true); }} className="flex p-1 border-l border-gray-300 cursor-pointer select-none group dark:border-gray-600 dark:text-white hover:bg-gray-200 dark:hover:bg-primaryDark" >

{process.env.COMMIT_HASH}

Example Notification

{ dispatch(setDarkModeEnabled(!appState.darkMode)); }} > {appState.darkMode ? ( ) : ( )}
); };