mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-10 04:22:13 +10:00
* feat: add new template options, asahi support, and refactoring * feat: install dir scanning, validation fixes, progress fixes, download manager refactor This kind of ballooned out of scope, but I implemented some much needed fixes for the download manager. First off, I cleanup the Downloadable trait, there was some duplication of function. Second, I refactored the "validate" into the GameDownloadAgent, which calls a 'validate_chunk_logic' yada, same structure as downloading. Third, I fixed the progress and validation issues. Fourth, I added game scanning * feat: out of box support for Asahi Linux * fix: clippy * fix: don't break database
46 lines
981 B
Vue
46 lines
981 B
Vue
<template>
|
|
<LoadingIndicator />
|
|
<NuxtLayout class="select-none w-screen h-screen">
|
|
<NuxtPage />
|
|
<ModalStack />
|
|
</NuxtLayout>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import "~/composables/downloads.js";
|
|
|
|
import { invoke } from "@tauri-apps/api/core";
|
|
import { AppStatus } from "~/types";
|
|
import { listen } from "@tauri-apps/api/event";
|
|
import { useAppState } from "./composables/app-state.js";
|
|
import {
|
|
initialNavigation,
|
|
setupHooks,
|
|
} from "./composables/state-navigation.js";
|
|
|
|
const router = useRouter();
|
|
|
|
const state = useAppState();
|
|
try {
|
|
state.value = JSON.parse(await invoke("fetch_state"));
|
|
} catch (e) {
|
|
console.error("failed to parse state", e);
|
|
}
|
|
|
|
// This is inefficient but apparently we do it lol
|
|
router.beforeEach(async () => {
|
|
try {
|
|
state.value = JSON.parse(await invoke("fetch_state"));
|
|
} catch (e) {
|
|
console.error("failed to parse state", e);
|
|
}
|
|
});
|
|
|
|
setupHooks();
|
|
initialNavigation(state);
|
|
|
|
useHead({
|
|
title: "Drop",
|
|
});
|
|
</script>
|