|
UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
|
import type;Functions | |
| function async | loadAuditRows () |
| Audit rows for callers outside this module. | |
| function export | resetAuditPanel () |
| Drops everything loaded from the previous vault. | |
| function | setStatus (msg:string, type:'ok'| 'err'| 'warn') |
| function export | initAuditPanel () |
Variables | |
| const | invoke = invokeTauri |
| let | _rows |
| Rows from the last successful load, newest-first (as the backend returns them). | |
| let | _userNames = new Map<string, string>() |
| Usernames by id, so audit rows show a name instead of a raw UUID. | |
| function async loadAuditRows | ( | ) |
Audit rows for callers outside this module.
finishInit uses it to date entries written before created_at existed. It is the same read the viewer does, exported rather than duplicated so there is one place that knows whether the rows come over IPC or over HTTP. Hex SHA-256 of a UTF-8 string, matching the Rust side byte for byte. Recompute the hash chain oldest-first.
Two independent checks per row: the stored entry_hash must equal a fresh hash of the row's own contents, and the stored prev_hash must equal the previous row's entry_hash. Either mismatch means a row was altered, inserted or removed.
| function export resetAuditPanel | ( | ) |
Drops everything loaded from the previous vault.
_rows and _userNames are module state that outlived a vault switch: the table kept showing the old vault's audit trail, "Verify" reported on it, and "Export" copied it to the clipboard while the UI claimed to be looking at the new vault. Call whenever the backing store changes.
| function setStatus | ( | msg:string, | |
| type:'ok'| 'err'| 'warn' | |||
| ) |
| function export initAuditPanel | ( | ) |
| const invoke = invokeTauri |
| let _rows |
Rows from the last successful load, newest-first (as the backend returns them).