Functioning download progress updates

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-11-04 17:11:37 +11:00
parent bd39f1fd72
commit 0528c78092
9 changed files with 89 additions and 27 deletions

View File

@ -19,6 +19,12 @@
>
Cancel game download
</button>
<button
class="w-full rounded-md p-4 bg-blue-600 text-white"
@click="getGameDownloadProgressWrapper"
>
Get game download progress
</button>
</template>
<script setup lang="ts">
import { invoke } from "@tauri-apps/api/core";
@ -66,4 +72,16 @@ function cancelGameDownloadWrapper() {
console.log(e)
})
}
async function getGameDownloadProgress() {
console.log("Getting game download status");
await invoke("get_game_download_progress", { gameId: gameId.value })
}
function getGameDownloadProgressWrapper() {
getGameDownloadProgress()
.then(() => {})
.catch((e) => {
console.log(e)
})
}
</script>