|
UnENVerse 0.84.0
Local-first desktop secrets manager — TypeScript frontend
|
Functions | |
| function export | onClipboardWrite (fn:((text:string)=> void)|null) |
| Prompt for a secret. | |
| error | if (typeof path !=='string') return |
| Parses an expression. | |
| catch (e) | |
Variables | |
| import { invokeTauri, isTauri } from './tauri' | |
| Pure utilities — no state, no DOM side effects on module load. | |
| error | __pad0__ { ok: false |
| return { ok: true, path } | |
| try | |
| const | url = URL.createObjectURL(blob) |
| const | a = Object.assign(document.createElement('a'), { href: url, download: suggestedName }) |
| function export execCopy(text:string) export const | copySVG |
| export const | editSVG |
| export const | delSVG |
| export const | dupSVG |
| function export onClipboardWrite | ( | fn:((text:string)=> void)| | null | ) |
Prompt for a secret.
Same modal as showPrompt but the input is masked and the value is not trimmed (passwords may legitimately contain edge spaces).
Replaces the native window.prompt(), which WebKitGTK renders as an unstyled system dialog and can suppress entirely. Called with every string the app puts on the clipboard (the materialisation log). Writes content to disk as suggestedName and reports where it landed.
A3 (2026-09-14). Every export in the app used to build a Blob, click a <a download> anchor and toast "Exported ✓" unconditionally (downloadText, formerly in import-export.ts). Tauri's WebKitGTK webview has no download handler and no dialog/fs plugin, so the click went nowhere — the toast was true only in a plain browser dev server (npm run dev). This is the one place that decides, so a toast can finally say what happened instead of what was hoped.
In Tauri: writes through write_export_file (a real file, on disk, 0600 on Unix) and resolves with the absolute path. In a browser: falls back to the blob-and-anchor dance, which a real download manager does handle there.
Never throws — the caller decides how to tell the user, and a rejected promise from a copy/export button is a console nobody reads.
|
new |
Parses an expression.
Throws with a readable message on malformed input.
| catch | ( | e | ) |
| import { invokeTauri, isTauri } from './tauri' |
Pure utilities — no state, no DOM side effects on module load.
| error __pad0__ { ok: false |
| return { ok: true, path } |
| try |
| const url = URL.createObjectURL(blob) |
| const a = Object.assign(document.createElement('a'), { href: url, download: suggestedName }) |
| function export execCopy (text: string) export const copySVG |
| export const editSVG |
| export const delSVG |
| export const dupSVG |