2024-10-24 19:48:19 -06:00
|
|
|
<script lang="ts">
|
|
|
|
import {EventsOn} from '../wailsjs/runtime/runtime'
|
|
|
|
|
|
|
|
var stat: string = ""
|
|
|
|
var completed: number = 0
|
|
|
|
var total: number = 0
|
|
|
|
var downloading: boolean = false
|
|
|
|
|
|
|
|
EventsOn("status", (status) => {
|
|
|
|
stat = status;
|
|
|
|
})
|
|
|
|
|
|
|
|
EventsOn("download", (Completed, Total) => {
|
|
|
|
completed = Completed / (1024*1024)
|
|
|
|
total = Total / (1024*1024)
|
|
|
|
downloading = true
|
|
|
|
})
|
|
|
|
|
|
|
|
EventsOn("download_complete", () => {
|
|
|
|
downloading = false
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<main>
|
|
|
|
<p id="status">{stat}</p>
|
|
|
|
{#if downloading}
|
|
|
|
<p id="download_status">{completed}MB / {total}MB</p>
|
|
|
|
{/if}
|
2024-10-25 20:46:06 -06:00
|
|
|
</main>
|