fix: dialog types error

This commit is contained in:
pa
2025-07-16 14:58:23 +09:00
committed by Natsumi
parent b23687430e
commit 6b84d7444b
17 changed files with 156 additions and 108 deletions

View File

@@ -403,21 +403,21 @@
icon="el-icon-back"
circle
class="x-link"
style="margin-left: 0px"
style="margin-left: 0"
@click.stop="reorderAvatarGalleryImage(imageUrl, -1)"></el-button>
<el-button
size="mini"
icon="el-icon-right"
circle
class="x-link"
style="margin-left: 0px"
style="margin-left: 0"
@click.stop="reorderAvatarGalleryImage(imageUrl, 1)"></el-button>
<el-button
size="mini"
icon="el-icon-delete"
circle
class="x-link"
style="margin-left: 0px"
style="margin-left: 0"
@click.stop="deleteAvatarGalleryImage(imageUrl)"></el-button>
</div>
</el-carousel-item>

View File

@@ -24,12 +24,9 @@
</el-button>
</el-button-group>
<br />
<div
v-for="image in previousImagesTable"
v-if="image.file"
:key="image.version"
style="display: inline-block">
<div v-for="image in previousImagesTable" :key="image.version" style="display: inline-block">
<div
v-if="image.file"
class="x-change-image-item"
style="cursor: pointer"
:class="{ 'current-image': compareCurrentImage(image) }"

View File

@@ -34,16 +34,16 @@
<br />
<div
v-for="image in galleryTable"
v-if="image.versions && image.versions.length > 0"
:key="image.id"
class="x-friend-item"
style="display: inline-block; margin-top: 10px; width: unset; cursor: default">
<div
v-if="image.versions[image.versions.length - 1].file.url"
class="vrcplus-icon"
@click="selectImageGallerySelect(image.versions[image.versions.length - 1].file.url, image.id)">
<img v-lazy="image.versions[image.versions.length - 1].file.url" class="avatar" />
</div>
<template v-if="image.versions && image.versions.length > 0">
<div
v-if="image.versions[image.versions.length - 1].file.url"
class="vrcplus-icon"
@click="selectImageGallerySelect(image.versions[image.versions.length - 1].file.url, image.id)">
<img v-lazy="image.versions[image.versions.length - 1].file.url" class="avatar" /></div
></template>
</div>
</div>
</safe-dialog>

View File

