feat: diagnostic exports

This commit is contained in:
2025-04-30 21:19:15 +00:00
parent edef5cc6dc
commit 2e17e0ae75
7 changed files with 83 additions and 16 deletions

View File

@ -29,23 +29,34 @@ const files = new Set<string>();
).includes('chunithm');
})();
const fileList = {
ongeki: ['aime.txt', 'inohara.cfg', 'mu3.ini', 'segatools-base.ini'],
chunithm: ['aime.txt', 'saekawa.toml', 'segatools-base.ini'],
};
const diagnosticList = {
ongeki: ['mu3.ini', 'segatools-base.ini'],
chunithm: ['segatools-base.ini'],
};
const diagnostic = ref(false);
const exportTemplate = async () => {
const fl = [...files.values()];
exportVisible.value = false;
await invoke('export_profile', {
exportKeychip: exportKeychip.value,
files: fl,
isDiagnostic: diagnostic.value,
files:
diagnostic.value === true
? diagnosticList[prf.current!.meta.game]
: fl,
});
await invoke('open_file', {
path: await path.join(await general.configDir, 'exports'),
});
};
const fileList = {
ongeki: ['aime.txt', 'inohara.cfg', 'mu3.ini', 'segatools-base.ini'],
chunithm: ['aime.txt', 'saekawa.toml', 'segatools-base.ini'],
};
const fileListCurrent: Ref<string[]> = ref([]);
const recalcFileList = async () => {
@ -91,16 +102,36 @@ const importPick = async () => {
:visible="exportVisible"
:closable="false /*this shit doesn't work */"
:header="`${t('profile.export')} ${prf.current?.meta.name}`"
:style="{ width: '300px', scale: client.scaleValue }"
:style="{ width: '330px', scale: client.scaleValue }"
>
<div class="flex flex-col gap-4">
<div class="flex flex-col items-center">
<SelectButton
v-model="diagnostic"
:options="[
{
title: t('profile.standardExport'),
value: false,
},
{
title: t('profile.diagnostic'),
value: true,
},
]"
:allow-empty="false"
option-label="title"
option-value="value"
>
</SelectButton>
</div>
<div class="flex flex-row">
<div class="grow">{{ t('profile.export') }} keychip</div>
<ToggleSwitch v-model="exportKeychip" />
<ToggleSwitch :disabled="diagnostic" v-model="exportKeychip" />
</div>
<div class="flex flex-row" v-for="f in fileListCurrent">
<div class="grow">{{ t('profile.export') }} {{ f }}</div>
<ToggleSwitch
:disabled="diagnostic"
:model-value="true"
@update:model-value="
(v) => {