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/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..0db08a0 --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,23 @@ +on: push +name: Clippy check +jobs: + clippy_check: + runs-on: ubuntu-24.04 + permissions: + checks: write + steps: + - uses: actions/checkout@v1 + - name: install dependencies (ubuntu only) + run: | + sudo apt-get update + sudo apt-get install -y libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev + + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: clippy + override: true + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --manifest-path ./src-tauri/Cargo.toml \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..34d41f8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,104 @@ +name: 'publish' + +on: + workflow_dispatch: {} + release: + types: [published] + # This can be used to automatically publish nightlies at UTC nighttime +# schedule: +# - cron: "0 2 * * *" # run at 2 AM UTC + +# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release. + +jobs: + publish-tauri: + permissions: + contents: write + strategy: + fail-fast: false + matrix: + include: + - platform: 'macos-latest' # for Arm based macs (M1 and above). + args: '--target aarch64-apple-darwin' + - platform: 'macos-latest' # for Intel based macs. + args: '--target x86_64-apple-darwin' + - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. + args: '' + - platform: 'ubuntu-22.04-arm' + args: '--target aarch64-unknown-linux-gnu' + - platform: 'windows-latest' + args: '' + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + with: + submodules: true + token: ${{ secrets.GITHUB_TOKEN }} + + - name: setup node + uses: actions/setup-node@v4 + with: + node-version: lts/* + + - name: install Rust nightly + uses: dtolnay/rust-toolchain@nightly + with: + # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. + targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-22.04' || matrix.platform == 'ubuntu-22.04-arm' # This must match the platform value defined above. + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils + # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. + + + - name: Import Apple Developer Certificate + if: matrix.platform == 'macos-latest' + env: + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} + run: | + echo $APPLE_CERTIFICATE | base64 --decode > certificate.p12 + security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain + security set-keychain-settings -t 3600 -u build.keychain + + curl https://droposs.org/drop.crt --output drop.pem + sudo security authorizationdb write com.apple.trust-settings.user allow + security add-trusted-cert -r trustRoot -k build.keychain -p codeSign -u -1 drop.pem + sudo security authorizationdb remove com.apple.trust-settings.user + + security import certificate.p12 -k build.keychain -P "$APPLE_CERTIFICATE_PASSWORD" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain + security find-identity -v -p codesigning build.keychain + + - name: Verify Certificate + if: matrix.platform == 'macos-latest' + run: | + CERT_INFO=$(security find-identity -v -p codesigning build.keychain | grep "Drop OSS") + CERT_ID=$(echo "$CERT_INFO" | awk -F'"' '{print $2}') + echo "CERT_ID=$CERT_ID" >> $GITHUB_ENV + echo "Certificate imported. Using identity: $CERT_ID" + + - name: install frontend dependencies + run: yarn install # change this to npm, pnpm or bun depending on which one you use. + + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + APPLE_SIGNING_IDENTITY: ${{ env.CERT_ID }} + NO_STRIP: true + with: + tagName: v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. + releaseName: 'Auto-release v__VERSION__' + releaseBody: 'See the assets to download this version and install. This release was created automatically.' + releaseDraft: false + prerelease: true + args: ${{ matrix.args }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5767a3f..c60be72 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,7 @@ dist-ssr .output src-tauri/flamegraph.svg -src-tauri/perf* \ No newline at end of file +src-tauri/perf* + +/*.AppImage +/squashfs-root \ No newline at end of file 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/.gitmodules b/.gitmodules new file mode 100644 index 0000000..df4511d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "src-tauri/tailscale/libtailscale"] + path = src-tauri/tailscale/libtailscale + url = https://github.com/tailscale/libtailscale.git +[submodule "libs/drop-base"] + path = libs/drop-base + url = https://github.com/drop-oss/drop-base.git diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..4099407 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +23 diff --git a/README.md b/README.md index b0df333..f66cea8 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 Docs](https://docs.droposs.org/docs/guides/quickstart) + +## 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/build.mjs b/build.mjs new file mode 100644 index 0000000..c4846f1 --- /dev/null +++ b/build.mjs @@ -0,0 +1,48 @@ +import fs from "fs"; +import process from "process"; +import childProcess from "child_process"; +import createLogger from "pino"; + +const OUTPUT = "./.output"; +const logger = createLogger({ transport: { target: "pino-pretty" } }); + +async function spawn(exec, opts) { + const output = childProcess.spawn(exec, { ...opts, shell: true }); + output.stdout.on("data", (data) => { + process.stdout.write(data); + }); + output.stderr.on("data", (data) => { + process.stderr.write(data); + }); + + return await new Promise((resolve, reject) => { + output.on("error", (err) => reject(err)); + output.on("exit", () => resolve()); + }); +} + +const views = fs.readdirSync(".").filter((view) => { + const expectedPath = `./${view}/package.json`; + return fs.existsSync(expectedPath); +}); + +fs.mkdirSync(OUTPUT, { recursive: true }); + +for (const view of views) { + const loggerChild = logger.child({}); + process.chdir(`./${view}`); + + loggerChild.info(`Install deps for "${view}"`); + await spawn("yarn"); + + loggerChild.info(`Building "${view}"`); + await spawn("yarn build", { + env: { ...process.env, NUXT_APP_BASE_URL: `/${view}/` }, + }); + + process.chdir(".."); + + fs.cpSync(`./${view}/.output/public`, `${OUTPUT}/${view}`, { + recursive: true, + }); +} \ No newline at end of file diff --git a/changelog.md b/changelog.md index 97a80bb..691c460 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,292 @@ +## Release 0.2.0-beta + +### Fixes +- Re-enabled killing games #005bab2 +- fixed queue manipulation and waiting for downloads #01260f0 +- fix logic error in detecting dir #04368ff +- absolute executable invoke #17759c4 +- don't crash download manager if multiple errors come in #21204de +- clear stale data before requesting new #327628b +- fixed completed indexes #39f2ebd +- add file & line to console logs #4d8eadc +- Games not launching due to string semantics #4ef49cc +- Added error handling for chunk request errors #4fc0855 +- Chunk counting logic error #5ba151f +- modal stack doesn't cover whole app #5db9ae5 +- use set_file_name instead of pushing to strings #60d0a48 +- use of completed signal, and pause/resuming #64d7f64 +- add message about nonce expiration #6a8d0af +- Added "LIbrary Failed to Update" content to recover from library load fail #76bae3d +- Restored RUST_LOG env functionality #7a0cf4f +- initialise doesn't recreate default install dir #7a3841b +- update routes for new server #7ab53f3 +- use vendored flag #7c8089e +- fix poorly designed parsing for executables with spaces #7c90d2b +- assorted fixes #89ea34c +- Added Settings component #8aad64f +- windows build #8d9234f +- fix ugly scrollbars on edge webview #95f2174 +- windows shadow #9a8cc59 +- add better error message #9af0d08 +- Broken command invoke logic in settings/downloads.vue #9e29aa7 +- Accidentally was attempting to lock onto something that was already in scope #9e82a0b +- fix incorrect error assumptions & update types #a17311a +- Re-enabled uninstalling apps #a56ee25 +- types #af056c0 +- fix other metadata endpoints #c2f54c1 +- Re-enabled deep links #c3f6222 +- added console as an appender #d12bf15 +- remove unnecessary unstable feature #d5ac1b0 +- fix install button #d7b0302 +- stop loading on error #d83aae6 +- use unix timestamp to avoid invalid characters in filename #dafce24 +- Renamed game_id to id #dceaa56 +- use chrono library to generate timestamps #e22e6d8 +- clear stale data before requesting new #e72662c +- fix scrollbars on edge webview #f09605a +- update readme instructions #f0c47d8 +- Adding usize to completed_contexts_lock instead of &usize #f508186 + + +### Features +- Game kill tauri command #01e6162 +- add debug page #02f8591 +- Add signout functionality (#16) #0a0d9d6 +- queue and library UIs #0a20139 +- add note about more install dirs #139bc0c +- Using SerializeDisplay for better error management with Result #170fde5 +- add pre-launch log to file #17f8d76 +- Added option to change root directory #1aa52c0 +- add speed and time remaining information #1f899ec +- lockless tracking of downloaded chunks #2183585 +- quit button #239b8d5 +- use shift or DEBUG RUST_LOG to show Debug Info #245a84d +- Added database corruption dialog #25ba200 +- only allow downloads for supported platforms #269dcbb +- add installed ui in the library menu #2c8164e +- added file-based logging #2d4a7e8 +- automatically fetch remote data if not available #2dedfbb +- Added database recovery #32ae7d5 +- ability to add more download dirs #384f7a5 +- re-enable checksums #3ca87fc +- background processes and close/open menu #3d60fd5 +- launch games with log files #3f71149 +- Download cancelling #450bca9 +- refactoring and error message #469a2d6 +- Added UI to change download threads #4e93eb4 +- Made save button include user feedback & only allow numeric characters #53234d2 +- download widget and queue fix #532d13e +- Pausing and resuming game downloads #55b7921 +- Allow settings to update UI using fetch_settings command #5bb04da +- temporary queue ui and flamegraph instructions #5cbeb3b +- Added DownloadThreadControl struct #5e05e68 +- Added max_download_threads setting and separated settings from db #5ea47d7 +- Added generic download manager #6159319 +- Added AgentInterfaceData to get information about all downloads in queue #63c3cc1 +- debug queue interface #671d45f +- reduce scope of download agent #6a38ea3 +- Added multi-argument game launch and setup support #6ad3837 +- shared child with stop command #6b96e40 +- Added function to take and set any game state #6bc6482 +- Added line numbers to file logging and highlighting to console #7c3140e +- Separated chunk updates into individual counters #7d3c601 +- Ensure that any database issues are resolved by standalone functions #7d4651d +- ui to install games #8670bca +- Implemented spawning with umu (using umu-wrapper-lib) #88b2505 +- offer manual signin #949acfc +- better process management, including running state #a135b13 +- Added Download Manager #a1ada07 +- retry connnection on server unavailable #a53d838 +- finish download dir CRUD interface #a580a46 +- better download manager errors + modal #ad92dbe +- syncs state to disk to persist across reboots #b556842 +- prevent default context menu and emit event on elements #c560656 +- initial creation and logo update #d9a51cf +- Added manifest.json utility for persistent download progress #d9d0122 +- game uninstalling & partial compat #dd7f567 +- combined db and download interface improvements #de52dac +- update db state with ui and emit events #e4df4eb +- Generic function to set download state #f10d92d +- Convert DownloadThreadControlFlag to AtomicBool #f25bfed +- add note about more install dirs #f4ac1c8 +- Added rolling progress window #fd30b3e + + +### Other Changes +- quexeky +- Convert DATA_ROOT_DIR to Mutex #00b7179 +- Converting DB access to a trait #01b092c +- Updated changelog #022330b +- Progress on cleanup and exit #0381b8b +- library ui #03fa364 +- Scoping changes and removing qualifications #046ba64 +- Moved all files relevant to game downloads to their own directory #06d1e9e +- SLowly integrating game_download into the FE. Started with using the manifest minimal example in the server (#1) #07379b2 +- Ran cargo clippy & moved DownloadManagerInterface #075d6ec +- Made logging systems match #0a1dddf +- Some easy cleanup of the download manager #0a2ac25 +- client now fetches user information from Drop server #0c0cfeb +- Included in AppStatus (Also trying to link to Issue #1) +- Accidentally serialized AppStatus and broke everything :/ #10791ed +- Removed debugging statements #10c8344 +- Wrappers are the bane of my existence. Also here's the download cancelling logic. #13df631 +- Merge branch 'error-handling' #1520471 +- Updated README.md #165a967 +- Removed unnecessary dependencies #1724449 +- merge(download-manager) -> 'main' #172d6b0 +- More refactoring and renaming camelCase struct definitions to snake_case #1742793 +- General cleanup #182361e +- Delete pages/library.vue #1861659 +- progress on more precise download control #18b9149 +- Allowing some dead code features because they are there for future use (potentially) #191e62c +- Ensure that Downloadable is also send and sync #1a89135 +- I think that download queuing is working #1ab61c8 +- auth initiate, database and more #22b1aee +- Update .gitlab-ci.yml" #2307704 +- More fleshing out on how specifically game downloads will work (#1) #23137dd +- Removed utils.rs #270bc8b +- Fixing some references to "id" vs "game_id" #27e5a8e +- More cleanup after cargo clippy #2822b7a +- Updated contributing link #2aa5b9c +- More fleshing out on how specifically game downloads will work #2b90de9 +- Cleaning up downloads playing and pausing #2c7b5fb +- fixed multi-chunk downloads #2ec351f +- Clippy refactoring #2efe304 +- remove unpacker mod statement #32067c0 +- Progress on adding tools #3299c71 +- Fixed bug with bad initial loading into store instead of auth #3923acf +- add nvm rc #3ccd444 +- partial download manager #3dbf5ab +- Update .gitlab-ci.yml with artifacts #3e10f17 +- Removed tools/ #3eda979 +- Downloads should be fixed now #403ca65 +- transient vs synced state now defined #42c0198 +- added adenmgb's autostart feature #472eb1d +- better download defaults #4779383 +- Progress on downloads. Currently working on parsing functions to be run asynchronously #496c6a5 +- Ran cargo clippy & cargo fmt #4983b25 +- handshakes #4bb33c8 +- Convert DOWNLOAD_MAX_THREADS to const #4fc13a1 +- Merge branch 'downloads' #50ed841 +- Moved generateGameMeta.ts to composables, using PathBuf instead of String for install_dirs #50f37fd +- Added time debugging and fixed logging formatting #5243694 +- Clippy changes #553bc37 +- Queue is running game downloads sequentially now #5564d23 +- migrate to new droplet ca system #556898f +- Add LICENSE #57a5737 +- ran cargo clippy & cargo fmt #5e3d26b +- my own take on some BASED design decisions #5ed0833 +- cleanup and game UI beginnings #5ef6b8e +- Progress on terminator #5f5cbd0 +- Implement better error system and segregate errors and commands (#23) #604d5b5 +- moved to completed index arr to help serialization #64ebc19 +- Ran cargo clippy & cargo fmt #653717e +- Removed all references to anything outside of the DownloadManager #6568faa +- Merge remote-tracking branch 'origin/main' #68ca4a7 +- swap file name and to binary encoding #694f2fd +- chore(polish & cleanup) #6cc0c67 +- Update .gitlab-ci.yml #6d7630e +- Moved some variable declarations outside of the spawned download thread #6ea4cf2 +- Encoding game IDs and versions #6ef444e +- restructing and renaming #7049673 +- Converted to md5 #706f525 +- Merge branch 'main' into downloads #714b968 +- Semantic naming changes #725f16b +- Abstracted queue system #76b0975 +- Moved manifest and stored_manifest to download_manager" #78149bb +- README update #78fc668 +- Ensured everything is serializing/deserializing to camelCase #7a95b7f +- fixed some of quexeky's BASED design decisions #7e3da04 +- Progress checker works #7fec00d +- Progress on refactoring and abiding by cargo clippy #816b427 +- Added GAME_PAUSE_CHECK_INTERVAL value #8204795 +- Ran cargo clippy & fmt #82804eb +- update metadata #85a0899 +- Renamed most instances of "game" outside of actual game downloads #881fcc6 +- Debugging & starting work on parsing manifest #89d2814 +- slight ui/ux fixes and updates to auth protocol #8a2d23d +- Removed Arc requirement for DownloadableMetadata #8be1dd4 +- compliant with new APIs #8f6f184 +- Ran cargo clippy & cargo fmt #9272970 +- Added rolling_progress_updates.rs #9369ff1 +- Add files via upload #93b8b83 +- More refining info!() statements #94cf678 +- fixed windows issues #959dad3 +- Starting p2p progress #97bb1fa +- Game downloads from the client are working (multithreaded) by parsing in gameID, GameVersion, and maxThreads from FE (#1) #984472e +- Version bump & appimage build #9897698 +- Some progress on thread terminations #99beca4 +- rename files to what they contain #99c8b39 +- Created separate function to generate requests #9a184a8 +- cleanup of lib and toml #9b1cfa7 +- refactor for generic way to implement cross platform launchers #9ea2aa4 +- Updated logging format #a213765 +- fix(windows build) #a24cc8a +- Added ToolDownloadAgent #a2e63aa +- copy direct to disk #a628fc1 +- Moved manifest and stored_manifest to download_manager #a846eed +- adds nvm rc! #a881d8e +- Reordered DownloadThreadControlFlag to agree with From #ab606e8 +- ci/cd and patches for windows builds #ac1c3b6 +- patch for not draggable windows during setup #ac66b20 +- another stage of client authentication #ae4c65b +- Renamed GameDonwloadError to ApplicationDownloadError and moved #aed58e4 +- Progress on write speeds & added debug statements #b065e10 +- Updated logging #b3963b6 +- Created file settings.rs #b47b7ea +- Added Downloadable trait and replaced references to GameDownloadAgent #b4d70a3 +- Update .gitlab-ci.yml #b6a54c0 +- Moved download manager to separate directory #b6c64e5 +- Ran cargo fmt #b8cf44c +- Imported appropriate logging macros #b99ff67 +- Merge branch 'main' into download-manager #bb60942 +- Ran cargo clippy & cargo fmt #bd3deac +- beginnings of game state management #bf46dec +- Update Cargo.toml #c1fb39e +- migrated unpacking to rust zstd to conform with droplet #c46c54b +- More progress on checksums #c51e761 +- Delete pages/library.vue #c722a54 +- Merge branch 'downloads' (again) #c748aec +- migrate to nuxt and groundwork #c957744 +- More debugging because apparently checksums are the bane of my existence. But it works and I was just an idiot #c9d9d2e +- Fully separate & generic download manager #cac612b +- Progress on rolling progress window #cf19477 +- Ensured that all logs start with lowercase capital and have no trailing punctuation #cfc9d13 +- Validated that loading data works #d21b1d2 +- Mostly finished with checksums. Just merging main in at the same time #d39e7cb +- Ran cargo clippy #dcb1564 +- Add files via upload #dcb2c0f +- Theoretically adding queue support and optimistic manifest downloading (#1). Needs tests when actual functions are implemented #dcd8fa8 +- Merge remote-tracking branch 'origin/downloads' into downloads #dd23ca8 +- Debugging line #ddc585d +- Re-enabled closing the window and some more renaming #defba51 +- drop no longer freaks out if server is unavailable on startup #df88395 +- Apply stashed changes #e0ea8c9 +- Merge remote-tracking branch 'origin/downloads' into downloads #e4e605b +- convert to more sensible permission schema #e504c00 +- Update on GameDownload #e71e4cf +- reorganisation, cleanup and new nonce protocol #e828bca +- rustix fs feature #e9805a8 +- Added manage_go_signal command #ea70ec9 +- Drop will no longer crash when the server goes down #eb3311a +- Made all errors type-based #ec2f414 +- Added description on how the DownloadManager works #f029cbf +- Using more appropriate logging statements #f183a9d +- remove unnecessary compat code (#20) #f1c8bbf +- Manifests are now being parsed successfully #f28c880 +- Removed tests/ #f29e989 +- I think that downloads are working. Need to test and set decent file locations now #f388237 +- Just debugging tauri's damn Sync command features #f60ca2b +- fixes and patches for merged changes #f6476bc +- Added manage_queue_signal #f64782e +- initial commit #f6cd7c3 +- Update .gitlab-ci.yml #fc6bab9 + + +_changelog generated by_ [go-conventional-commits](https://github.com/joselitofilho/go-conventional-commits) + ## Release 0.1.0-beta ### Fixes diff --git a/components/GameStatusButton.vue b/components/GameStatusButton.vue deleted file mode 100644 index 65f3c7a..0000000 --- a/components/GameStatusButton.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - diff --git a/components/HeaderButton.vue b/components/HeaderButton.vue deleted file mode 100644 index bbe809d..0000000 --- a/components/HeaderButton.vue +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/composables/app-state.ts b/composables/app-state.ts deleted file mode 100644 index 2781bd2..0000000 --- a/composables/app-state.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AppState } from "~/types"; - -export const useAppState = () => useState("state"); \ No newline at end of file diff --git a/composables/game.ts b/composables/game.ts deleted file mode 100644 index 7f28435..0000000 --- a/composables/game.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { invoke } from "@tauri-apps/api/core"; -import { listen } from "@tauri-apps/api/event"; -import type { Game, GameStatus, GameStatusEnum } from "~/types"; - -const gameRegistry: { [key: string]: Game } = {}; - -const gameStatusRegistry: { [key: string]: Ref } = {}; - -type OptionGameStatus = { [key in GameStatusEnum]: { version_name?: string } }; -export type SerializedGameStatus = [ - { type: GameStatusEnum }, - OptionGameStatus | null -]; - -const parseStatus = (status: SerializedGameStatus): GameStatus => { - if (status[0]) { - return { - type: status[0].type, - }; - } else if (status[1]) { - const [[gameStatus, options]] = Object.entries(status[1]); - return { - type: gameStatus as GameStatusEnum, - ...options, - }; - } else { - throw new Error("No game status"); - } -}; - -export const useGame = async (id: string) => { - if (!gameRegistry[id]) { - const data: { game: Game; status: SerializedGameStatus } = await invoke( - "fetch_game", - { - id, - } - ); - gameRegistry[id] = data.game; - if (!gameStatusRegistry[id]) { - gameStatusRegistry[id] = ref(parseStatus(data.status)); - - listen(`update_game/${id}`, (event) => { - const payload: { - status: SerializedGameStatus; - } = event.payload as any; - gameStatusRegistry[id].value = parseStatus(payload.status); - }); - } - } - - const game = gameRegistry[id]; - const status = gameStatusRegistry[id]; - return { game, status }; -}; diff --git a/layouts/default.vue b/layouts/default.vue deleted file mode 100644 index 89dd49b..0000000 --- a/layouts/default.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/layouts/mini.vue b/layouts/mini.vue deleted file mode 100644 index f34253b..0000000 --- a/layouts/mini.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/libs/drop-base b/libs/drop-base new file mode 160000 index 0000000..04125e8 --- /dev/null +++ b/libs/drop-base @@ -0,0 +1 @@ +Subproject commit 04125e89bef517411e103cdabcfa64a1bb563423 diff --git a/app.vue b/main/app.vue similarity index 53% rename from app.vue rename to main/app.vue index f81c432..7d4165f 100644 --- a/app.vue +++ b/main/app.vue @@ -1,16 +1,15 @@ diff --git a/main/components/GameOptionsModal.vue b/main/components/GameOptionsModal.vue new file mode 100644 index 0000000..19ff39a --- /dev/null +++ b/main/components/GameOptionsModal.vue @@ -0,0 +1,122 @@ + + + diff --git a/main/components/GameStatusButton.vue b/main/components/GameStatusButton.vue new file mode 100644 index 0000000..1dea40b --- /dev/null +++ b/main/components/GameStatusButton.vue @@ -0,0 +1,183 @@ + + + diff --git a/components/Header.vue b/main/components/Header.vue similarity index 85% rename from components/Header.vue rename to main/components/Header.vue index 75537eb..160b9ae 100644 --- a/components/Header.vue +++ b/main/components/Header.vue @@ -11,7 +11,7 @@ v-for="(nav, navIdx) in navigation" :class="[ 'transition uppercase font-display font-semibold text-md', - navIdx === currentPageIndex + navIdx === currentNavigation ? 'text-zinc-100' : 'text-zinc-400 hover:text-zinc-200', ]" @@ -28,9 +28,7 @@ />
    - +
  1. +
