mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 09:04:55 +00:00
feat: preferences syncing frontend (#7192)
* feat: prefs frontend * fix: DI issue * fix: lint * feat: appearance settings cleanup + fix settings, remove pinia * fix: sync btn when logged out * fix: prepr * fix: sidebar issue * feat: language coverage + cleanup * feat: cleanup lang settings * fix: fmt * fix: CI * fix: ci * fix: storybook * feat: bring back loader/game version sort --------- Co-authored-by: tdgao <mr.trumgao@gmail.com>
This commit is contained in:
@@ -27,6 +27,19 @@ 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 get_user_preferences(user_id: &str) -> Result<Value> {
|
||||
Ok(theseus::users::get_user_preferences(user_id).await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn patch_user_preferences(
|
||||
user_id: &str,
|
||||
preferences: Value,
|
||||
) -> Result<Value> {
|
||||
Ok(theseus::users::patch_user_preferences(user_id, preferences).await?)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn patch_user(user_id: &str, patch: Value) -> Result<()> {
|
||||
Ok(theseus::users::patch_user(user_id, patch).await?)
|
||||
@@ -72,6 +85,8 @@ pub fn init<R: tauri::Runtime>() -> tauri::plugin::TauriPlugin<R> {
|
||||
get_user_projects,
|
||||
get_user_organizations,
|
||||
get_user_collections,
|
||||
get_user_preferences,
|
||||
patch_user_preferences,
|
||||
patch_user,
|
||||
change_user_avatar,
|
||||
delete_user_avatar,
|
||||
|
||||
Reference in New Issue
Block a user