UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
render.ts File Reference
import bundleSuggestions;

Functions

function export renderProjectTree ()
 
function renderProjectList (container:HTMLElement, projects:Project[], all:VaultEntry[])
 
function renderSidebar ()
 
function renderPoolSection (all:VaultEntry[])
 Key Pools in the sidebar — every entry grouped under its pool name.
 
function renderPrefixSection (all:VaultEntry[])
 
function renderTypeChipBar (all:VaultEntry[])
 The multi-toggle type chip bar above the grid (Phase 24.2).
 
function renderTagSection (all:VaultEntry[])
 
function renderUserCatTree (container:HTMLElement, cats:string[], all:VaultEntry[])
 
function buildRefIndex ()
 
function diffAndStashCopy (chunk:SecretChunk, snapshot:Record< string, string >)
 Compare a freshly-resolved env snapshot to the chunk's last copy, toast the delta, and stash it.
 
function renderBundleSuggestion (grid:HTMLElement)
 "3 Spotify entries — bundle them?" Suggested, never automatic: one banner for the largest undismissed provider group, above the grid.
 

Variables

const PIN_BADGE
 
const ARIA_CURRENT = raw(' aria-current="true"')
 
chunk __pad0__
 
field __pad1__
 
let _refIndex = new Map<string, RefConsumer[]>()
 

Function Documentation

◆ renderProjectTree()

function export renderProjectTree ( )

◆ renderProjectList()

function renderProjectList (   container:HTMLElement,
  projects:Project[],
  all:VaultEntry[] 
)

◆ renderSidebar()

function renderSidebar ( )

◆ renderPoolSection()

function renderPoolSection (   all:VaultEntry[])

Key Pools in the sidebar — every entry grouped under its pool name.

Membership is the pool field on the entry and lives in the vault, so this section needs no IPC and works on a remote vault and in the browser dev server exactly as it does in Tauri. The swap state — cursor, cooldowns, use counts — deliberately does not live in the vault (see pools.ts), so it is not shown here; Tools → Key Pools is where that belongs, because it needs a refresh cycle and this does not.

Grouping goes through poolsOf() rather than a second pass over pool, so the sidebar and the tool pane can never disagree about what a pool contains — including the trim, and including the guard against a non-string pool in an untrusted vault becoming a pool named "[object Object]" (invariant 4).

◆ renderPrefixSection()

function renderPrefixSection (   all:VaultEntry[])

◆ renderTypeChipBar()

function renderTypeChipBar (   all:VaultEntry[])

The multi-toggle type chip bar above the grid (Phase 24.2).

One chip per SecretType actually present, plus one virtual chip — 2FA (carries a stored authenticator seed), which is not a secretType value on its own. OR-combined within the bar, ANDed with every other active filter in getFiltered().

Deliberately no "Pool" chip. Key-pool membership already has its own sidebar section (#sidebar-section-pools, activePoolFilter) — the chip bar's whole reason to exist is covering what the sidebar does not (every secret type, and 2FA now that the old Authenticator sidebar section is gone). Adding a Pool chip here would be the exact same redundant-overlap this bar was built to remove from the sidebar, just in the other direction.

Counts are computed over the whole vault, matching the sidebar's own price/type counters — narrowing them by the currently active chips would make every chip's own number drop to zero the moment it is pressed, which reads as "nothing else matches" rather than "here is what else exists".

◆ renderTagSection()

function renderTagSection (   all:VaultEntry[])

◆ renderUserCatTree()

function renderUserCatTree (   container:HTMLElement,
  cats:string[],
  all:VaultEntry[] 
)

◆ buildRefIndex()

function buildRefIndex ( )

◆ diffAndStashCopy()

function diffAndStashCopy (   chunk:SecretChunk,
  snapshot:Record< string, string > 
)

Compare a freshly-resolved env snapshot to the chunk's last copy, toast the delta, and stash it.

◆ renderBundleSuggestion()

function renderBundleSuggestion (   grid:HTMLElement)

"3 Spotify entries — bundle them?" Suggested, never automatic: one banner for the largest undismissed provider group, above the grid.

Dismissal is per provider and persisted in settings.

Variable Documentation

◆ PIN_BADGE

const PIN_BADGE
Initial value:
= html`<span class="pin-badge" title="Pinned"
><svg width="9" height="9" viewBox="0 0 24 24" fill="currentColor" stroke="none">
<path
d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"
/></svg
></span>`

◆ ARIA_CURRENT

const ARIA_CURRENT = raw(' aria-current="true"')

◆ __pad0__

chunk __pad0__

◆ __pad1__

field __pad1__

◆ _refIndex

let _refIndex = new Map<string, RefConsumer[]>()