mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
feat: blocking frontend (#6911)
* feat: blocking api interfaces * feat: block action on user pages + shared instance flows * feat: safety settings subpage * feat: interaction source settings * feat: finish social settings * feat: profile settings xplat * fix: prepr * feat: click on friends * default instance -> game options & fix feature flag width * fix: scroll indicators --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com>
This commit is contained in:
@@ -50,7 +50,31 @@ export async function get_user_collections(
|
||||
|
||||
export async function patch_user(
|
||||
userId: string,
|
||||
patch: Partial<Pick<Labrinth.Users.v3.User, 'badges' | 'role'>>,
|
||||
patch: Partial<Pick<Labrinth.Users.v2.User, 'badges' | 'bio' | 'role' | 'username'>>,
|
||||
): Promise<void> {
|
||||
await invoke('plugin:users|patch_user', { userId, patch })
|
||||
}
|
||||
|
||||
export async function change_user_avatar(
|
||||
userId: string,
|
||||
image: Uint8Array,
|
||||
extension: string,
|
||||
): Promise<void> {
|
||||
await invoke('plugin:users|change_user_avatar', { userId, image, extension })
|
||||
}
|
||||
|
||||
export async function delete_user_avatar(userId: string): Promise<void> {
|
||||
await invoke('plugin:users|delete_user_avatar', { userId })
|
||||
}
|
||||
|
||||
export async function block_user(userId: string): Promise<void> {
|
||||
await invoke('plugin:users|block_user', { userId })
|
||||
}
|
||||
|
||||
export async function unblock_user(userId: string): Promise<void> {
|
||||
await invoke('plugin:users|unblock_user', { userId })
|
||||
}
|
||||
|
||||
export async function get_blocked_users(): Promise<Labrinth.BlockedUsers.v3.BlockedUserId[]> {
|
||||
return await invoke<Labrinth.BlockedUsers.v3.BlockedUserId[]>('plugin:users|get_blocked_users')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user