- + diff --git a/components/HeaderWidget.vue b/main/components/HeaderWidget.vue similarity index 100% rename from components/HeaderWidget.vue rename to main/components/HeaderWidget.vue diff --git a/components/InitiateAuthModule.vue b/main/components/InitiateAuthModule.vue similarity index 63% rename from components/InitiateAuthModule.vue rename to main/components/InitiateAuthModule.vue index 5f7158c..4a1e290 100644 --- a/components/InitiateAuthModule.vue +++ b/main/components/InitiateAuthModule.vue @@ -13,11 +13,7 @@
- + + Use a code → + - +
+ +
+

Having trouble?

+

+ You can manually enter the token from your web browser. +

+
+ + + Submit + +
+
@@ -96,20 +126,46 @@ diff --git a/main/components/LibrarySearch.vue b/main/components/LibrarySearch.vue new file mode 100644 index 0000000..be9129b --- /dev/null +++ b/main/components/LibrarySearch.vue @@ -0,0 +1,198 @@ + + + + + diff --git a/main/components/LoadingIndicator.vue b/main/components/LoadingIndicator.vue new file mode 100644 index 0000000..26b7477 --- /dev/null +++ b/main/components/LoadingIndicator.vue @@ -0,0 +1,7 @@ + + + diff --git a/components/Logo.vue b/main/components/Logo.vue similarity index 100% rename from components/Logo.vue rename to main/components/Logo.vue diff --git a/components/MiniHeader.vue b/main/components/MiniHeader.vue similarity index 84% rename from components/MiniHeader.vue rename to main/components/MiniHeader.vue index 2f6bf01..3a129c8 100644 --- a/components/MiniHeader.vue +++ b/main/components/MiniHeader.vue @@ -1,6 +1,6 @@