mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 22:36:05 +02:00
Update UI on instance fetch
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
|
||||
<script setup>
|
||||
import { Loading, Lock, WarnTriangleFilled } from '@element-plus/icons-vue';
|
||||
import { ref, watchEffect } from 'vue';
|
||||
import { ref, watchEffect, watch } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { getGroupName, getWorldName, parseLocation } from '../shared/utils';
|
||||
import { useGroupStore, useInstanceStore, useSearchStore, useWorldStore } from '../stores';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
@@ -33,6 +34,7 @@
|
||||
const { showPreviousInstancesInfoDialog } = useInstanceStore();
|
||||
const { verifyShortName } = useSearchStore();
|
||||
const { cachedInstances } = useInstanceStore();
|
||||
const { lastInstanceApplied } = storeToRefs(useInstanceStore());
|
||||
|
||||
const props = defineProps({
|
||||
location: String,
|
||||
@@ -63,6 +65,16 @@
|
||||
parse();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => lastInstanceApplied.value,
|
||||
(instanceId) => {
|
||||
if (instanceId === currentInstanceId()) {
|
||||
parse();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
function currentInstanceId() {
|
||||
if (typeof props.traveling !== 'undefined' && props.location === 'traveling') {
|
||||
return props.traveling;
|
||||
|
||||
Reference in New Issue
Block a user