mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-13 08:12:44 +10:00
feat(downloads): Download cancelling
Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -9,7 +9,12 @@
|
||||
Download game
|
||||
<span v-if="progress != 0"> ({{ Math.floor(progress * 1000) / 10 }}%) </span>
|
||||
</button>
|
||||
</template>
|
||||
<button
|
||||
class="w-full rounded-md p-4 bg-blue-600 text-white"
|
||||
@click="stopGameDownload"
|
||||
>
|
||||
Cancel game download
|
||||
</button></template>
|
||||
<script setup lang="ts">
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
|
||||
@ -36,4 +41,7 @@ async function startGameDownload() {
|
||||
})();
|
||||
}, 100);
|
||||
}
|
||||
async function stopGameDownload() {
|
||||
await invoke("stop_game_download", { "gameId": gameId.value })
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user