refactor(v3): project-scoped ContextPane with auto-registration
This commit is contained in:
parent
0f0ea3fb59
commit
e37c85e294
5 changed files with 139 additions and 147 deletions
|
|
@ -187,6 +187,11 @@ fn ctx_init_db(state: State<'_, AppState>) -> Result<(), String> {
|
|||
state.ctx_db.init_db()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn ctx_register_project(state: State<'_, AppState>, name: String, description: String, work_dir: Option<String>) -> Result<(), String> {
|
||||
state.ctx_db.register_project(&name, &description, work_dir.as_deref())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn ctx_list_projects(state: State<'_, AppState>) -> Result<Vec<ctx::CtxProject>, String> {
|
||||
state.ctx_db.list_projects()
|
||||
|
|
@ -545,6 +550,7 @@ pub fn run() {
|
|||
ssh_session_save,
|
||||
ssh_session_delete,
|
||||
ctx_init_db,
|
||||
ctx_register_project,
|
||||
ctx_list_projects,
|
||||
ctx_get_context,
|
||||
ctx_get_shared,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue