chore: lint/format all files (#604)

* chore: lint/format all files

* Fix config sidebar button state (#602)

* chore: Update deno.lock version and add Radix UI slider component (#601)

* fix: improve how table addresses even/odd rows

---------

Co-authored-by: philon- <philon-@users.noreply.github.com>
Co-authored-by: Kamil Dzieniszewski <kamil.dzieniszewski@gmail.com>
This commit is contained in:
Dan Ditomaso
2025-05-04 15:55:04 -04:00
committed by GitHub
co-authored by philon- Kamil Dzieniszewski
parent b7bdb1a502
commit 480ca46a95
104 changed files with 3104 additions and 2527 deletions
+16 -5
View File
@@ -10,7 +10,13 @@ import { useDevice } from "@core/stores/deviceStore.ts";
import { Protobuf, type Types } from "@meshtastic/core";
import { numberToHexUnpadded } from "@noble/curves/abstract/utils";
import { LockIcon, LockOpenIcon } from "lucide-react";
import { type JSX, useCallback, useDeferredValue, useEffect, useState } from "react";
import {
type JSX,
useCallback,
useDeferredValue,
useEffect,
useState,
} from "react";
import { base16 } from "rfc4648";
import { Input } from "@components/UI/Input.tsx";
import { PageLayout } from "@components/PageLayout.tsx";
@@ -34,14 +40,14 @@ const NodesPage = (): JSX.Element => {
const [searchTerm, setSearchTerm] = useState<string>("");
const deferredSearch = useDeferredValue(searchTerm);
const filteredNodes = getNodes(node => {
const filteredNodes = getNodes((node) => {
if (!node.user) return false;
const lowerCaseSearchTerm = deferredSearch.toLowerCase();
return (
node.user?.longName?.toLowerCase().includes(lowerCaseSearchTerm) ||
node.user?.shortName?.toLowerCase().includes(lowerCaseSearchTerm)
);
})
});
useEffect(() => {
if (!connection) return;
@@ -76,7 +82,11 @@ const NodesPage = (): JSX.Element => {
return (
<>
<PageLayout label="" leftBar={<Sidebar />} className="flex flex-col w-full">
<PageLayout
label=""
leftBar={<Sidebar />}
className="flex flex-col w-full"
>
<div className="p-2">
<Input
placeholder="Search nodes..."
@@ -118,7 +128,8 @@ const NodesPage = (): JSX.Element => {
{node.lastHeard !== 0
? node.viaMqtt === false && node.hopsAway === 0
? "Direct"
: `${node.hopsAway?.toString()} ${node.hopsAway ?? 0 > 1 ? "hops" : "hop"
: `${node.hopsAway?.toString()} ${
node.hopsAway ?? 0 > 1 ? "hops" : "hop"
} away`
: "-"}
{node.viaMqtt === true ? ", via MQTT" : ""}