Some checks failed
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
CI / Backend Lint (push) Has been cancelled
CI / Backend Tests (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
Deploy / Build & Push Images (push) Has been cancelled
Deploy / Deploy to Server (push) Has been cancelled
Deploy / Notify (push) Has been cancelled
Adds HUNT (Sniper/Trend/Forge), CFO dashboard (burn rate + kill list), and a plugin-based Analyze side panel with caching and SSRF hardening.
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { create } from 'zustand'
|
|
|
|
export type AnalyzeSectionVisibility = Record<string, boolean>
|
|
|
|
export type AnalyzePanelState = {
|
|
isOpen: boolean
|
|
domain: string | null
|
|
fastMode: boolean
|
|
filterText: string
|
|
sectionVisibility: AnalyzeSectionVisibility
|
|
open: (domain: string) => void
|
|
close: () => void
|
|
setFastMode: (fast: boolean) => void
|
|
setFilterText: (value: string) => void
|
|
setSectionVisibility: (next: AnalyzeSectionVisibility) => void
|
|
}
|
|
|
|
const DEFAULT_VISIBILITY: AnalyzeSectionVisibility = {
|
|
authority: true,
|
|
market: true,
|
|
risk: true,
|
|
value: true,
|
|
}
|
|
|
|
export const useAnalyzePanelStore = create<AnalyzePanelState>((set) => ({
|
|
isOpen: false,
|
|
domain: null,
|
|
fastMode: false,
|
|
filterText: '',
|
|
sectionVisibility: DEFAULT_VISIBILITY,
|
|
open: (domain) => set({ isOpen: true, domain, filterText: '' }),
|
|
close: () => set({ isOpen: false }),
|
|
setFastMode: (fastMode) => set({ fastMode }),
|
|
setFilterText: (filterText) => set({ filterText }),
|
|
setSectionVisibility: (sectionVisibility) => set({ sectionVisibility }),
|
|
}))
|
|
|
|
export const ANALYZE_PREFS_KEY = 'pounce_analyze_prefs_v1'
|
|
|