mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Slop
This commit is contained in:
@@ -3,28 +3,32 @@
|
|||||||
<el-tooltip v-if="state.isValidInstance" placement="bottom">
|
<el-tooltip v-if="state.isValidInstance" placement="bottom">
|
||||||
<template #content>
|
<template #content>
|
||||||
<div>
|
<div>
|
||||||
<span v-if="state.isClosed">Closed At: {{ formatDateFilter(state.closedAt, 'long') }}<br /></span>
|
<span v-if="props.instance.closedAt"
|
||||||
|
>Closed At: {{ formatDateFilter(props.instance.closedAt, 'long') }}<br
|
||||||
|
/></span>
|
||||||
<template v-if="state.canCloseInstance">
|
<template v-if="state.canCloseInstance">
|
||||||
<el-button
|
<el-button
|
||||||
:disabled="state.isClosed"
|
:disabled="props.instance.closedAt"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="closeInstance(props.location)">
|
@click="closeInstance(props.location)">
|
||||||
{{ t('dialog.user.info.close_instance') }} </el-button
|
{{ t('dialog.user.info.close_instance') }} </el-button
|
||||||
><br /><br />
|
><br /><br />
|
||||||
</template>
|
</template>
|
||||||
<span><span style="color: #409eff">PC: </span>{{ state.platforms.standalonewindows }}</span
|
<span><span style="color: #409eff">PC: </span>{{ props.instance.platforms.standalonewindows }}</span
|
||||||
><br />
|
><br />
|
||||||
<span><span style="color: #67c23a">Android: </span>{{ state.platforms.android }}</span
|
<span><span style="color: #67c23a">Android: </span>{{ props.instance.platforms.android }}</span
|
||||||
><br />
|
><br />
|
||||||
<span>{{ t('dialog.user.info.instance_game_version') }} {{ state.gameServerVersion }}</span
|
<span>{{ t('dialog.user.info.instance_game_version') }} {{ props.instance.gameServerVersion }}</span
|
||||||
><br />
|
><br />
|
||||||
<span v-if="state.queueEnabled">{{ t('dialog.user.info.instance_queuing_enabled') }}<br /></span>
|
<span v-if="props.instance.queueEnabled"
|
||||||
|
>{{ t('dialog.user.info.instance_queuing_enabled') }}<br
|
||||||
|
/></span>
|
||||||
<span v-if="state.disabledContentSettings"
|
<span v-if="state.disabledContentSettings"
|
||||||
>{{ t('dialog.user.info.instance_disabled_content') }} {{ state.disabledContentSettings }}<br
|
>{{ t('dialog.user.info.instance_disabled_content') }} {{ state.disabledContentSettings }}<br
|
||||||
/></span>
|
/></span>
|
||||||
<span v-if="state.userList.length">{{ t('dialog.user.info.instance_users') }}<br /></span>
|
<span v-if="props.instance.users.length">{{ t('dialog.user.info.instance_users') }}<br /></span>
|
||||||
<template v-for="user in state.userList" :key="user.id">
|
<template v-for="user in props.instance.users" :key="user.id">
|
||||||
<span style="cursor: pointer; margin-right: 5px" @click="showUserDialog(user.id)">{{
|
<span style="cursor: pointer; margin-right: 5px" @click="showUserDialog(user.id)">{{
|
||||||
user.displayName
|
user.displayName
|
||||||
}}</span>
|
}}</span>
|
||||||
@@ -33,19 +37,26 @@
|
|||||||
</template>
|
</template>
|
||||||
<el-icon><CaretBottom /></el-icon>
|
<el-icon><CaretBottom /></el-icon>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<span v-if="state.occupants" style="margin-left: 5px">{{ state.occupants }}/{{ state.capacity }}</span>
|
<span v-if="props.location === locationStore.lastLocation.location" style="margin-left: 5px"
|
||||||
|
>{{ locationStore.lastLocation.playerList.size }}/{{ props.instance.capacity }}</span
|
||||||
|
>
|
||||||
|
<span v-else-if="props.instance.userCount" style="margin-left: 5px"
|
||||||
|
>{{ props.instance.userCount }}/{{ props.instance.capacity }}</span
|
||||||
|
>
|
||||||
<span v-if="props.friendcount" style="margin-left: 5px">({{ props.friendcount }})</span>
|
<span v-if="props.friendcount" style="margin-left: 5px">({{ props.friendcount }})</span>
|
||||||
<span v-if="state.isFull" style="margin-left: 5px; color: lightcoral">{{
|
<span
|
||||||
t('dialog.user.info.instance_full')
|
v-if="state.isValidInstance && !props.instance.hasCapacityForYou"
|
||||||
}}</span>
|
style="margin-left: 5px; color: lightcoral"
|
||||||
<span v-if="state.isHardClosed" style="margin-left: 5px; color: lightcoral">{{
|
>{{ t('dialog.user.info.instance_full') }}</span
|
||||||
|
>
|
||||||
|
<span v-if="props.instance.hardClose" style="margin-left: 5px; color: lightcoral">{{
|
||||||
t('dialog.user.info.instance_hard_closed')
|
t('dialog.user.info.instance_hard_closed')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else-if="state.isClosed" style="margin-left: 5px; color: lightcoral">{{
|
<span v-else-if="props.instance.closedAt" style="margin-left: 5px; color: lightcoral">{{
|
||||||
t('dialog.user.info.instance_closed')
|
t('dialog.user.info.instance_closed')
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-if="state.queueSize" style="margin-left: 5px"
|
<span v-if="props.instance.queueSize" style="margin-left: 5px"
|
||||||
>{{ t('dialog.user.info.instance_queue') }} {{ state.queueSize }}</span
|
>{{ t('dialog.user.info.instance_queue') }} {{ props.instance.queueSize }}</span
|
||||||
>
|
>
|
||||||
<span v-if="state.isAgeGated" style="margin-left: 5px; color: lightcoral">{{
|
<span v-if="state.isAgeGated" style="margin-left: 5px; color: lightcoral">{{
|
||||||
t('dialog.user.info.instance_age_gated')
|
t('dialog.user.info.instance_age_gated')
|
||||||
@@ -77,17 +88,6 @@
|
|||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
isValidInstance: false,
|
isValidInstance: false,
|
||||||
isFull: false,
|
|
||||||
isClosed: false,
|
|
||||||
isHardClosed: false,
|
|
||||||
closedAt: '',
|
|
||||||
occupants: 0,
|
|
||||||
capacity: 0,
|
|
||||||
queueSize: 0,
|
|
||||||
queueEnabled: false,
|
|
||||||
platforms: {},
|
|
||||||
userList: [],
|
|
||||||
gameServerVersion: '',
|
|
||||||
canCloseInstance: false,
|
canCloseInstance: false,
|
||||||
isAgeGated: false,
|
isAgeGated: false,
|
||||||
disabledContentSettings: ''
|
disabledContentSettings: ''
|
||||||
@@ -96,17 +96,6 @@
|
|||||||
function parse() {
|
function parse() {
|
||||||
Object.assign(state, {
|
Object.assign(state, {
|
||||||
isValidInstance: false,
|
isValidInstance: false,
|
||||||
isFull: false,
|
|
||||||
isClosed: false,
|
|
||||||
isHardClosed: false,
|
|
||||||
closedAt: '',
|
|
||||||
occupants: 0,
|
|
||||||
capacity: 0,
|
|
||||||
queueSize: 0,
|
|
||||||
queueEnabled: false,
|
|
||||||
platforms: [],
|
|
||||||
userList: [],
|
|
||||||
gameServerVersion: '',
|
|
||||||
canCloseInstance: false,
|
canCloseInstance: false,
|
||||||
isAgeGated: false,
|
isAgeGated: false,
|
||||||
disabledContentSettings: ''
|
disabledContentSettings: ''
|
||||||
@@ -115,21 +104,6 @@
|
|||||||
if (!props.location || !props.instance || Object.keys(props.instance).length === 0) return;
|
if (!props.location || !props.instance || Object.keys(props.instance).length === 0) return;
|
||||||
|
|
||||||
state.isValidInstance = true;
|
state.isValidInstance = true;
|
||||||
state.isFull = props.instance.hasCapacityForYou === false;
|
|
||||||
if (props.instance.closedAt) {
|
|
||||||
state.isClosed = true;
|
|
||||||
state.closedAt = props.instance.closedAt;
|
|
||||||
}
|
|
||||||
state.isHardClosed = props.instance.hardClose === true;
|
|
||||||
state.occupants = props.instance.userCount;
|
|
||||||
if (props.location === locationStore.lastLocation.location) {
|
|
||||||
state.occupants = locationStore.lastLocation.playerList.size;
|
|
||||||
}
|
|
||||||
state.capacity = props.instance.capacity;
|
|
||||||
state.gameServerVersion = props.instance.gameServerVersion;
|
|
||||||
state.queueSize = props.instance.queueSize;
|
|
||||||
if (props.instance.platforms) state.platforms = props.instance.platforms;
|
|
||||||
if (props.instance.users) state.userList = props.instance.users;
|
|
||||||
if (props.instance.ownerId === userStore.currentUser.id) {
|
if (props.instance.ownerId === userStore.currentUser.id) {
|
||||||
state.canCloseInstance = true;
|
state.canCloseInstance = true;
|
||||||
} else if (props.instance.ownerId?.startsWith('grp_')) {
|
} else if (props.instance.ownerId?.startsWith('grp_')) {
|
||||||
|
|||||||
@@ -368,10 +368,10 @@
|
|||||||
@change="onFileChangeAvatarGallery" />
|
@change="onFileChangeAvatarGallery" />
|
||||||
<el-button
|
<el-button
|
||||||
v-if="avatarDialog.ref.authorId === currentUser.id"
|
v-if="avatarDialog.ref.authorId === currentUser.id"
|
||||||
:disabled="!!avatarDialog.galleryLoading"
|
:disabled="avatarDialog.galleryLoading"
|
||||||
size="small"
|
size="small"
|
||||||
:icon="Upload"
|
:icon="Upload"
|
||||||
:loading="!!avatarDialog.galleryLoading"
|
:loading="avatarDialog.galleryLoading"
|
||||||
style="margin-left: 5px"
|
style="margin-left: 5px"
|
||||||
@click="displayAvatarGalleryUpload"
|
@click="displayAvatarGalleryUpload"
|
||||||
>{{ t('dialog.screenshot_metadata.upload') }}</el-button
|
>{{ t('dialog.screenshot_metadata.upload') }}</el-button
|
||||||
|
|||||||
@@ -887,7 +887,7 @@
|
|||||||
trigger="click"
|
trigger="click"
|
||||||
size="small"
|
size="small"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
:disabled="isGroupMembersLoading || !!groupDialog.memberSearch.length">
|
:disabled="isGroupMembersLoading || groupDialog.memberSearch.length > 0">
|
||||||
<el-button size="small" @click.stop>
|
<el-button size="small" @click.stop>
|
||||||
<span
|
<span
|
||||||
>{{ t(groupDialog.memberSortOrder.name) }}
|
>{{ t(groupDialog.memberSortOrder.name) }}
|
||||||
@@ -909,7 +909,7 @@
|
|||||||
trigger="click"
|
trigger="click"
|
||||||
size="small"
|
size="small"
|
||||||
style="margin-right: 5px"
|
style="margin-right: 5px"
|
||||||
:disabled="isGroupMembersLoading || !!groupDialog.memberSearch.length">
|
:disabled="isGroupMembersLoading || groupDialog.memberSearch.length > 0">
|
||||||
<el-button size="small" @click.stop>
|
<el-button size="small" @click.stop>
|
||||||
<span
|
<span
|
||||||
>{{ t(groupDialog.memberFilter.name) }}
|
>{{ t(groupDialog.memberFilter.name) }}
|
||||||
|
|||||||
@@ -107,14 +107,7 @@
|
|||||||
import configRepository from '../../service/config';
|
import configRepository from '../../service/config';
|
||||||
import { checkCanInvite, getLaunchURL, isRealInstance, parseLocation } from '../../shared/utils';
|
import { checkCanInvite, getLaunchURL, isRealInstance, parseLocation } from '../../shared/utils';
|
||||||
import { getNextDialogIndex } from '../../shared/utils/base/ui';
|
import { getNextDialogIndex } from '../../shared/utils/base/ui';
|
||||||
import {
|
import { useFriendStore, useInviteStore, useLaunchStore, useLocationStore, useGameStore } from '../../stores';
|
||||||
useFriendStore,
|
|
||||||
useInviteStore,
|
|
||||||
useInstanceStore,
|
|
||||||
useLaunchStore,
|
|
||||||
useLocationStore,
|
|
||||||
useGameStore
|
|
||||||
} from '../../stores';
|
|
||||||
import InviteDialog from './InviteDialog/InviteDialog.vue';
|
import InviteDialog from './InviteDialog/InviteDialog.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@@ -124,7 +117,6 @@
|
|||||||
const { launchGame, tryOpenInstanceInVrc } = useLaunchStore();
|
const { launchGame, tryOpenInstanceInVrc } = useLaunchStore();
|
||||||
const { launchDialogData } = storeToRefs(useLaunchStore());
|
const { launchDialogData } = storeToRefs(useLaunchStore());
|
||||||
|
|
||||||
const { showPreviousInstancesInfoDialog } = useInstanceStore();
|
|
||||||
const { canOpenInstanceInGame } = useInviteStore();
|
const { canOpenInstanceInGame } = useInviteStore();
|
||||||
const { isGameRunning } = storeToRefs(useGameStore());
|
const { isGameRunning } = storeToRefs(useGameStore());
|
||||||
|
|
||||||
|
|||||||
@@ -646,7 +646,7 @@ export const useInstanceStore = defineStore('Instance', () => {
|
|||||||
L.shortName = instance.shortName;
|
L.shortName = instance.shortName;
|
||||||
}
|
}
|
||||||
instance.$location = L;
|
instance.$location = L;
|
||||||
L.user = null;
|
L.user = {};
|
||||||
if (L.userId) {
|
if (L.userId) {
|
||||||
ref = userStore.cachedUsers.get(L.userId);
|
ref = userStore.cachedUsers.get(L.userId);
|
||||||
if (typeof ref === 'undefined') {
|
if (typeof ref === 'undefined') {
|
||||||
|
|||||||
@@ -122,10 +122,6 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (LINUX && --state.nextGameRunningCheck <= 0) {
|
if (LINUX && --state.nextGameRunningCheck <= 0) {
|
||||||
if (WINDOWS) {
|
|
||||||
state.nextGameRunningCheck = 3;
|
|
||||||
AppApi.CheckGameRunning();
|
|
||||||
} else {
|
|
||||||
state.nextGameRunningCheck = 1;
|
state.nextGameRunningCheck = 1;
|
||||||
gameStore.updateIsGameRunning(
|
gameStore.updateIsGameRunning(
|
||||||
await AppApi.IsGameRunning(),
|
await AppApi.IsGameRunning(),
|
||||||
@@ -134,7 +130,6 @@ export const useUpdateLoopStore = defineStore('UpdateLoop', () => {
|
|||||||
);
|
);
|
||||||
vrStore.vrInit(); // TODO: make this event based
|
vrStore.vrInit(); // TODO: make this event based
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (--state.nextDatabaseOptimize <= 0) {
|
if (--state.nextDatabaseOptimize <= 0) {
|
||||||
state.nextDatabaseOptimize = 86400; // 1 day
|
state.nextDatabaseOptimize = 86400; // 1 day
|
||||||
database.optimize();
|
database.optimize();
|
||||||
|
|||||||
+4
-14
@@ -1020,7 +1020,7 @@ export const useUserStore = defineStore('User', () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
D.$location = L;
|
D.$location = L;
|
||||||
L.user = null;
|
L.user = {};
|
||||||
if (L.userId) {
|
if (L.userId) {
|
||||||
ref = cachedUsers.get(L.userId);
|
ref = cachedUsers.get(L.userId);
|
||||||
if (typeof ref === 'undefined') {
|
if (typeof ref === 'undefined') {
|
||||||
@@ -1103,9 +1103,10 @@ export const useUserStore = defineStore('User', () => {
|
|||||||
}
|
}
|
||||||
D.users = users;
|
D.users = users;
|
||||||
if (
|
if (
|
||||||
L.worldId &&
|
(L.worldId &&
|
||||||
currentLocation === L.tag &&
|
currentLocation === L.tag &&
|
||||||
playersInInstance.size > 0
|
playersInInstance.size > 0) ||
|
||||||
|
!L.isRealInstance
|
||||||
) {
|
) {
|
||||||
D.instance = {
|
D.instance = {
|
||||||
id: L.instanceId,
|
id: L.instanceId,
|
||||||
@@ -1117,17 +1118,6 @@ export const useUserStore = defineStore('User', () => {
|
|||||||
ref: {}
|
ref: {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (!L.isRealInstance) {
|
|
||||||
D.instance = {
|
|
||||||
id: L.instanceId,
|
|
||||||
tag: L.tag,
|
|
||||||
$location: L,
|
|
||||||
friendCount: 0,
|
|
||||||
users: [],
|
|
||||||
shortName: '',
|
|
||||||
ref: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const instanceRef = instanceStore.cachedInstances.get(L.tag);
|
const instanceRef = instanceStore.cachedInstances.get(L.tag);
|
||||||
if (typeof instanceRef !== 'undefined') {
|
if (typeof instanceRef !== 'undefined') {
|
||||||
D.instance.ref = instanceRef;
|
D.instance.ref = instanceRef;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ export const useVRCXUpdaterStore = defineStore('VRCXUpdater', () => {
|
|||||||
'VRCX_lastVRCXVersion',
|
'VRCX_lastVRCXVersion',
|
||||||
currentVersion.value
|
currentVersion.value
|
||||||
);
|
);
|
||||||
return state.branch === 'Stable' && !!lastVersion;
|
return state.branch === 'Stable' && lastVersion;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user