UnENVerse 0.84.0
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
codes-pane.ts File Reference

Variables

 import { html, setHtml } from './html'
 Tools, Recovery codes (R36): the single-use codes of every account in one place.
import type { VaultEntry } from './types'
const el
let selectedId = ''
const accounts
const current = (): VaultEntry | undefined => accounts().find((e) => e.id === selectedId)
 Looked up again by id each time: a dialog or a save may have replaced the document.

Variable Documentation

◆ import

import { html, setHtml } from './html'

Tools, Recovery codes (R36): the single-use codes of every account in one place.

Reading never spends a code: it is marked used only by the button, after a question. Pasted text is split into codes by Rust (codes_parse, codes_add, codes_unmark over IPC), the same code unv codes import|unuse run; this pane only holds the vault and shows what Rust answers. The list is masked until "Show the codes" is ticked, and the printable sheet is built only when Print is pressed and is emptied afterwards.

◆ type

import type { VaultEntry } from './types'

◆ el

const el
Initial value:
= <T extends HTMLElement = HTMLElement>(id: string) =>
document.getElementById(id) as T | null
const string
Definition auth-panel.ts:39

◆ selectedId

let selectedId = ''

◆ accounts

const accounts
Initial value:
= (): VaultEntry[] =>
st.vault.api_keys.filter((e) => e.secretType === 'recovery_codes' || codeStatus(e).total > 0)
return[...groups.entries()] filter(([, list])=> list.length >=2) .map(([
function export codeStatus(entry:Pick< VaultEntry, 'extra_vars'>)
Definition recovery-codes.ts:23
as unknown as VaultEntry
Definition settings-panel.ts:1060
st vault api_keys
Definition state.ts:1292
export const st
Definition state.ts:708

◆ current

const current = (): VaultEntry | undefined => accounts().find((e) => e.id === selectedId)

Looked up again by id each time: a dialog or a save may have replaced the document.