feat: bulk edit avatar favorites

This commit is contained in:
2026-06-30 02:22:09 +07:00
parent b6e1730d54
commit 53d1cb9444
13 changed files with 383 additions and 28 deletions
+11 -2
View File
@@ -9,7 +9,13 @@ import type { SocialSnapshot, UserProfile, UserStatus } from "./types/user";
import type { DiscoverCategory, FavoriteWorldFolder, World, WorldSnapshot } from "./types/world";
import type { CreateInstanceInput, Instance, InstanceRegion } from "./types/instance";
import type { UnityStatus } from "./types/unity";
import type { Avatar, AvatarEdit, AvatarSnapshot, FavoriteGroupEdit } from "./types/avatar";
import type {
Avatar,
AvatarEdit,
AvatarSnapshot,
FavoriteGroupEdit,
MoveResult,
} from "./types/avatar";
import type { RepoStats, StoredEntity } from "./types/repository";
import type { AccountSettings, ContentFilterKey, Pending2Fa, RecoveryCode } from "./types/settings";
import type { Group, GroupSnapshot } from "./types/group";
@@ -66,7 +72,10 @@ export interface IpcRequests {
"avatar:delete": (avatarId: string) => IpcResult<void>;
"avatar:favorite": (p: { avatarId: string; folder?: string }) => IpcResult<void>;
"avatar:unfavorite": (avatarId: string) => IpcResult<void>;
"avatar:moveFavorite": (p: { avatarId: string; folder: string }) => IpcResult<void>;
"avatar:moveFavorite": (p: { avatarId: string; folder: string }) => IpcResult<MoveResult>;
"avatar:unfavoriteMany": (avatarIds: string[]) => IpcResult<void>;
"avatar:moveFavoriteMany": (p: { avatarIds: string[]; folder: string }) => IpcResult<MoveResult>;
"avatar:clearFavoriteFolder": (folder: string) => IpcResult<void>;
"avatar:updateFavoriteFolder": (p: { folder: string; edit: FavoriteGroupEdit }) => IpcResult<void>;
"group:byUser": (userId: string) => IpcResult<Group[]>;
+5
View File
@@ -48,6 +48,11 @@ export interface FavoriteGroupEdit {
visibility?: FavoriteVisibility;
}
export interface MoveResult {
moved: number;
skipped: string[];
}
export interface AvatarSnapshot {
avatars: Avatar[];
mineIds: string[];