feat(app): wire set_group/delete_group bridge commands

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 21:41:34 +07:00
parent 0328797bce
commit c9c3ba1fcd
3 changed files with 20 additions and 0 deletions
+10
View File
@@ -245,3 +245,13 @@ pub async fn set_workspace_meta(state: BridgeState<'_>, workspace_id: String, na
pub async fn create_group(state: BridgeState<'_>, name: String, color: String) -> Result<Value, String> {
data_of(state.request(Cmd::CreateGroup { name, color }).await.map_err(|e| e.to_string())?)
}
#[tauri::command]
pub async fn set_group(state: BridgeState<'_>, group_id: String, name: Option<String>, color: Option<String>, order: Option<u32>) -> Result<Value, String> {
data_of(state.request(Cmd::SetGroup { group_id: GroupId(group_id), name, color, order }).await.map_err(|e| e.to_string())?)
}
#[tauri::command]
pub async fn delete_group(state: BridgeState<'_>, group_id: String) -> Result<Value, String> {
data_of(state.request(Cmd::DeleteGroup { group_id: GroupId(group_id) }).await.map_err(|e| e.to_string())?)
}