Update UI on instance fetch

This commit is contained in:
Natsumi
2025-10-07 19:55:40 +13:00
parent 53ccaf25e9
commit ec86cbf9b6
4 changed files with 31 additions and 3 deletions
+5 -1
View File
@@ -1,5 +1,5 @@
import { defineStore } from 'pinia';
import { computed, reactive, watch } from 'vue';
import { computed, reactive, watch, ref } from 'vue';
import { ElMessage } from 'element-plus';
import { instanceRequest, userRequest, worldRequest } from '../api';
import configRepository from '../service/config';
@@ -82,6 +82,8 @@ export const useInstanceStore = defineStore('Instance', () => {
let cachedInstances = new Map();
const lastInstanceApplied = ref('');
const currentInstanceWorld = computed({
get: () => state.currentInstanceWorld,
set: (value) => {
@@ -417,6 +419,7 @@ export const useInstanceStore = defineStore('Instance', () => {
groupInstance.instance = ref;
}
}
lastInstanceApplied.value = ref.id;
return ref;
}
@@ -1230,6 +1233,7 @@ export const useInstanceStore = defineStore('Instance', () => {
state,
cachedInstances,
lastInstanceApplied,
currentInstanceWorld,
currentInstanceLocation,
queuedInstances,