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