diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..1735f73 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "[BUG]" +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. Arch Linux, Windows] + - App Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d0ff2c..0fc3abe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: build-linux: stage: build - image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/rust:1.81.0-bookworm + image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/rustlang/rust:nightly script: - apt-get update -y - apt-get install yarnpkg libsoup-3.0-0 libsoup-3.0-dev libatk-adaptor libgtk-3-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev -y @@ -13,9 +13,10 @@ build-linux: - yarnpkg tauri build - cp src-tauri/target/release/bundle/deb/*.deb . - cp src-tauri/target/release/bundle/rpm/*.rpm . + - cp src-tauri/target/release/bundle/appimage/*.AppImage . artifacts: paths: - - "*.{deb,rpm}" + - "*.{deb,rpm,AppImage}" build-windows: stage: build diff --git a/README.md b/README.md index b0df333..903f4ca 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,19 @@ Drop app is the companion app for [Drop](https://github.com/Drop-OSS/drop). It uses a Tauri base with Nuxt 3 + TailwindCSS on top of it, so we can re-use components from the web UI. +## Running +Before setting up the drop app, be sure that you have a server set up. +The instructions for this can be found on the [Drop Wiki](https://wiki.droposs.org/guides/quickstart.html) + +## Current features +Currently supported are the following features: +- Signin (with custom server) +- Database registering & recovery +- Dynamic library fetching from server +- Installing & uninstalling games +- Download progress monitoring +- Launching / playing games + ## Development Install dependencies with `yarn` @@ -10,7 +23,7 @@ Run the app in development with `yarn tauri dev`. NVIDIA users on Linux, use she To manually specify the logging level, add the environment variable `RUST_LOG=[debug, info, warn, error]` to `yarn tauri dev`: -e.g. `RUST_LOG=debug yarn taudi dev` +e.g. `RUST_LOG=debug yarn tauri dev` ## Contributing Check the original [Drop repo](https://github.com/Drop-OSS/drop/blob/main/CONTRIBUTING.md) for contributing guidelines. \ No newline at end of file diff --git a/app.vue b/app.vue index f81c432..b9011c6 100644 --- a/app.vue +++ b/app.vue @@ -1,8 +1,8 @@ diff --git a/composables/downloads.ts b/composables/downloads.ts index 860a8c3..d75c46f 100644 --- a/composables/downloads.ts +++ b/composables/downloads.ts @@ -1,7 +1,14 @@ import { listen } from "@tauri-apps/api/event"; +import type { DownloadableMetadata } from "~/types"; export type QueueState = { - queue: Array<{ id: string; status: string; progress: number | null }>; + queue: Array<{ + meta: DownloadableMetadata; + status: string; + progress: number | null; + current: number; + max: number; + }>; status: string; }; diff --git a/composables/game.ts b/composables/game.ts index 7f28435..0335a7a 100644 --- a/composables/game.ts +++ b/composables/game.ts @@ -12,7 +12,8 @@ export type SerializedGameStatus = [ OptionGameStatus | null ]; -const parseStatus = (status: SerializedGameStatus): GameStatus => { +export const parseStatus = (status: SerializedGameStatus): GameStatus => { + console.log(status); if (status[0]) { return { type: status[0].type, @@ -28,28 +29,29 @@ const parseStatus = (status: SerializedGameStatus): GameStatus => { } }; -export const useGame = async (id: string) => { - if (!gameRegistry[id]) { +export const useGame = async (gameId: string) => { + if (!gameRegistry[gameId]) { const data: { game: Game; status: SerializedGameStatus } = await invoke( "fetch_game", { - id, + gameId, } ); - gameRegistry[id] = data.game; - if (!gameStatusRegistry[id]) { - gameStatusRegistry[id] = ref(parseStatus(data.status)); + gameRegistry[gameId] = data.game; + if (!gameStatusRegistry[gameId]) { + gameStatusRegistry[gameId] = ref(parseStatus(data.status)); - listen(`update_game/${id}`, (event) => { + listen(`update_game/${gameId}`, (event) => { const payload: { status: SerializedGameStatus; } = event.payload as any; - gameStatusRegistry[id].value = parseStatus(payload.status); + console.log(payload.status); + gameStatusRegistry[gameId].value = parseStatus(payload.status); }); } } - const game = gameRegistry[id]; - const status = gameStatusRegistry[id]; + const game = gameRegistry[gameId]; + const status = gameStatusRegistry[gameId]; return { game, status }; -}; +}; \ No newline at end of file diff --git a/composables/generateGameMeta.ts b/composables/generateGameMeta.ts new file mode 100644 index 0000000..fdfc4b7 --- /dev/null +++ b/composables/generateGameMeta.ts @@ -0,0 +1,9 @@ +import { type DownloadableMetadata, DownloadableType } from '~/types' + +export default function generateGameMeta(gameId: string, version: string): DownloadableMetadata { + return { + id: gameId, + version, + downloadType: DownloadableType.Game + } +} \ No newline at end of file diff --git a/composables/state-navigation.ts b/composables/state-navigation.ts index f7a9b4b..46d9e2b 100644 --- a/composables/state-navigation.ts +++ b/composables/state-navigation.ts @@ -48,9 +48,7 @@ export function initialNavigation(state: Ref) { switch (state.value.status) { case AppStatus.NotConfigured: - router.push({ path: "/setup" }).then(() => { - console.log("Pushed Setup"); - }); + router.push({ path: "/setup" }); break; case AppStatus.SignedOut: router.push("/auth"); diff --git a/layouts/default.vue b/layouts/default.vue index 89dd49b..025a7cf 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -1,7 +1,7 @@