UnENVerse 0.42.6
Local-first desktop secrets manager — TypeScript frontend
Loading...
Searching...
No Matches
projects.ts File Reference

Project and category CRUD operations. More...

import type;
Include dependency graph for projects.ts:

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
 

Detailed Description

Project and category CRUD operations.

Function Documentation

◆ doSetFilter()

function export doSetFilter (   type:string,
  value:string 
)

◆ deleteCategory()

function async deleteCategory (   name:string)

◆ renameCategory()

function async renameCategory (   name:string)

◆ validateSlug()

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.

◆ deleteProject()

function async deleteProject (   id:string)

◆ applyExperimentalTypeVisibility()

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.

◆ closeProjectCreateModal()

function export closeProjectCreateModal ( )

◆ openCategoryCreateModal()

function export openCategoryCreateModal ( )

◆ closeCategoryCreateModal()

function export closeCategoryCreateModal ( )

◆ saveCategoryCreate()

function export saveCategoryCreate ( )

◆ saveProjectCreate()

function export saveProjectCreate ( )

◆ setProjectCreateType()

function export setProjectCreateType (   type:ProjectType)

Variable Documentation

◆ _projectCreateType

let _projectCreateType