forked from akanyan/STARTLINER
feat: multi-profile progress
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "STARTLINER",
|
"productName": "STARTLINER",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"identifier": "moe.tendokyu.akanyan.startliner",
|
"identifier": "zip.patafour.startliner",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "bun run dev",
|
"beforeDevCommand": "bun run dev",
|
||||||
"devUrl": "http://localhost:1420",
|
"devUrl": "http://localhost:1420",
|
||||||
|
@ -73,31 +73,22 @@ onMounted(async () => {
|
|||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel value="3">
|
<TabPanel value="3">
|
||||||
<strong>UNDER CONSTRUCTION</strong><br />Some features are
|
<strong>UNDER CONSTRUCTION</strong><br />Some features are
|
||||||
missing.<br />Existing features are expected to break any
|
missing.<br />Existing features are expected to break
|
||||||
time.
|
sometimes.
|
||||||
<ProfileList />
|
<ProfileList />
|
||||||
<img
|
<img
|
||||||
v-if="prf.current?.game === 'ongeki'"
|
v-if="prf.current?.game === 'ongeki'"
|
||||||
src="/sticker-ongeki.svg"
|
src="/sticker-ongeki.svg"
|
||||||
class="fixed bottom-0 right-0"
|
class="fixed bottom-0 right-0 z-999"
|
||||||
/>
|
/>
|
||||||
<img
|
<img
|
||||||
v-else-if="prf.current?.game === 'chunithm'"
|
v-else-if="prf.current?.game === 'chunithm'"
|
||||||
src="/sticker-chunithm.svg"
|
src="/sticker-chunithm.svg"
|
||||||
class="fixed bottom-0 right-0"
|
class="fixed bottom-0 right-0 z-999"
|
||||||
/>
|
/>
|
||||||
<br /><br /><br />
|
<br /><br /><br />
|
||||||
<footer
|
<footer>
|
||||||
style="
|
|
||||||
position: fixed;
|
|
||||||
left: 0px;
|
|
||||||
bottom: 0px;
|
|
||||||
height: 40px;
|
|
||||||
width: 100%;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<Button
|
<Button
|
||||||
style="margin-left: 6px"
|
|
||||||
icon="pi pi-discord"
|
icon="pi pi-discord"
|
||||||
as="a"
|
as="a"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue';
|
||||||
import Button from 'primevue/button';
|
import Button from 'primevue/button';
|
||||||
import ToggleSwitch from 'primevue/toggleswitch';
|
import ToggleSwitch from 'primevue/toggleswitch';
|
||||||
import { open } from '@tauri-apps/plugin-shell';
|
import { open } from '@tauri-apps/plugin-shell';
|
||||||
@ -14,9 +15,14 @@ const props = defineProps({
|
|||||||
pkg: Object as () => Package,
|
pkg: Object as () => Package,
|
||||||
});
|
});
|
||||||
|
|
||||||
const toggle = async (value: boolean) => {
|
const model = computed({
|
||||||
|
get() {
|
||||||
|
return prf.isPkgEnabled(props.pkg).value;
|
||||||
|
},
|
||||||
|
async set(value: boolean) {
|
||||||
await prf.togglePkg(props.pkg, value);
|
await prf.togglePkg(props.pkg, value);
|
||||||
};
|
},
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -28,8 +34,7 @@ const toggle = async (value: boolean) => {
|
|||||||
class="scale-[1.33] shrink-0"
|
class="scale-[1.33] shrink-0"
|
||||||
inputId="switch"
|
inputId="switch"
|
||||||
:disabled="!pkg?.loc"
|
:disabled="!pkg?.loc"
|
||||||
:model-value="prf.isPkgEnabled(pkg)"
|
v-model="model"
|
||||||
v-on:value-change="toggle"
|
|
||||||
/>
|
/>
|
||||||
<InstallButton :pkg="pkg" />
|
<InstallButton :pkg="pkg" />
|
||||||
<Button
|
<Button
|
||||||
@ -43,6 +48,7 @@ const toggle = async (value: boolean) => {
|
|||||||
v-on:click="pkg?.loc && open(pkg.loc.path ?? '')"
|
v-on:click="pkg?.loc && open(pkg.loc.path ?? '')"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
|
v-if="pkg?.rmt"
|
||||||
rounded
|
rounded
|
||||||
icon="pi pi-external-link"
|
icon="pi pi-external-link"
|
||||||
severity="info"
|
severity="info"
|
||||||
@ -50,7 +56,7 @@ const toggle = async (value: boolean) => {
|
|||||||
size="small"
|
size="small"
|
||||||
class="ml-2 shrink-0"
|
class="ml-2 shrink-0"
|
||||||
style="width: 2rem; height: 2rem"
|
style="width: 2rem; height: 2rem"
|
||||||
v-on:click="pkg?.rmt && open(pkg.rmt.package_url ?? '')"
|
v-on:click="open(pkg.rmt.package_url ?? '')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -71,7 +71,7 @@ const extraDisplayOptionsDisabled = computed(() => {
|
|||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
const aime_path = await path.join(await prf.configDir, 'aime.txt');
|
const aime_path = await path.join(await prf.configDir, 'aime.txt');
|
||||||
aimeCode.value = await readTextFile(aime_path);
|
aimeCode.value = await readTextFile(aime_path).catch(() => '');
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -227,6 +227,15 @@ const extraDisplayOptionsDisabled = computed(() => {
|
|||||||
:model-value="prf.cfgAny('subnet', '')"
|
:model-value="prf.cfgAny('subnet', '')"
|
||||||
/>
|
/>
|
||||||
</OptionRow>
|
</OptionRow>
|
||||||
|
<OptionRow title="Address suffix">
|
||||||
|
<InputText
|
||||||
|
class="shrink"
|
||||||
|
size="small"
|
||||||
|
:maxlength="3"
|
||||||
|
placeholder="12"
|
||||||
|
:model-value="prf.cfgAny('addrsuffix', '')"
|
||||||
|
/>
|
||||||
|
</OptionRow>
|
||||||
</OptionCategory>
|
</OptionCategory>
|
||||||
<OptionCategory title="Misc">
|
<OptionCategory title="Misc">
|
||||||
<OptionRow title="OpenSSL bug workaround for Intel ≥10th gen">
|
<OptionRow title="OpenSSL bug workaround for Intel ≥10th gen">
|
||||||
@ -250,6 +259,8 @@ const extraDisplayOptionsDisabled = computed(() => {
|
|||||||
<OptionRow title="More segatools options">
|
<OptionRow title="More segatools options">
|
||||||
<FileEditor filename="segatools-base.ini" />
|
<FileEditor filename="segatools-base.ini" />
|
||||||
</OptionRow>
|
</OptionRow>
|
||||||
|
</OptionCategory>
|
||||||
|
<OptionCategory title="Extensions">
|
||||||
<OptionRow title="Inohara config">
|
<OptionRow title="Inohara config">
|
||||||
<FileEditor
|
<FileEditor
|
||||||
filename="inohara.cfg"
|
filename="inohara.cfg"
|
||||||
|
@ -6,26 +6,27 @@ const prf = usePrfStore();
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="mt-4 flex flex-wrap align-middle gap-4">
|
<div class="mt-4 flex flex-row flex-wrap align-middle gap-4">
|
||||||
<Button
|
<Button
|
||||||
:disabled="prf.list.length > 0"
|
|
||||||
label="O.N.G.E.K.I. profile"
|
label="O.N.G.E.K.I. profile"
|
||||||
icon="pi pi-plus"
|
icon="pi pi-plus"
|
||||||
class="ongeki-button"
|
class="ongeki-button profile-button"
|
||||||
@click="() => prf.create('ongeki')"
|
@click="() => prf.create('ongeki')"
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
:disabled="prf.list.length > 0"
|
|
||||||
label="CHUNITHM profile"
|
label="CHUNITHM profile"
|
||||||
icon="pi pi-plus"
|
icon="pi pi-plus"
|
||||||
class="chunithm-button"
|
class="chunithm-button profile-button"
|
||||||
@click="() => prf.create('chunithm')"
|
@click="() => prf.create('chunithm')"
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="mt-12 flex flex-col flex-wrap align-middle gap-4">
|
||||||
<div v-for="p in prf.list">
|
<div v-for="p in prf.list">
|
||||||
|
<div class="flex flex-row flex-wrap align-middle gap-2">
|
||||||
<Button
|
<Button
|
||||||
:disabled="
|
:disabled="
|
||||||
prf.current?.game === p.game && prf.current?.name === p.name
|
prf.current?.game === p.game &&
|
||||||
|
prf.current?.name === p.name
|
||||||
"
|
"
|
||||||
:label="p.name"
|
:label="p.name"
|
||||||
:class="
|
:class="
|
||||||
@ -33,31 +34,54 @@ const prf = usePrfStore();
|
|||||||
? 'chunithm-button'
|
? 'chunithm-button'
|
||||||
: 'ongeki-button') +
|
: 'ongeki-button') +
|
||||||
' ' +
|
' ' +
|
||||||
'self-center grow'
|
'self-center profile-button'
|
||||||
"
|
"
|
||||||
@click="prf.switchTo(p.game, p.name)"
|
@click="prf.switchTo(p.game, p.name)"
|
||||||
/>
|
/>
|
||||||
|
<Button
|
||||||
|
rounded
|
||||||
|
icon="pi pi-trash"
|
||||||
|
severity="danger"
|
||||||
|
aria-label="remove"
|
||||||
|
size="small"
|
||||||
|
class="self-center ml-2"
|
||||||
|
style="width: 2rem; height: 2rem"
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
rounded
|
||||||
|
icon="pi pi-clone"
|
||||||
|
severity="warn"
|
||||||
|
aria-label="duplicate"
|
||||||
|
size="small"
|
||||||
|
class="self-center"
|
||||||
|
style="width: 2rem; height: 2rem"
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
<Button
|
||||||
|
rounded
|
||||||
|
icon="pi pi-pencil"
|
||||||
|
severity="help"
|
||||||
|
aria-label="duplicate"
|
||||||
|
size="small"
|
||||||
|
class="self-center"
|
||||||
|
style="width: 2rem; height: 2rem"
|
||||||
|
:disabled="true"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.create-button {
|
.profile-button {
|
||||||
background-color: var(--p-green-400);
|
width: 14em;
|
||||||
border-color: var(--p-green-400);
|
white-space: nowrap;
|
||||||
width: 10em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.create-button:hover,
|
|
||||||
.create-button:active {
|
|
||||||
background-color: var(--p-green-300) !important;
|
|
||||||
border-color: var(--p-green-300) !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ongeki-button {
|
.ongeki-button {
|
||||||
background-color: var(--p-pink-400);
|
background-color: var(--p-pink-400);
|
||||||
border-color: var(--p-pink-400);
|
border-color: var(--p-pink-400);
|
||||||
width: 14em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ongeki-button:hover,
|
.ongeki-button:hover,
|
||||||
@ -69,7 +93,6 @@ const prf = usePrfStore();
|
|||||||
.chunithm-button {
|
.chunithm-button {
|
||||||
background-color: var(--p-yellow-400);
|
background-color: var(--p-yellow-400);
|
||||||
border-color: var(--p-yellow-400);
|
border-color: var(--p-yellow-400);
|
||||||
width: 14em;
|
|
||||||
}
|
}
|
||||||
.chunithm-button:hover,
|
.chunithm-button:hover,
|
||||||
.chunithm-button:active {
|
.chunithm-button:active {
|
||||||
|
Reference in New Issue
Block a user