@@ -1253,7 +1253,13 @@
auditLogTypes: []
});
let loadMoreGroupMembersParams = {};
let loadMoreGroupMembersParams = ref({
n: 100,
offset: 0,
groupId: '',
sort: '',
roleId: ''
});
watch(
() => groupDialog.value.loading,
@@ -1632,16 +1638,17 @@
const D = groupDialog.value;
D.members = [];
isGroupMembersDone.value = false;
loadMoreGroupMembersParams = {
loadMoreGroupMembersParams.value = {
n: 100,
offset: 0,
groupId: D.id
groupId: D.id,
...loadMoreGroupMembersParams.value
};
if (D.memberSortOrder.value) {
loadMoreGroupMembersParams.sort = D.memberSortOrder.value;
loadMoreGroupMembersParams.value.sort = D.memberSortOrder.value;
}
if (D.memberFilter.id !== null) {
loadMoreGroupMembersParams.roleId = D.memberFilter.id;
loadMoreGroupMembersParams.value.roleId = D.memberFilter.id;
}
if (D.inGroup) {
await groupRequest
@@ -1669,7 +1676,7 @@
return;
}
const D = groupDialog.value;
const params = loadMoreGroupMembersParams;
const params = loadMoreGroupMembersParams.value;
D.memberSearch = '';
isGroupMembersLoading.value = true;
await groupRequest
@@ -1802,7 +1809,7 @@
async function setGroupMemberFilter(filter) {
const D = groupDialog.value;
if (D.memberFilter.value === filter) {
if (D.memberFilter === filter) {
return;
}
D.memberFilter = filter;

View File

@@ -80,10 +80,10 @@
v-text="t(item.name)"></el-dropdown-item>
<el-dropdown-item
v-for="item in groupDialog.ref.roles"
v-if="!item.defaultRole"
:key="item.name"
@click.native="setGroupMemberFilter(item)"
v-text="item.name"></el-dropdown-item>
><span v-if="!item.defaultRole">{{ t(item.name) }}</span></el-dropdown-item
>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -101,7 +101,7 @@
}}</el-button>
<data-tables v-bind="groupMemberModerationTable" style="margin-top: 10px">
<el-table-column width="55" prop="$selected">
<template slot-scope="scope">
<template #default="scope">
<el-button type="text" size="mini" @click.stop>
<el-checkbox
v-model="scope.row.$selected"
@@ -115,7 +115,7 @@
:label="t('dialog.group_member_moderation.avatar')"
width="70"
prop="photo">
<template slot-scope="scope">
<template #default="scope">
<el-popover placement="right" height="500px" trigger="hover">
<img
slot="reference"
@@ -134,7 +134,7 @@
width="160"
prop="$displayName"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span style="cursor: pointer" @click="showUserDialog(scope.row.userId)">
<span
v-if="randomUserColours"
@@ -145,7 +145,7 @@
</template>
</el-table-column>
<el-table-column :label="t('dialog.group_member_moderation.roles')" prop="roleIds" sortable>
<template slot-scope="scope">
<template #default="scope">
<template v-for="(roleId, index) in scope.row.roleIds">
<template v-for="(role, rIndex) in groupMemberModeration.groupRef.roles">
<span v-if="role?.id === roleId" :key="roleId + rIndex"
@@ -160,7 +160,7 @@
:label="t('dialog.group_member_moderation.notes')"
prop="managerNotes"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span @click.stop v-text="scope.row.managerNotes"></span>
</template>
</el-table-column>
@@ -169,7 +169,7 @@
width="170"
prop="joinedAt"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span>{{ formatDateFilter(scope.row.joinedAt, 'long') }}</span>
</template>
</el-table-column>
@@ -178,7 +178,7 @@
width="120"
prop="visibility"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span v-text="scope.row.visibility"></span>
</template>
</el-table-column>
@@ -213,7 +213,7 @@
}}</el-button>
<data-tables v-bind="groupBansModerationTable" style="margin-top: 10px">
<el-table-column width="55" prop="$selected">
<template slot-scope="scope">
<template #default="scope">
<el-button type="text" size="mini" @click.stop>
<el-checkbox
v-model="scope.row.$selected"
@@ -227,7 +227,7 @@
:label="t('dialog.group_member_moderation.avatar')"
width="70"
prop="photo">
<template slot-scope="scope">
<template #default="scope">
<el-popover placement="right" height="500px" trigger="hover">
<img
slot="reference"
@@ -246,7 +246,7 @@
width="160"
prop="$displayName"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span style="cursor: pointer" @click="showUserDialog(scope.row.userId)">
<span
v-if="randomUserColours"
@@ -257,15 +257,17 @@
</template>
</el-table-column>
<el-table-column :label="t('dialog.group_member_moderation.roles')" prop="roleIds" sortable>
<template slot-scope="scope">
<template #default="scope">
<template v-for="(roleId, index) in scope.row.roleIds">
<span
v-for="(role, rIndex) in groupMemberModeration.groupRef.roles"
v-if="role.id === roleId"
:key="rIndex"
:key="rIndex + roleId"
>{{ role.name }}</span
>
<span v-if="index < scope.row.roleIds.length - 1">, </span>
<span v-if="index < scope.row.roleIds.length - 1" :key="index + roleId"
>,
</span>
</template>
</template>
</el-table-column>
@@ -273,7 +275,7 @@
:label="t('dialog.group_member_moderation.notes')"
prop="managerNotes"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span @click.stop v-text="scope.row.managerNotes"></span>
</template>
</el-table-column>
@@ -282,7 +284,7 @@
width="170"
prop="joinedAt"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span>{{ formatDateFilter(scope.row.joinedAt, 'long') }}</span>
</template>
</el-table-column>
@@ -291,7 +293,7 @@
width="170"
prop="bannedAt"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span>{{ formatDateFilter(scope.row.bannedAt, 'long') }}</span>
</template>
</el-table-column>
@@ -326,7 +328,7 @@
}}</el-button>
<data-tables v-bind="groupInvitesModerationTable" style="margin-top: 10px">
<el-table-column width="55" prop="$selected">
<template slot-scope="scope">
<template #default="scope">
<el-button type="text" size="mini" @click.stop>
<el-checkbox
v-model="scope.row.$selected"
@@ -340,7 +342,7 @@
:label="t('dialog.group_member_moderation.avatar')"
width="70"
prop="photo">
<template slot-scope="scope">
<template #default="scope">
<el-popover placement="right" height="500px" trigger="hover">
<img
slot="reference"
@@ -359,7 +361,7 @@
width="160"
prop="$displayName"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span style="cursor: pointer" @click="showUserDialog(scope.row.userId)">
<span
v-if="randomUserColours"
@@ -373,7 +375,7 @@
:label="t('dialog.group_member_moderation.notes')"
prop="managerNotes"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span @click.stop v-text="scope.row.managerNotes"></span>
</template>
</el-table-column>
@@ -405,7 +407,7 @@
}}</el-button>
<data-tables v-bind="groupJoinRequestsModerationTable" style="margin-top: 10px">
<el-table-column width="55" prop="$selected">
<template slot-scope="scope">
<template #default="scope">
<el-button type="text" size="mini" @click.stop>
<el-checkbox
v-model="scope.row.$selected"
@@ -419,7 +421,7 @@
:label="t('dialog.group_member_moderation.avatar')"
width="70"
prop="photo">
<template slot-scope="scope">
<template #default="scope">
<el-popover placement="right" height="500px" trigger="hover">
<img
slot="reference"
@@ -438,7 +440,7 @@
width="160"
prop="$displayName"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span style="cursor: pointer" @click="showUserDialog(scope.row.userId)">
<span
v-if="randomUserColours"
@@ -452,7 +454,7 @@
:label="t('dialog.group_member_moderation.notes')"
prop="managerNotes"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span @click.stop v-text="scope.row.managerNotes"></span>
</template>
</el-table-column>
@@ -504,7 +506,7 @@
}}</el-button>
<data-tables v-bind="groupBlockedModerationTable" style="margin-top: 10px">
<el-table-column width="55" prop="$selected">
<template slot-scope="scope">
<template #default="scope">
<el-button type="text" size="mini" @click.stop>
<el-checkbox
v-model="scope.row.$selected"
@@ -518,7 +520,7 @@
:label="t('dialog.group_member_moderation.avatar')"
width="70"
prop="photo">
<template slot-scope="scope">
<template #default="scope">
<el-popover placement="right" height="500px" trigger="hover">
<img
slot="reference"
@@ -537,7 +539,7 @@
width="160"
prop="$displayName"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span style="cursor: pointer" @click="showUserDialog(scope.row.userId)">
<span
v-if="randomUserColours"
@@ -551,7 +553,7 @@
:label="t('dialog.group_member_moderation.notes')"
prop="managerNotes"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span @click.stop v-text="scope.row.managerNotes"></span>
</template>
</el-table-column>
@@ -627,7 +629,7 @@
width="170"
prop="created_at"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span>{{ formatDateFilter(scope.row.created_at, 'long') }}</span>
</template>
</el-table-column>
@@ -636,7 +638,7 @@
width="190"
prop="eventType"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span v-text="scope.row.eventType"></span>
</template>
</el-table-column>
@@ -645,7 +647,7 @@
width="160"
prop="actorDisplayName"
sortable>
<template slot-scope="scope">
<template #default="scope">
<span style="cursor: pointer" @click="showUserDialog(scope.row.actorId)">
<span v-text="scope.row.actorDisplayName"></span>
</span>
@@ -654,7 +656,7 @@
<el-table-column
:label="t('dialog.group_member_moderation.description')"
prop="description">
<template slot-scope="scope">
<template #default="scope">
<Location
v-if="scope.row?.targetId.startsWith('wrld_')"
:location="scope.row.targetId" />
@@ -662,7 +664,7 @@
</template>
</el-table-column>
<el-table-column :label="t('dialog.group_member_moderation.data')" prop="data">
<template slot-scope="scope">
<template #default="scope">
<span
v-if="Object.keys(scope.row.data).length"
v-text="JSON.stringify(scope.row.data)"></span>

