mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-25 09:43:49 +02:00
Fix invite response, small fixes
This commit is contained in:
@@ -568,8 +568,8 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
<template v-if="avatarDialog.visible">
|
||||
<SetAvatarTagsDialog :set-avatar-tags-dialog="setAvatarTagsDialog" />
|
||||
<SetAvatarStylesDialog :set-avatar-styles-dialog="setAvatarStylesDialog" />
|
||||
<SetAvatarTagsDialog v-model:setAvatarTagsDialog="setAvatarTagsDialog" />
|
||||
<SetAvatarStylesDialog v-model:setAvatarStylesDialog="setAvatarStylesDialog" />
|
||||
<ChangeAvatarImageDialog
|
||||
v-model:changeAvatarImageDialogVisible="changeAvatarImageDialogVisible"
|
||||
v-model:previousImageUrl="previousImageUrl" />
|
||||
@@ -649,7 +649,7 @@
|
||||
const treeData = ref([]);
|
||||
const timeSpent = ref(0);
|
||||
const memo = ref('');
|
||||
const setAvatarTagsDialog = reactive({
|
||||
const setAvatarTagsDialog = ref({
|
||||
visible: false,
|
||||
loading: false,
|
||||
ownAvatars: [],
|
||||
@@ -663,7 +663,7 @@
|
||||
contentAdult: false,
|
||||
contentSex: false
|
||||
});
|
||||
const setAvatarStylesDialog = reactive({
|
||||
const setAvatarStylesDialog = ref({
|
||||
visible: false,
|
||||
loading: false,
|
||||
avatarId: '',
|
||||
@@ -1063,7 +1063,7 @@
|
||||
}
|
||||
|
||||
function showSetAvatarTagsDialog(avatarId) {
|
||||
const D = setAvatarTagsDialog;
|
||||
const D = setAvatarTagsDialog.value;
|
||||
D.visible = true;
|
||||
D.loading = true;
|
||||
D.ownAvatars = [];
|
||||
@@ -1130,7 +1130,7 @@
|
||||
}
|
||||
|
||||
function showSetAvatarStylesDialog() {
|
||||
const D = setAvatarStylesDialog;
|
||||
const D = setAvatarStylesDialog.value;
|
||||
D.visible = true;
|
||||
D.loading = true;
|
||||
D.avatarId = avatarDialog.value.id;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<el-dialog
|
||||
ref="setAvatarStylesDialog"
|
||||
class="x-dialog"
|
||||
v-model="setAvatarStylesDialog.visible"
|
||||
:model-value="setAvatarStylesDialog.visible"
|
||||
@close="closeSetAvatarStylesDialog"
|
||||
:title="t('dialog.set_avatar_styles.header')"
|
||||
width="400px"
|
||||
append-to-body>
|
||||
@@ -50,10 +51,8 @@
|
||||
style="margin-top: 10px"></el-input>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button size="small" @click="setAvatarStylesDialog.visible = false">{{
|
||||
t('dialog.set_avatar_styles.cancel')
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" @click="saveSetAvatarStylesDialog">{{
|
||||
<el-button @click="closeSetAvatarStylesDialog">{{ t('dialog.set_avatar_styles.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="saveSetAvatarStylesDialog">{{
|
||||
t('dialog.set_avatar_styles.save')
|
||||
}}</el-button>
|
||||
</template>
|
||||
@@ -61,12 +60,13 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { watch } from 'vue';
|
||||
import { watch, defineEmits } from 'vue';
|
||||
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { arraysMatch } from '../../../shared/utils';
|
||||
import { avatarRequest } from '../../../api';
|
||||
import { useAvatarStore } from '../../../stores';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { applyAvatar } = useAvatarStore();
|
||||
@@ -78,6 +78,8 @@
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:setAvatarStylesDialog']);
|
||||
|
||||
watch(
|
||||
() => props.setAvatarStylesDialog.visible,
|
||||
(newVal) => {
|
||||
@@ -99,6 +101,13 @@
|
||||
props.setAvatarStylesDialog.availableAvatarStylesMap = stylesMap;
|
||||
}
|
||||
|
||||
function closeSetAvatarStylesDialog() {
|
||||
emit('update:setAvatarStylesDialog', {
|
||||
...props.setAvatarStylesDialog,
|
||||
visible: false
|
||||
});
|
||||
}
|
||||
|
||||
function saveSetAvatarStylesDialog() {
|
||||
const primaryStyleId =
|
||||
props.setAvatarStylesDialog.availableAvatarStylesMap.get(props.setAvatarStylesDialog.primaryStyle) || '';
|
||||
@@ -127,7 +136,7 @@
|
||||
props.setAvatarStylesDialog.initialSecondaryStyle === props.setAvatarStylesDialog.secondaryStyle &&
|
||||
arraysMatch(props.setAvatarStylesDialog.initialTags, tags)
|
||||
) {
|
||||
props.setAvatarStylesDialog.visible = false;
|
||||
closeSetAvatarStylesDialog();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -141,11 +150,11 @@
|
||||
.saveAvatar(params)
|
||||
.then((args) => {
|
||||
applyAvatar(args.json);
|
||||
$message.success(t('dialog.set_avatar_styles.save_success'));
|
||||
props.setAvatarStylesDialog.visible = false;
|
||||
ElMessage({ message: t('dialog.set_avatar_styles.save_success'), type: 'success' });
|
||||
closeSetAvatarStylesDialog();
|
||||
})
|
||||
.catch((error) => {
|
||||
$message.error(t('dialog.set_avatar_styles.save_failed'));
|
||||
ElMessage({ message: t('dialog.set_avatar_styles.save_failed'), type: 'error' });
|
||||
console.error('Error saving avatar styles:', error);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<el-dialog
|
||||
ref="setAvatarTagsDialog"
|
||||
class="x-dialog"
|
||||
v-model="setAvatarTagsDialog.visible"
|
||||
:model-value="setAvatarTagsDialog.visible"
|
||||
@close="closeSetAvatarTagsDialog"
|
||||
:title="t('dialog.set_avatar_tags.header')"
|
||||
width="770px"
|
||||
append-to-body>
|
||||
@@ -82,10 +83,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<el-button size="small" @click="setAvatarTagsDialog.visible = false">{{
|
||||
t('dialog.set_avatar_tags.cancel')
|
||||
}}</el-button>
|
||||
<el-button type="primary" size="small" @click="saveSetAvatarTagsDialog">{{
|
||||
<el-button @click="closeSetAvatarTagsDialog">{{ t('dialog.set_avatar_tags.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="saveSetAvatarTagsDialog">{{
|
||||
t('dialog.set_avatar_tags.save')
|
||||
}}</el-button>
|
||||
</template>
|
||||
@@ -96,7 +95,7 @@
|
||||
import { Loading } from '@element-plus/icons-vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
|
||||
import { watch } from 'vue';
|
||||
import { watch, defineEmits } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { avatarRequest } from '../../../api';
|
||||
import { useAvatarStore } from '../../../stores';
|
||||
@@ -111,6 +110,8 @@
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits(['update:setAvatarTagsDialog']);
|
||||
|
||||
watch(
|
||||
() => props.setAvatarTagsDialog.visible,
|
||||
(newVal) => {
|
||||
@@ -122,6 +123,13 @@
|
||||
}
|
||||
);
|
||||
|
||||
function closeSetAvatarTagsDialog() {
|
||||
emit('update:setAvatarTagsDialog', {
|
||||
...props.setAvatarTagsDialog,
|
||||
visible: false
|
||||
});
|
||||
}
|
||||
|
||||
function updateSelectedAvatarTags() {
|
||||
const D = props.setAvatarTagsDialog;
|
||||
if (D.contentHorror) {
|
||||
@@ -186,7 +194,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
// props.setAvatarTagsDialog.forceUpdate++;
|
||||
}
|
||||
|
||||
function setAvatarTagsSelectToggle() {
|
||||
|
||||
Reference in New Issue
Block a user