Merge branch 'master' into feature/enforce-biome
This commit is contained in:
@@ -13,6 +13,8 @@ import {
|
|||||||
SettingsIcon,
|
SettingsIcon,
|
||||||
UsersIcon,
|
UsersIcon,
|
||||||
ZapIcon,
|
ZapIcon,
|
||||||
|
BatteryMediumIcon,
|
||||||
|
CpuIcon
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
export interface SidebarProps {
|
export interface SidebarProps {
|
||||||
@@ -20,8 +22,9 @@ export interface SidebarProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
|
export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
|
||||||
const { hardware, nodes } = useDevice();
|
const { hardware, nodes, metadata } = useDevice();
|
||||||
const myNode = nodes.get(hardware.myNodeNum);
|
const myNode = nodes.get(hardware.myNodeNum);
|
||||||
|
const myMetadata = metadata.get(0);
|
||||||
const { activePage, setActivePage, setDialogOpen } = useDevice();
|
const { activePage, setActivePage, setDialogOpen } = useDevice();
|
||||||
|
|
||||||
interface NavLink {
|
interface NavLink {
|
||||||
@@ -86,6 +89,10 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
|
|||||||
{myNode?.deviceMetrics?.voltage.toPrecision(3) ?? "UNK"} volts
|
{myNode?.deviceMetrics?.voltage.toPrecision(3) ?? "UNK"} volts
|
||||||
</Subtle>
|
</Subtle>
|
||||||
</div>
|
</div>
|
||||||
|
<div className="flex items-center">
|
||||||
|
<CpuIcon size={24} viewBox={'0 0 36 24'}/>
|
||||||
|
<Subtle>v{ myMetadata?.firmwareVersion ?? "UNK"}</Subtle>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SidebarSection label="Navigation">
|
<SidebarSection label="Navigation">
|
||||||
@@ -105,3 +112,4 @@ export const Sidebar = ({ children }: SidebarProps): JSX.Element => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user