Persistent nodedb (#780)
* Refactor and consolitdate store imports - Created a new index file in the core stores directory to export all stores from a single module. - Updated imports to use consolidated store exports. * Remove unnecessary import * Update imports * First steps to persist nodeDB * Use named exports * Change store import after merge * Persistent nodeDB initial work * Key mishmatch warning, new serialization handler * Minor copilot changes * Add NODEDB_RETENTION_NUM * Updated tests * Refactor PKI mismatch logic * Clear persisted db on reset * Only persist on featureFlag * Mock featureFlag in tests --------- Co-authored-by: philon- <philon-@users.noreply.github.com>
This commit is contained in:
co-authored by
philon-
parent
e33463b371
commit
68ec7ee5d8
@@ -2,7 +2,13 @@ import { SidebarButton } from "@components/UI/Sidebar/SidebarButton.tsx";
|
||||
import { SidebarSection } from "@components/UI/Sidebar/SidebarSection.tsx";
|
||||
import { Spinner } from "@components/UI/Spinner.tsx";
|
||||
import { Subtle } from "@components/UI/Typography/Subtle.tsx";
|
||||
import { type Page, useAppStore, useDevice, useSidebar } from "@core/stores";
|
||||
import {
|
||||
type Page,
|
||||
useAppStore,
|
||||
useDevice,
|
||||
useNodeDB,
|
||||
useSidebar,
|
||||
} from "@core/stores";
|
||||
import { cn } from "@core/utils/cn.ts";
|
||||
import { useLocation, useNavigate } from "@tanstack/react-router";
|
||||
import {
|
||||
@@ -62,14 +68,8 @@ const CollapseToggleButton = () => {
|
||||
};
|
||||
|
||||
export const Sidebar = ({ children }: SidebarProps) => {
|
||||
const {
|
||||
hardware,
|
||||
getNode,
|
||||
getNodesLength,
|
||||
metadata,
|
||||
unreadCounts,
|
||||
setDialogOpen,
|
||||
} = useDevice();
|
||||
const { hardware, metadata, unreadCounts, setDialogOpen } = useDevice();
|
||||
const { getNode, getNodesLength } = useNodeDB();
|
||||
const { setCommandPaletteOpen } = useAppStore();
|
||||
const myNode = getNode(hardware.myNodeNum);
|
||||
const { isCollapsed } = useSidebar();
|
||||
|
||||
Reference in New Issue
Block a user