Skip to content

Commit

Permalink
support for multifile upload
Browse files Browse the repository at this point in the history
  • Loading branch information
coDiesIrae committed Oct 7, 2024
1 parent 7d7e307 commit 34cf120
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/app/(app)/addons/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function Home() {
onClick={async () => {
const r = await open({
directory: false,
multiple: false,
multiple: true,
filters: [
{
name: "VPK files",
Expand All @@ -40,13 +40,15 @@ export default function Home() {
});

if (r) {
const { success } = await installAddon({
filePath: r,
});
await Promise.all(
r.map((r) =>
installAddon({
filePath: r,
})
)
);

if (success) {
mutateInstalledAddons();
}
mutateInstalledAddons();
}
}}
>
Expand Down

0 comments on commit 34cf120

Please sign in to comment.