Fix select avatar

This commit is contained in:
Natsumi
2025-07-16 07:31:38 +12:00
parent 4b7ebfc1eb
commit 0ab0378678
6 changed files with 25 additions and 34 deletions

View File

@@ -263,7 +263,7 @@
circle
:disabled="currentUser.currentAvatar === avatarDialog.id"
style="margin-left: 5px"
@click="selectAvatar(avatarDialog.id)"></el-button>
@click="selectAvatarWithoutConfirmation(avatarDialog.id)"></el-button>
</el-tooltip>
<el-dropdown
trigger="click"
@@ -644,7 +644,8 @@
const { showUserDialog, sortUserDialogAvatars } = useUserStore();
const { userDialog, currentUser } = storeToRefs(useUserStore());
const { avatarDialog, cachedAvatarModerations, cachedAvatars, cachedAvatarNames } = storeToRefs(useAvatarStore());
const { showAvatarDialog, getAvatarGallery, applyAvatarModeration, applyAvatar } = useAvatarStore();
const { showAvatarDialog, getAvatarGallery, applyAvatarModeration, applyAvatar, selectAvatarWithoutConfirmation } =
useAvatarStore();
const { showFavoriteDialog } = useFavoriteStore();
const { isGameRunning } = storeToRefs(useGameStore());
const { deleteVRChatCache } = useGameStore();
@@ -1006,20 +1007,6 @@
});
}
function selectAvatar(id) {
avatarRequest
.selectAvatar({
avatarId: id
})
.then((args) => {
$message({
message: 'Avatar changed',
type: 'success'
});
return args;
});
}
function promptChangeAvatarDescription(avatar) {
$prompt(t('prompt.change_avatar_description.description'), t('prompt.change_avatar_description.header'), {
distinguishCancelAndClose: true,