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
+12
View File
@@ -16,11 +16,13 @@
<script setup>
import { Lock, Unlock, WarnTriangleFilled } from '@element-plus/icons-vue';
import { ref, watch } from 'vue';
import { storeToRefs } from 'pinia';
import { getGroupName, parseLocation } from '../shared/utils';
import { useGroupStore, useLaunchStore, useInstanceStore } from '../stores';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const { cachedInstances } = useInstanceStore();
const { lastInstanceApplied } = storeToRefs(useInstanceStore());
const launchStore = useLaunchStore();
const groupStore = useGroupStore();
@@ -95,6 +97,16 @@
watch(() => props.locationobject, parse, { immediate: true });
watch(
() => lastInstanceApplied.value,
(instanceId) => {
if (instanceId === location.value) {
parse();
}
},
{ immediate: true }
);
function showLaunchDialog() {
launchStore.showLaunchDialog(location.value, shortName.value);
}