feat: less bad launches

This commit is contained in:
2025-02-23 23:48:00 +01:00
parent fcd3855c49
commit 70b8b3ae55
27 changed files with 145 additions and 34 deletions

View File

@ -7,6 +7,7 @@ import TabPanel from 'primevue/tabpanel';
import TabPanels from 'primevue/tabpanels';
import Tabs from 'primevue/tabs';
import { invoke } from '@tauri-apps/api/core';
import { listen } from '@tauri-apps/api/event';
import { onOpenUrl } from '@tauri-apps/plugin-deep-link';
import { open } from '@tauri-apps/plugin-dialog';
import ModList from './ModList.vue';
@ -19,6 +20,7 @@ const store = usePkgStore();
store.setupListeners();
const currentTab = ref('3');
const startEnabled = ref(true);
const loadProfile = async () => {
await store.reloadProfile();
@ -49,9 +51,8 @@ const loadProfile = async () => {
const isProfileDisabled = computed(() => store.profile === null);
const startline = async () => {
startEnabled.value = false;
await invoke('startline');
//startDisabled.value = true;
};
onOpenUrl((urls) => {
@ -61,6 +62,10 @@ onOpenUrl((urls) => {
onMounted(async () => {
await loadProfile();
});
listen('launch-end', () => {
startEnabled.value = true;
});
</script>
<template>
@ -82,7 +87,7 @@ onMounted(async () => {
></Tab>
<div class="grow"></div>
<Button
:disabled="false"
:disabled="!startEnabled"
icon="pi pi-play"
label="START"
aria-label="start"