feat: Resume download button

Also added DBWrite and DBRead structs to make database management easier

Signed-off-by: quexeky <git@quexeky.dev>
This commit is contained in:
quexeky
2025-06-21 12:51:50 +10:00
parent abf371c9fc
commit fd61903130
16 changed files with 335 additions and 123 deletions

View File

@ -32,6 +32,7 @@
@uninstall="() => uninstall()"
@kill="() => kill()"
@options="() => (configureModalOpen = true)"
@resume="() => console.log('resume')"
:status="status"
/>
<a
@ -495,6 +496,7 @@ const currentImageIndex = ref(0);
const configureModalOpen = ref(false);
async function installFlow() {
installFlowOpen.value = true;
versionOptions.value = undefined;
@ -532,6 +534,15 @@ async function install() {
installLoading.value = false;
}
async function resumeDownload() {
try {
await invoke("resume_download", { game_id: game.value.id, version: status.value.version_name!, install_dir: status.value.install_dir! })
}
catch(e) {
console.error(e)
}
}
async function launch() {
try {
await invoke("launch_game", { id: game.value.id });