forked from akanyan/STARTLINER
feat: less bad launches
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user