|
UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
|
Project and category CRUD operations. More...
import type;Functions | |
| function export | doSetFilter (type:string, value:string) |
| function async | deleteCategory (name:string) |
| function async | renameCategory (name:string) |
| function export | validateSlug (raw:string, existing:Project[], selfId?:string) |
| Project name → id. | |
| function async | deleteProject (id:string) |
| function export | applyExperimentalTypeVisibility () |
| Shows or hides the untested project types in the create picker. | |
| function export | closeProjectCreateModal () |
| function export | openCategoryCreateModal () |
| function export | closeCategoryCreateModal () |
| function export | saveCategoryCreate () |
| function export | saveProjectCreate () |
| function export | setProjectCreateType (type:ProjectType) |
Variables | |
| let | _projectCreateType |
Project and category CRUD operations.
| function export doSetFilter | ( | type:string, | |
| value:string | |||
| ) |
| function async deleteCategory | ( | name:string | ) |
| function async renameCategory | ( | name:string | ) |
| function export validateSlug | ( | raw:string, | |
| existing:Project[], | |||
| selfId?:string | |||
| ) |
Project name → id.
Kept in one place so rename and delete agree on the shape. Whether this project's id was chosen by hand rather than derived from its name.
Derived rather than stored: a project whose id is not what slugifyProjectName would produce for its current name must have been given one deliberately. That keeps custom slugs working for vaults written before they existed, and means there is no flag that can disagree with the data it describes. Characters a project id may contain. Mirrors what slugifyProjectName emits. Validate a hand-written slug, returning an error message or null.
A project id ends up in entry.projectIds, in RBAC scope values and in exported filenames, so the shape has to stay predictable — an id with a space or an uppercase letter would round-trip through slugifyProjectName into a different id the next time anything derived one.
| function async deleteProject | ( | id:string | ) |
| function export applyExperimentalTypeVisibility | ( | ) |
Shows or hides the untested project types in the create picker.
Applied on every open rather than once at boot: the setting can be toggled while the app is running, and the picker lives in static markup that nothing else repaints.
| function export closeProjectCreateModal | ( | ) |
| function export openCategoryCreateModal | ( | ) |
| function export closeCategoryCreateModal | ( | ) |
| function export saveCategoryCreate | ( | ) |
| function export saveProjectCreate | ( | ) |
| function export setProjectCreateType | ( | type:ProjectType | ) |
| let _projectCreateType |