forked from akanyan/STARTLINER
feat: initial chunithm support
This commit is contained in:
@ -16,6 +16,7 @@ import StartButton from './StartButton.vue';
|
||||
import { invoke } from '../invoke';
|
||||
import { useGeneralStore, usePkgStore, usePrfStore } from '../stores';
|
||||
import { Dirs } from '../types';
|
||||
import { listen } from '@tauri-apps/api/event';
|
||||
|
||||
const pkg = usePkgStore();
|
||||
const prf = usePrfStore();
|
||||
@ -27,6 +28,7 @@ const currentTab: Ref<string | number> = ref(3);
|
||||
const pkgSearchTerm = ref('');
|
||||
|
||||
const isProfileDisabled = computed(() => prf.current === null);
|
||||
const isRunning = ref(false);
|
||||
|
||||
onMounted(async () => {
|
||||
invoke('list_directories').then((d) => {
|
||||
@ -47,8 +49,23 @@ onMounted(async () => {
|
||||
key: 'segatools-mu3hook',
|
||||
force: false,
|
||||
});
|
||||
await invoke('install_package', {
|
||||
key: 'segatools-chusanhook',
|
||||
force: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
listen('launch-start', () => {
|
||||
isRunning.value = true;
|
||||
currentTab.value = 5;
|
||||
});
|
||||
|
||||
listen('launch-end', () => {
|
||||
isRunning.value = false;
|
||||
currentTab.value = 0;
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -61,20 +78,27 @@ onMounted(async () => {
|
||||
>
|
||||
<div class="fixed w-full flex z-100">
|
||||
<TabList class="grow">
|
||||
<Tab :disabled="isProfileDisabled" :value="0"
|
||||
><div class="pi pi-list-check"></div
|
||||
<Tab :value="3" :disabled="isRunning"
|
||||
><div class="pi pi-question-circle"></div
|
||||
></Tab>
|
||||
<Tab :disabled="isProfileDisabled || isRunning" :value="0"
|
||||
><div class="pi pi-box"></div
|
||||
></Tab>
|
||||
<Tab v-if="prf.current?.meta.game === 'chunithm'" :disabled="isRunning" :value="4"
|
||||
><div class="pi pi-ticket"></div
|
||||
></Tab>
|
||||
<Tab
|
||||
v-if="pkg.networkStatus === 'online'"
|
||||
:disabled="isProfileDisabled"
|
||||
:disabled="isProfileDisabled || isRunning"
|
||||
:value="1"
|
||||
><div class="pi pi-download"></div
|
||||
></Tab>
|
||||
<Tab :disabled="isProfileDisabled" :value="2"
|
||||
<Tab :disabled="isProfileDisabled || isRunning" :value="2"
|
||||
><div class="pi pi-cog"></div
|
||||
></Tab>
|
||||
<Tab :value="3"
|
||||
><div class="pi pi-question-circle"></div
|
||||
|
||||
<Tab :value="5" v-if="isRunning"
|
||||
><div class="pi pi-sparkles"></div
|
||||
></Tab>
|
||||
<div class="grow"></div>
|
||||
<div class="flex gap-4">
|
||||
@ -131,16 +155,6 @@ onMounted(async () => {
|
||||
missing.<br />Existing features are expected to break
|
||||
sometimes.
|
||||
<ProfileList />
|
||||
<img
|
||||
v-if="prf.current?.game === 'ongeki'"
|
||||
src="/sticker-ongeki.svg"
|
||||
class="fixed bottom-0 right-0 z-999"
|
||||
/>
|
||||
<img
|
||||
v-else-if="prf.current?.game === 'chunithm'"
|
||||
src="/sticker-chunithm.svg"
|
||||
class="fixed bottom-0 right-0 z-999"
|
||||
/>
|
||||
<br /><br /><br />
|
||||
<footer>
|
||||
<Button
|
||||
@ -151,7 +165,24 @@ onMounted(async () => {
|
||||
/>
|
||||
</footer>
|
||||
</TabPanel>
|
||||
<TabPanel :value="4">
|
||||
CHUNITHM patches are not yet implemented.<br />Use
|
||||
<a href=https://patcher.two-torial.xyz/ target="_blank" style="text-decoration: underline;">patcher.two-torial.xyz</a>
|
||||
</TabPanel>
|
||||
<TabPanel :value="5">Running!</TabPanel>
|
||||
</TabPanels>
|
||||
<div v-if="currentTab === 5 || currentTab === 3">
|
||||
<img
|
||||
v-if="prf.current?.meta.game === 'ongeki'"
|
||||
src="/sticker-ongeki.svg"
|
||||
class="fixed bottom-0 right-0 z-999"
|
||||
/>
|
||||
<img
|
||||
v-else-if="prf.current?.meta.game === 'chunithm'"
|
||||
src="/sticker-chunithm.svg"
|
||||
class="fixed bottom-0 right-0 z-999"
|
||||
/>
|
||||
</div>
|
||||
</Tabs>
|
||||
</main>
|
||||
</template>
|
||||
|
Reference in New Issue
Block a user