feat: update to tauri beta.24 (#1537)

* feat: update to tauri beta.24

* remove .tauri

* pnpm build
This commit is contained in:
Lucas Fernandes Nogueira
2024-07-12 17:59:17 -03:00
committed by GitHub
parent 9973f8ee83
commit 22a17980ff
70 changed files with 1363 additions and 533 deletions
+1 -1
View File
@@ -24,6 +24,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.14"
"@tauri-apps/api": "2.0.0-beta.15"
}
}
+4 -4
View File
@@ -65,7 +65,7 @@ async fn download(
url: &str,
file_path: &str,
headers: HashMap<String, String>,
on_progress: Channel,
on_progress: Channel<ProgressPayload>,
) -> Result<()> {
let client = reqwest::Client::new();
@@ -84,7 +84,7 @@ async fn download(
while let Some(chunk) = stream.try_next().await? {
file.write_all(&chunk).await?;
let _ = on_progress.send(&ProgressPayload {
let _ = on_progress.send(ProgressPayload {
progress: chunk.len() as u64,
total,
});
@@ -99,7 +99,7 @@ async fn upload(
url: &str,
file_path: &str,
headers: HashMap<String, String>,
on_progress: Channel,
on_progress: Channel<ProgressPayload>,
) -> Result<String> {
// Read the file
let file = File::open(file_path).await?;
@@ -129,7 +129,7 @@ async fn upload(
}
}
fn file_to_body(channel: Channel, file: File) -> reqwest::Body {
fn file_to_body(channel: Channel<ProgressPayload>, file: File) -> reqwest::Body {
let stream = FramedRead::new(file, BytesCodec::new()).map_ok(|r| r.freeze());
reqwest::Body::wrap_stream(ReadProgressStream::new(