Open new instance in-game

This commit is contained in:
Natsumi
2025-08-27 20:09:32 +12:00
parent 60fd88a731
commit bb6faac54c
4 changed files with 32 additions and 7 deletions
+10
View File
@@ -5,9 +5,13 @@ import { $app } from '../app';
import { watchState } from '../service/watchState';
import { parseLocation } from '../shared/utils';
import { useInstanceStore } from './instance';
import { useGameStore } from './game';
import { useLaunchStore } from './launch';
export const useInviteStore = defineStore('Invite', () => {
const instanceStore = useInstanceStore();
const gameStore = useGameStore();
const launchStore = useLaunchStore();
const state = reactive({
editInviteMessageDialog: {
visible: false,
@@ -160,6 +164,12 @@ export const useInviteStore = defineStore('Invite', () => {
if (!L.isRealInstance) {
return;
}
if (gameStore.isGameRunning && !LINUX) {
const secureOrShortName =
args.json.shortName || args.json.secureName;
launchStore.tryOpenInstanceInVrc(location, secureOrShortName);
return;
}
instanceRequest
.selfInvite({
instanceId: L.instanceId,