mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-19 19:21:17 +10:00
Compare commits
7 Commits
46-bug-com
...
v0.3.0-rc-
| Author | SHA1 | Date | |
|---|---|---|---|
| 2874b9776b | |||
| afcd4e916f | |||
| 885fa42ecc | |||
| 6d295bd47f | |||
| c3ee09af85 | |||
| 0ce55e12c5 | |||
| 86bce1c68d |
@ -4,7 +4,7 @@ Drop app is the companion app for [Drop](https://github.com/Drop-OSS/drop). It u
|
|||||||
|
|
||||||
## Running
|
## Running
|
||||||
Before setting up the drop app, be sure that you have a server set up.
|
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
|
## Current features
|
||||||
Currently supported are the following features:
|
Currently supported are the following features:
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
import { listen } from "@tauri-apps/api/event";
|
import { listen } from "@tauri-apps/api/event";
|
||||||
import { data } from "autoprefixer";
|
import { data } from "autoprefixer";
|
||||||
import { AppStatus, type AppState } from "~/types";
|
import { AppStatus, type AppState } from "~/types";
|
||||||
|
|
||||||
export function setupHooks() {
|
export function setupHooks() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const state = useAppState();
|
||||||
|
|
||||||
listen("auth/processing", (event) => {
|
listen("auth/processing", (event) => {
|
||||||
router.push("/auth/processing");
|
router.push("/auth/processing");
|
||||||
@ -15,8 +17,9 @@ export function setupHooks() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
listen("auth/finished", (event) => {
|
listen("auth/finished", async (event) => {
|
||||||
router.push("/store");
|
router.push("/store");
|
||||||
|
state.value = JSON.parse(await invoke("fetch_state"));
|
||||||
});
|
});
|
||||||
|
|
||||||
listen("download_error", (event) => {
|
listen("download_error", (event) => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "drop-app",
|
"name": "drop-app",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.3.0-rc-2",
|
"version": "0.3.0-rc-4",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nuxt build",
|
"build": "nuxt build",
|
||||||
|
|||||||
9
src-tauri/Cargo.lock
generated
9
src-tauri/Cargo.lock
generated
@ -1247,7 +1247,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "drop-app"
|
name = "drop-app"
|
||||||
version = "0.3.0-rc-2"
|
version = "0.3.0-rc-4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomic-instant-full",
|
"atomic-instant-full",
|
||||||
"boxcar",
|
"boxcar",
|
||||||
@ -2212,6 +2212,12 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "http-range"
|
||||||
|
version = "0.1.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http-serde"
|
name = "http-serde"
|
||||||
version = "1.1.3"
|
version = "1.1.3"
|
||||||
@ -5247,6 +5253,7 @@ dependencies = [
|
|||||||
"gtk",
|
"gtk",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"http 1.3.1",
|
"http 1.3.1",
|
||||||
|
"http-range",
|
||||||
"jni",
|
"jni",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "drop-app"
|
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"
|
description = "The client application for the open-source, self-hosted game distribution platform Drop"
|
||||||
authors = ["Drop OSS"]
|
authors = ["Drop OSS"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@ -75,7 +75,7 @@ features = ["curly"]
|
|||||||
|
|
||||||
[dependencies.tauri]
|
[dependencies.tauri]
|
||||||
version = "2.1.1"
|
version = "2.1.1"
|
||||||
features = ["tray-icon"]
|
features = ["protocol-asset", "tray-icon"]
|
||||||
|
|
||||||
[dependencies.tokio]
|
[dependencies.tokio]
|
||||||
version = "1.40.0"
|
version = "1.40.0"
|
||||||
|
|||||||
@ -274,7 +274,7 @@ impl GameDownloadAgent {
|
|||||||
("name", &context.file_name),
|
("name", &context.file_name),
|
||||||
("chunk", &context.index.to_string()),
|
("chunk", &context.index.to_string()),
|
||||||
],
|
],
|
||||||
|r| r.header("Authorization", generate_authorization_header()),
|
|r| { r },
|
||||||
) {
|
) {
|
||||||
Ok(request) => request,
|
Ok(request) => request,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
|||||||
@ -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::download_manager::util::progress_object::ProgressHandle;
|
||||||
use crate::error::application_download_error::ApplicationDownloadError;
|
use crate::error::application_download_error::ApplicationDownloadError;
|
||||||
use crate::error::remote_access_error::RemoteAccessError;
|
use crate::error::remote_access_error::RemoteAccessError;
|
||||||
use crate::games::downloads::manifest::DropDownloadContext;
|
use crate::games::downloads::manifest::DropDownloadContext;
|
||||||
|
use crate::remote::auth::generate_authorization_header;
|
||||||
use log::warn;
|
use log::warn;
|
||||||
use md5::{Context, Digest};
|
use md5::{Context, Digest};
|
||||||
use reqwest::blocking::{RequestBuilder, Response};
|
use reqwest::blocking::{RequestBuilder, Response};
|
||||||
@ -124,6 +127,7 @@ pub fn download_game_chunk(
|
|||||||
progress.set(0);
|
progress.set(0);
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
let request = request.header("Authorization", generate_authorization_header());
|
||||||
|
|
||||||
let response = request
|
let response = request
|
||||||
.send()
|
.send()
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
use std::{collections::HashMap, env};
|
use std::{collections::HashMap, env, sync::Mutex};
|
||||||
|
|
||||||
use chrono::Utc;
|
use chrono::Utc;
|
||||||
use droplet_rs::ssl::sign_nonce;
|
use droplet_rs::ssl::sign_nonce;
|
||||||
use gethostname::gethostname;
|
use gethostname::gethostname;
|
||||||
use log::{debug, error, warn};
|
use log::{debug, error, warn};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tauri::{AppHandle, Emitter};
|
use tauri::{AppHandle, Emitter, Manager};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -14,7 +14,7 @@ use crate::{
|
|||||||
models::data::DatabaseAuth,
|
models::data::DatabaseAuth,
|
||||||
},
|
},
|
||||||
error::{drop_server_error::DropServerError, remote_access_error::RemoteAccessError},
|
error::{drop_server_error::DropServerError, remote_access_error::RemoteAccessError},
|
||||||
AppStatus, User,
|
AppState, AppStatus, User,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
@ -157,6 +157,16 @@ pub fn recieve_handshake(app: AppHandle, path: String) {
|
|||||||
return;
|
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();
|
app.emit("auth/finished", ()).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2.0.0",
|
"$schema": "https://schema.tauri.app/config/2.0.0",
|
||||||
"productName": "Drop Desktop Client",
|
"productName": "Drop Desktop Client",
|
||||||
"version": "0.3.0-rc-2",
|
"version": "0.3.0-rc-4",
|
||||||
"identifier": "dev.drop.app",
|
"identifier": "dev.drop.app",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "yarn dev --port 1432",
|
"beforeDevCommand": "yarn dev --port 1432",
|
||||||
@ -11,7 +11,11 @@
|
|||||||
},
|
},
|
||||||
"app": {
|
"app": {
|
||||||
"security": {
|
"security": {
|
||||||
"csp": null
|
"csp": null,
|
||||||
|
"assetProtocol": {
|
||||||
|
"enable": true,
|
||||||
|
"scope": {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
|
|||||||
Reference in New Issue
Block a user