View File

@@ -230,7 +230,7 @@
function addFavoriteFriendsToInvite() {
const D = props.inviteDialog;
for (const friend of props.vipFriends) {
for (const friend of vipFriends.value) {
if (!D.userIds.includes(friend.id)) {
D.userIds.push(friend.id);
}

View File

@@ -17,9 +17,9 @@
</div>
<data-tables v-loading="loading" v-bind="dataTable" style="margin-top: 10px">
<el-table-column :label="$t('table.previous_instances.date')" prop="created_at" sortable width="110">
<template slot-scope="scope">
<template #default="scope">
<el-tooltip placement="left">
<template slot="content">
<template #content>
<span>{{ formatDateFilter(scope.row.created_at, 'long') }}</span>
</template>
<span>{{ formatDateFilter(scope.row.created_at, 'short') }}</span>
@@ -27,7 +27,7 @@
</template>
</el-table-column>
<el-table-column :label="$t('table.gameLog.icon')" prop="isFriend" width="70" align="center">
<template slot-scope="scope">
<template #default="scope">
<template v-if="gameLogIsFriend(scope.row)">
<el-tooltip v-if="gameLogIsFavorite(scope.row)" placement="top" content="Favorite">
<span></span>
@@ -39,17 +39,17 @@
</template>
</el-table-column>
<el-table-column :label="$t('table.previous_instances.display_name')" prop="displayName" sortable>
<template slot-scope="scope">
<template #default="scope">
<span class="x-link" @click="lookupUser(scope.row)">{{ scope.row.displayName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('table.previous_instances.time')" prop="time" width="100" sortable>
<template slot-scope="scope">
<template #default="scope">
<span>{{ scope.row.timer }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('table.previous_instances.count')" prop="count" width="100" sortable>
<template slot-scope="scope">
<template #default="scope">
<span>{{ scope.row.count }}</span>
</template>
</el-table-column>
@@ -78,7 +78,29 @@
const dialogRef = ref(null);
const loading = ref(false);
const location = ref({});
const location = ref({
tag: '',
isOffline: false,
isPrivate: false,
isTraveling: false,
isRealInstance: false,
worldId: '',
instanceId: '',
instanceName: '',
accessType: '',
accessTypeName: '',
region: '',
shortName: '',
userId: null,
hiddenId: null,
privateId: null,
friendsId: null,
groupId: null,
groupAccessType: null,
canRequestInvite: false,
strict: false,
ageGate: false
});
const dataTable = ref({
data: [],
filters: [

View File

@@ -1,6 +1,6 @@
<template>
<safe-dialog
ref="previousInstancesWorldDialog"
ref="previousInstancesWorldDialogRef"
:visible.sync="isVisible"
:title="t('dialog.previous_instances.header')"
width="1000px"
@@ -14,12 +14,12 @@
</div>
<data-tables v-loading="loading" v-bind="previousInstancesWorldDialogTable" style="margin-top: 10px">
<el-table-column :label="t('table.previous_instances.date')" prop="created_at" sortable width="170">
<template slot-scope="scope">
<template #default="scope">
<span>{{ formatDateFilter(scope.row.created_at, 'long') }}</span>
</template>
</el-table-column>
<el-table-column :label="t('table.previous_instances.instance_name')" prop="name">
<template slot-scope="scope">
<template #default="scope">
<LocationWorld
:locationobject="scope.row.$location"
:grouphint="scope.row.groupName"
@@ -27,7 +27,7 @@
</template>
</el-table-column>
<el-table-column :label="t('table.previous_instances.instance_creator')" prop="location">
<template slot-scope="scope">
<template #default="scope">
<DisplayName
:userid="scope.row.$location.userId"
:location="scope.row.$location.tag"
@@ -35,12 +35,12 @@
</template>
</el-table-column>
<el-table-column :label="t('table.previous_instances.time')" prop="time" width="100" sortable>
<template slot-scope="scope">
<template #default="scope">
<span v-text="scope.row.timer"></span>
</template>
</el-table-column>
<el-table-column :label="t('table.previous_instances.action')" width="90" align="right">
<template slot-scope="scope">
<template #default="scope">
<el-button
type="text"
icon="el-icon-s-data"
@@ -111,6 +111,7 @@
}
});
const loading = ref(false);
const previousInstancesWorldDialogRef = ref(null);
const isVisible = computed({
get: () => props.previousInstancesWorldDialog.visible,
@@ -161,7 +162,7 @@
() => {
if (props.previousInstancesWorldDialog.visible) {
nextTick(() => {
adjustDialogZ(proxy.$refs.previousInstancesWorldDialog.$el);
adjustDialogZ(previousInstancesWorldDialogRef.value.$el);
});
refreshPreviousInstancesWorldTable();
}

View File

@@ -1,6 +1,6 @@
<template>
<safe-dialog
ref="previousInstancesUserDialog"
ref="previousInstancesUserDialogRef"
:visible.sync="isVisible"
:title="$t('dialog.previous_instances.header')"
width="1000px"
@@ -14,12 +14,12 @@
</div>
<data-tables v-loading="loading" v-bind="previousInstancesUserDialogTable" style="margin-top: 10px">
<el-table-column :label="$t('table.previous_instances.date')" prop="created_at" sortable width="170">
<template slot-scope="scope">
<template #default="scope">
<span>{{ formatDateFilter(scope.row.created_at, 'long') }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('table.previous_instances.world')" prop="name" sortable>
<template slot-scope="scope">
<template #default="scope">
<Location
:location="scope.row.location"
:hint="scope.row.worldName"
@@ -27,17 +27,17 @@
</template>
</el-table-column>
<el-table-column :label="$t('table.previous_instances.instance_creator')" prop="location" width="170">
<template slot-scope="scope">
<template #default="scope">
<DisplayName :userid="scope.row.$location.userId" :location="scope.row.$location.tag" />
</template>
</el-table-column>
<el-table-column :label="$t('table.previous_instances.time')" prop="time" width="100" sortable>
<template slot-scope="scope">
<template #default="scope">
<span v-text="scope.row.timer"></span>
</template>
</el-table-column>
<el-table-column :label="$t('table.previous_instances.action')" width="90" align="right">
<template slot-scope="scope">
<template #default="scope">
<el-button
type="text"
icon="el-icon-switch-button"
@@ -123,6 +123,8 @@
const { showPreviousInstancesInfoDialog } = useInstanceStore();
const { shiftHeld } = storeToRefs(useUiStore());
const previousInstancesUserDialogRef = ref(null);
const isVisible = computed({
get: () => props.previousInstancesUserDialog.visible,
set: (value) => {
@@ -152,7 +154,7 @@
() => {
if (props.previousInstancesUserDialog.visible) {
nextTick(() => {
adjustDialogZ(proxy.$refs.previousInstancesUserDialog.$el);
adjustDialogZ(previousInstancesUserDialogRef.value.$el);
});
refreshPreviousInstancesUserTable();
}

View File

@@ -901,7 +901,9 @@
<div class="x-friend-item" style="cursor: default">
<el-tooltip :placement="currentUser.id !== userDialog.id ? 'bottom' : 'top'">
<template #content>
<span>{{ formatDateFilter(userOnlineForTimestamp(userDialog), 'short') }}</span>
<span>{{
formatDateFilter(String(userOnlineForTimestamp(userDialog)), 'short')
}}</span>
</template>
<div class="detail">
<span
@@ -1845,7 +1847,8 @@
useLocationStore,
useModerationStore,
useUserStore,
useWorldStore
useWorldStore,
useUiStore
} from '../../../stores';
import SendInviteDialog from '../InviteDialog/SendInviteDialog.vue';
import InviteGroupDialog from '../InviteGroupDialog.vue';
@@ -1895,6 +1898,7 @@
const { logout } = useAuthStore();
const { cachedConfig } = storeToRefs(useAuthStore());
const { handlePlayerModerationAtSend, handlePlayerModeration, handlePlayerModerationDelete } = useModerationStore();
const { shiftHeld } = storeToRefs(useUiStore());
watch(
() => userDialog.value.loading,
@@ -2066,7 +2070,7 @@
const data = await lookupAvatars('authorId', userId);
const avatars = new Set();
userDialogAvatars.value.forEach((avatar) => {
avatars.add(avatar.id, avatar);
avatars.add(avatar.id);
});
if (data && typeof data === 'object') {
data.forEach((avatar) => {
@@ -2598,7 +2602,7 @@
async function sortCurrentUserGroups() {
const D = userDialog.value;
let sortMethod = function () {};
let sortMethod = (a, b) => 0;
switch (D.groupSorting.value) {
case 'alphabetical':
@@ -2621,7 +2625,7 @@
function setUserDialogAvatars(userId) {
const avatars = new Set();
userDialogAvatars.value.forEach((avatar) => {
avatars.add(avatar.id, avatar);
avatars.add(avatar.id);
});
for (const ref of cachedAvatars.value.values()) {
if (ref.authorId === userId && !avatars.has(ref.id)) {
@@ -2696,7 +2700,8 @@
const worldLists = [];
let params = {
ownerId: userId,
n: 100
n: 100,
offset: 0
};
const json = await request('favorite/groups', {
method: 'GET',
@@ -2708,6 +2713,7 @@
continue;
}
params = {
ownerId: userId,
n: 100,
offset: 0,
userId,