SLowly integrating game_download into the FE. Started with using the manifest minimal example in the server (#1)

This commit is contained in:
quexeky
2024-10-19 22:17:43 +11:00
parent dcd8fa80c0
commit 07379b2ba8
3 changed files with 80 additions and 9 deletions

View File

@ -1,3 +1,26 @@
<template>
</template>
<button class="w-full rounded-md p-4 bg-blue-600 text-white" @click="requestGameWrapper">
Load Data
</button>
</template>
<script setup lang="ts">
definePageMeta({
layout: "mini",
});
import { invoke } from "@tauri-apps/api/core";
async function requestGame() {
console.log("Requested game from FE");
await invoke("start_game_download", { gameId: "123", gameVersion: "1.2.3", maxThreads: 4 });
}
function requestGameWrapper() {
console.log("Wrapper started");
requestGame()
.then(() => {})
.catch((e) => {
console.log(e);
})
}
</script>