fix: misc cleanup

This commit is contained in:
2025-04-23 14:24:35 +00:00
parent 8b2c1a04ee
commit f26d83f291
11 changed files with 89 additions and 59 deletions

View File

@ -1,5 +1,5 @@
<script setup lang="ts">
import { Ref, computed, ref } from 'vue';
import { Ref, computed, onMounted, ref } from 'vue';
import InputNumber from 'primevue/inputnumber';
import Select from 'primevue/select';
import SelectButton from 'primevue/selectbutton';
@ -67,10 +67,12 @@ const loadDisplays = () => {
loadDisplays();
const game = prf.current!.meta.game;
const isVertical = game === 'ongeki';
const adjustableRez = game === 'ongeki';
const canSkipPrimarySwitch = game === 'ongeki';
const game = computed(() => prf.current!.meta.game);
const isVertical = computed(() => prf.current!.meta.game === 'ongeki');
const adjustableRez = computed(() => prf.current!.meta.game === 'ongeki');
const canSkipPrimarySwitch = computed(
() => prf.current!.meta.game === 'ongeki'
);
</script>
<template>

View File

@ -35,8 +35,6 @@ const names = computed(() => {
io: 'chuniio',
};
}
case undefined:
throw new Error('Option tab without a profile');
}
});
@ -59,14 +57,14 @@ const checkSegatoolsIni = async (target: string) => {
<template>
<OptionCategory :title="t('cfg.segatools.general')">
<OptionRow
:title="names.exe"
:title="names?.exe"
:tooltip="t('cfg.segatools.targetTooltip')"
>
<FilePicker
:directory="false"
:promptname="names.exe"
:promptname="names?.exe"
extension="exe"
:value="prf.current!.data.sgt.target"
:value="prf.current?.data.sgt.target"
:callback="
(value: string) => (
(prf.current!.data.sgt.target = value),
@ -80,7 +78,7 @@ const checkSegatoolsIni = async (target: string) => {
<FilePicker
:directory="true"
placeholder="amfs"
:value="prf.current!.data.sgt.amfs"
:value="prf.current?.data.sgt.amfs"
:callback="
(value: string) => (prf.current!.data.sgt.amfs = value)
"
@ -106,7 +104,7 @@ const checkSegatoolsIni = async (target: string) => {
></FilePicker>
</OptionRow>
<OptionRow
:title="names.hook"
:title="names?.hook"
:tooltip="
t('cfg.segatools.installTooltip', {
thing: t('cfg.segatools.hooks'),
@ -132,7 +130,7 @@ const checkSegatoolsIni = async (target: string) => {
></Select>
</OptionRow>
<OptionRow
:title="names.io"
:title="names?.io"
:tooltip="
t('cfg.segatools.installTooltip', {
thing: t('cfg.segatools.ioModules'),