feat: more breaking changes

This commit is contained in:
2025-03-06 20:38:18 +00:00
parent 39ba6a5891
commit cda8230d7d
19 changed files with 638 additions and 559 deletions

View File

@ -1,8 +1,11 @@
<script setup lang="ts">
import { Ref, ref } from 'vue';
import { Ref, computed, ref } from 'vue';
import Button from 'primevue/button';
import { listen } from '@tauri-apps/api/event';
import { invoke } from '../invoke';
import { usePrfStore } from '../stores';
const prf = usePrfStore();
type StartStatus = 'ready' | 'preparing' | 'running';
const startStatus: Ref<StartStatus> = ref('ready');
@ -21,6 +24,16 @@ const kill = async () => {
startStatus.value = 'ready';
};
const disabledTooltip = computed(() => {
if (prf.cfg('target-path', '').value.length === 0) {
return 'The game path must be specified';
}
if (prf.cfg('amfs', '').value.length === 0) {
return 'The amfs path must be specified';
}
return null;
});
listen('launch-start', () => {
startStatus.value = 'running';
});
@ -33,7 +46,8 @@ listen('launch-end', () => {
<template>
<Button
v-if="startStatus === 'ready'"
:disabled="false"
v-tooltip="disabledTooltip"
:disabled="disabledTooltip !== null"
icon="pi pi-play"
label="START"
aria-label="start"