Compare commits

...

7 Commits

Author SHA1 Message Date
2874b9776b fix: Accidentally moved request when setting the header
Signed-off-by: quexeky <git@quexeky.dev>
2025-06-25 09:17:06 +10:00
afcd4e916f chore: bump version to 0.3.0-rc-4 2025-06-25 09:05:08 +10:00
885fa42ecc fix: Move Authorization header generation to download_game_chunk()
Signed-off-by: quexeky <git@quexeky.dev>
2025-06-25 06:53:42 +10:00
6d295bd47f fix: Broken README path
Signed-off-by: quexeky <git@quexeky.dev>
2025-06-07 06:37:14 +10:00
c3ee09af85 fix: Update broken README link in docs
Signed-off-by: quexeky <git@quexeky.dev>
2025-06-07 06:35:57 +10:00
0ce55e12c5 fix: Re-update the user and app status when recieve_handshake is called (#54)
Also enabled assetProtocol for better caching in general

Signed-off-by: quexeky <git@quexeky.dev>
2025-06-06 12:09:44 +10:00
86bce1c68d Release: v0.3.0-rc-3 (#51) 2025-06-06 09:25:44 +10:00
9 changed files with 41 additions and 13 deletions

View File

@ -4,7 +4,7 @@ Drop app is the companion app for [Drop](https://github.com/Drop-OSS/drop). It u
## 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)
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:

View File

@ -1,9 +1,11 @@
import { invoke } from "@tauri-apps/api/core";
import { listen } from "@tauri-apps/api/event";
import { data } from "autoprefixer";
import { AppStatus, type AppState } from "~/types";
export function setupHooks() {
const router = useRouter();
const state = useAppState();
listen("auth/processing", (event) => {
router.push("/auth/processing");
@ -15,8 +17,9 @@ export function setupHooks() {
);
});
listen("auth/finished", (event) => {
listen("auth/finished", async (event) => {
router.push("/store");
state.value = JSON.parse(await invoke("fetch_state"));
});
listen("download_error", (event) => {

View File

@ -1,7 +1,7 @@
{
"name": "drop-app",
"private": true,
"version": "0.3.0-rc-2",
"version": "0.3.0-rc-4",
"type": "module",
"scripts": {
"build": "nuxt build",

9
src-tauri/Cargo.lock generated
View File

@ -1247,7 +1247,7 @@ dependencies = [
[[package]]
name = "drop-app"
version = "0.3.0-rc-2"
version = "0.3.0-rc-4"
dependencies = [
"atomic-instant-full",
"boxcar",
@ -2212,6 +2212,12 @@ dependencies = [
"serde",
]
[[package]]
name = "http-range"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
[[package]]
name = "http-serde"
version = "1.1.3"
@ -5247,6 +5253,7 @@ dependencies = [
"gtk",
"heck 0.5.0",
"http 1.3.1",
"http-range",
"jni",
"libc",
"log",

View File

@ -1,6 +1,6 @@
[package]
name = "drop-app"
version = "0.3.0-rc-2"
version = "0.3.0-rc-4"
description = "The client application for the open-source, self-hosted game distribution platform Drop"
authors = ["Drop OSS"]
edition = "2021"
@ -75,7 +75,7 @@ features = ["curly"]
[dependencies.tauri]
version = "2.1.1"
features = ["tray-icon"]
features = ["protocol-asset", "tray-icon"]
[dependencies.tokio]
version = "1.40.0"

View File

@ -274,7 +274,7 @@ impl GameDownloadAgent {
("name", &context.file_name),
("chunk", &context.index.to_string()),
],
|r| r.header("Authorization", generate_authorization_header()),
|r| { r },
) {
Ok(request) => request,
Err(e) => {

View File

@ -1,8 +1,11 @@
use crate::download_manager::util::download_thread_control_flag::{DownloadThreadControl, DownloadThreadControlFlag};
use crate::download_manager::util::download_thread_control_flag::{
DownloadThreadControl, DownloadThreadControlFlag,
};
use crate::download_manager::util::progress_object::ProgressHandle;
use crate::error::application_download_error::ApplicationDownloadError;
use crate::error::remote_access_error::RemoteAccessError;
use crate::games::downloads::manifest::DropDownloadContext;
use crate::remote::auth::generate_authorization_header;
use log::warn;
use md5::{Context, Digest};
use reqwest::blocking::{RequestBuilder, Response};
@ -124,6 +127,7 @@ pub fn download_game_chunk(
progress.set(0);
return Ok(false);
}
let request = request.header("Authorization", generate_authorization_header());
let response = request
.send()

View File

@ -1,11 +1,11 @@
use std::{collections::HashMap, env};
use std::{collections::HashMap, env, sync::Mutex};
use chrono::Utc;
use droplet_rs::ssl::sign_nonce;
use gethostname::gethostname;
use log::{debug, error, warn};
use serde::{Deserialize, Serialize};
use tauri::{AppHandle, Emitter};
use tauri::{AppHandle, Emitter, Manager};
use url::Url;
use crate::{
@ -14,7 +14,7 @@ use crate::{
models::data::DatabaseAuth,
},
error::{drop_server_error::DropServerError, remote_access_error::RemoteAccessError},
AppStatus, User,
AppState, AppStatus, User,
};
use super::{
@ -157,6 +157,16 @@ pub fn recieve_handshake(app: AppHandle, path: String) {
return;
}
let app_state = app.state::<Mutex<AppState>>();
let mut state_lock = app_state.lock().unwrap();
let (app_status, user) = setup();
state_lock.status = app_status;
state_lock.user = user;
drop(state_lock);
app.emit("auth/finished", ()).unwrap();
}

View File

@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2.0.0",
"productName": "Drop Desktop Client",
"version": "0.3.0-rc-2",
"version": "0.3.0-rc-4",
"identifier": "dev.drop.app",
"build": {
"beforeDevCommand": "yarn dev --port 1432",
@ -11,7 +11,11 @@
},
"app": {
"security": {
"csp": null
"csp": null,
"assetProtocol": {
"enable": true,
"scope": {}
}
}
},
"plugins": {