mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 09:13:50 +02:00
* refactor: dialogs * fix: storeAvatarImage * FriendLog.vue * FriendLog.vue * FriendLog.vue * GameLog.vue * fix: next day button jumping to the wrong date * sync master * fix: launchGame * Notification.vue * Feed.vue * Search.vue * Profile.vue * PlayerList.vue * Login.vue * utils * update dialog * del gameLog.pug * fix * fix: group role cannot be displayed currently * fix: "Hide Friends in Same Instance" hides players in unrelated private instances (#1210) * fix * fix: "Hide Friends in Same Instance" does not work when "Split Favorite Friends" is enabled * fix Notification.vue message * fix: deleteFavoriteNoConfirm * fix: feed status style * fix: infinite loading when deleting note * fix: private players will not be hidden when 'Hide Friends in Same Instance', and 'Hide Friends in Same Instance' will not work when 'Split Favorite Friends'
96 lines
3.1 KiB
Vue
96 lines
3.1 KiB
Vue
<template>
|
|
<safe-dialog
|
|
class="x-dialog"
|
|
:visible="sendInviteResponseConfirmDialog.visible"
|
|
:title="t('dialog.invite_response_message.header')"
|
|
width="400px"
|
|
append-to-body
|
|
@close="cancelInviteResponseConfirm">
|
|
<div style="font-size: 12px">
|
|
<span>{{ t('dialog.invite_response_message.confirmation') }}</span>
|
|
</div>
|
|
|
|
<template #footer>
|
|
<el-button type="small" @click="cancelInviteResponseConfirm">{{
|
|
t('dialog.invite_response_message.cancel')
|
|
}}</el-button>
|
|
<el-button type="primary" size="small" @click="sendInviteResponseConfirm">{{
|
|
t('dialog.invite_response_message.confirm')
|
|
}}</el-button>
|
|
</template>
|
|
</safe-dialog>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { getCurrentInstance } from 'vue';
|
|
import { useI18n } from 'vue-i18n-bridge';
|
|
import { notificationRequest } from '../../../api';
|
|
const { t } = useI18n();
|
|
|
|
const instance = getCurrentInstance();
|
|
const $message = instance.proxy.$message;
|
|
|
|
const props = defineProps({
|
|
sendInviteResponseConfirmDialog: {
|
|
type: Object,
|
|
required: true
|
|
},
|
|
uploadImage: {
|
|
type: String
|
|
},
|
|
sendInviteResponseDialog: {
|
|
type: Object,
|
|
default: () => ({})
|
|
}
|
|
});
|
|
|
|
const emit = defineEmits(['update:sendInviteResponseConfirmDialog', 'closeInviteDialog']);
|
|
|
|
function cancelInviteResponseConfirm() {
|
|
emit('update:sendInviteResponseConfirmDialog', { visible: false });
|
|
}
|
|
|
|
function sendInviteResponseConfirm() {
|
|
const D = props.sendInviteResponseDialog;
|
|
const params = {
|
|
responseSlot: D.messageSlot,
|
|
rsvp: true
|
|
};
|
|
if (props.uploadImage) {
|
|
notificationRequest
|
|
.sendInviteResponsePhoto(params, D.invite.id, D.messageType)
|
|
.catch((err) => {
|
|
throw err;
|
|
})
|
|
.then((args) => {
|
|
notificationRequest.hideNotification({
|
|
notificationId: D.invite.id
|
|
});
|
|
$message({
|
|
message: 'Invite response photo message sent',
|
|
type: 'success'
|
|
});
|
|
return args;
|
|
});
|
|
} else {
|
|
notificationRequest
|
|
.sendInviteResponse(params, D.invite.id, D.messageType)
|
|
.catch((err) => {
|
|
throw err;
|
|
})
|
|
.then((args) => {
|
|
notificationRequest.hideNotification({
|
|
notificationId: D.invite.id
|
|
});
|
|
$message({
|
|
message: 'Invite response message sent',
|
|
type: 'success'
|
|
});
|
|
return args;
|
|
});
|
|
}
|
|
cancelInviteResponseConfirm();
|
|
emit('closeInviteDialog');
|
|
}
|
|
</script>
|