mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-13 08:12:44 +10:00
Functioning download progress updates
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user