diff --git a/src/App.vue b/src/App.vue index 0d045114..3b9f2fee 100644 --- a/src/App.vue +++ b/src/App.vue @@ -63,6 +63,8 @@ + + @@ -109,6 +111,7 @@ import NavMenu from './components/NavMenu.vue'; import PreviousInstancesInfoDialog from './components/dialogs/PreviousInstancesDialog/PreviousInstancesInfoDialog.vue'; import PrimaryPasswordDialog from './views/Settings/dialogs/PrimaryPasswordDialog.vue'; + import SendBoopDialog from './components/dialogs/SendBoopDialog.vue'; import Sidebar from './views/Sidebar/Sidebar.vue'; import UserDialog from './components/dialogs/UserDialog/UserDialog.vue'; import VRCXUpdateDialog from './components/dialogs/VRCXUpdateDialog.vue'; diff --git a/src/api/misc.js b/src/api/misc.js index 5256adb5..dd6ecc64 100644 --- a/src/api/misc.js +++ b/src/api/misc.js @@ -194,28 +194,29 @@ const miscReq = { }; return args; }); - } + }, - // /** - // * @params {{ - // userId: string, - // emojiId: string - // }} params - // * @returns {Promise<{json: any, params}>} - // */ - // sendBoop(params) { - // return request(`users/${params.userId}/boop`, { - // method: 'POST', - // params - // }).then((json) => { - // const args = { - // json, - // params - // }; - // this.$emit('BOOP:SEND', args); - // return args; - // }); - // } + /** + * @params {{ + userId: string, + emojiId: string + }} params + * @returns {Promise<{json: any, params}>} + */ + sendBoop(params) { + return request(`users/${params.userId}/boop`, { + method: 'POST', + params: { + emojiId: params.emojiId + } + }).then((json) => { + const args = { + json, + params + }; + return args; + }); + } }; export default miscReq; diff --git a/src/components/dialogs/AvatarDialog/AvatarDialog.vue b/src/components/dialogs/AvatarDialog/AvatarDialog.vue index 7edfdb8b..90712b33 100644 --- a/src/components/dialogs/AvatarDialog/AvatarDialog.vue +++ b/src/components/dialogs/AvatarDialog/AvatarDialog.vue @@ -611,6 +611,7 @@ } from '../../../shared/utils'; import { useAvatarStore, useFavoriteStore, useGalleryStore, useGameStore, useUserStore } from '../../../stores'; import { avatarModerationRequest, avatarRequest, favoriteRequest, miscRequest } from '../../../api'; + import { AppDebug } from '../../../service/appConfig.js'; import { database } from '../../../service/database'; import { getNextDialogIndex } from '../../../shared/utils/base/ui'; import { handleImageUploadInput } from '../../../shared/utils/imageUpload'; @@ -727,7 +728,7 @@ } function getImageUrlFromImageId(imageId) { - return `https://api.vrchat.cloud/api/1/file/${imageId}/1/`; + return `${AppDebug.endpointDomain}/file/${imageId}/1/`; } function handleDialogOpen() { diff --git a/src/components/dialogs/SendBoopDialog.vue b/src/components/dialogs/SendBoopDialog.vue index 3539712f..d9b93a46 100644 --- a/src/components/dialogs/SendBoopDialog.vue +++ b/src/components/dialogs/SendBoopDialog.vue @@ -1,277 +1,250 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - +--> + function dismissBoop(userId) { + // JANK: This is a hack to remove boop notifications when responding + const array = notificationTable.value.data; + for (let i = array.length - 1; i >= 0; i--) { + const ref = array[i]; + if (ref.type !== 'boop' || ref.$isExpired || ref.senderUserId !== userId) { + continue; + } + notificationRequest.sendNotificationResponse({ + notificationId: ref.id, + responseType: 'delete', + responseData: '' + }); + } + } + diff --git a/src/components/dialogs/UserDialog/UserActionDropdown.vue b/src/components/dialogs/UserDialog/UserActionDropdown.vue index 76cd765d..7d4b5550 100644 --- a/src/components/dialogs/UserDialog/UserActionDropdown.vue +++ b/src/components/dialogs/UserDialog/UserActionDropdown.vue @@ -108,6 +108,12 @@ {{ t('dialog.user.actions.send_friend_request') }} + {{ t('dialog.user.actions.send_boop') }} {{ t('dialog.user.actions.invite_to_group') }} diff --git a/src/components/dialogs/UserDialog/UserDialog.vue b/src/components/dialogs/UserDialog/UserDialog.vue index 5c6a880d..3afd1325 100644 --- a/src/components/dialogs/UserDialog/UserDialog.vue +++ b/src/components/dialogs/UserDialog/UserDialog.vue @@ -423,11 +423,17 @@ }} - - - - - +
+
+ {{ t('dialog.user.info.booping') }} + {{ + t('dialog.user.info.avatar_cloning_allow') + }} + {{ + t('dialog.user.info.avatar_cloning_deny') + }} +
+