Merge branch 'downloads' (again)

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2024-11-04 18:57:54 +11:00
12 changed files with 115 additions and 296 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>