feat: beginnings of platform & redist management

This commit is contained in:
DecDuck
2025-08-27 19:52:36 +10:00
parent d323816b9e
commit ca7a89bbcf
17 changed files with 286 additions and 125 deletions

View File

@ -129,7 +129,7 @@
<LoadingButton
class="w-fit"
:loading="props.loading"
:disabled="!(name && description && currentFileObjectUrl)"
:disabled="buttonDisabled"
@click="() => importRedist()"
>
{{ $t("library.admin.import.import") }}
@ -178,6 +178,8 @@ const platform = ref<{ name: string; icon: string; fileExts: string[] }>({
fileExts: [],
});
const buttonDisabled = computed<boolean>(() => !(name.value && description.value && currentFileObjectUrl.value && (!isPlatform.value || (platform.value.name && platform.value.icon))))
function addFile(event: Event) {
const file = (event.target as HTMLInputElement)?.files?.[0];
if (!file) return;