Migrate game metadata import to task system #90 (#103)

* feat: move game import to new task system

* fix: sizing issue with new task UI

* fix: lint

* feat: add pcgamingwiki task
This commit is contained in:
DecDuck
2025-06-08 11:37:24 +10:00
committed by GitHub
parent 9f8890020f
commit de438b93d5
9 changed files with 307 additions and 187 deletions

View File

@ -334,7 +334,7 @@ async function importGame(useMetadata: boolean) {
: undefined;
const option = games.unimportedGames[currentlySelectedGame.value];
const game = await $dropFetch("/api/v1/admin/import/game", {
const { taskId } = await $dropFetch("/api/v1/admin/import/game", {
method: "POST",
body: {
path: option.game,
@ -343,7 +343,7 @@ async function importGame(useMetadata: boolean) {
},
});
router.push(`/admin/library/${game.id}`);
router.push(`/admin/task/${taskId}`);
}
function importGame_wrapper(metadata = true) {
importLoading.value = true;

View File

@ -57,11 +57,7 @@
<pre v-for="(line, idx) in task.log" :key="idx">{{ line }}</pre>
</div>
</div>
<div
v-else
role="status"
class="w-full h-screen flex items-center justify-center"
>
<div v-else role="status" class="w-full flex items-center justify-center">
<svg
aria-hidden="true"
class="size-8 text-transparent animate-spin fill-white"