feat: move users page to xplat page system (#6889)

* feat: move users page to xplat

* feat: stop doing tauri plugin open for user links

* feat: qa

* fix: qa

* fix: qa

* fix: comment

* fix: prepr

* prepr

* prepr

* prepr

---------

Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
Calum H.
2026-07-27 20:02:33 +00:00
committed by GitHub
co-authored by Prospector
parent ebc7cac8b0
commit 7c4190fb9c
64 changed files with 1569 additions and 4028 deletions
+34 -1
View File
@@ -1,4 +1,5 @@
use crate::api::Result;
use serde_json::Value;
use theseus::users::SearchUser;
#[tauri::command]
@@ -6,8 +7,40 @@ pub async fn search_user(query: &str) -> Result<Vec<SearchUser>> {
Ok(theseus::users::search_user(query).await?)
}
#[tauri::command]
pub async fn get_user_profile(user_id: &str) -> Result<Value> {
Ok(theseus::users::get_user_profile(user_id).await?)
}
#[tauri::command]
pub async fn get_user_projects(user_id: &str) -> Result<Value> {
Ok(theseus::users::get_user_projects(user_id).await?)
}
#[tauri::command]
pub async fn get_user_organizations(user_id: &str) -> Result<Value> {
Ok(theseus::users::get_user_organizations(user_id).await?)
}
#[tauri::command]
pub async fn get_user_collections(user_id: &str) -> Result<Value> {
Ok(theseus::users::get_user_collections(user_id).await?)
}
#[tauri::command]
pub async fn patch_user(user_id: &str, patch: Value) -> Result<()> {
Ok(theseus::users::patch_user(user_id, patch).await?)
}
pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
tauri::plugin::Builder::new("users")
.invoke_handler(tauri::generate_handler![search_user])
.invoke_handler(tauri::generate_handler![
search_user,
get_user_profile,
get_user_projects,
get_user_organizations,
get_user_collections,
patch_user,
])
.build()
}