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
@@ -23,6 +23,6 @@
"LICENSE"
],
"dependencies": {
"@tauri-apps/api": "2.0.0-beta.14"
"@tauri-apps/api": "2.0.0-beta.15"
}
}
+5 -5
View File
@@ -10,7 +10,7 @@ use tauri::{ipc::Channel, Manager, Resource, ResourceId, Runtime, Webview};
use std::time::Duration;
use url::Url;
#[derive(Debug, Serialize)]
#[derive(Debug, Clone, Serialize)]
#[serde(tag = "event", content = "data")]
pub enum DownloadEvent {
#[serde(rename_all = "camelCase")]
@@ -82,7 +82,7 @@ pub(crate) async fn check<R: Runtime>(
pub(crate) async fn download<R: Runtime>(
webview: Webview<R>,
rid: ResourceId,
on_event: Channel,
on_event: Channel<DownloadEvent>,
) -> Result<ResourceId> {
let update = webview.resources_table().get::<Update>(rid)?;
let mut first_chunk = true;
@@ -96,7 +96,7 @@ pub(crate) async fn download<R: Runtime>(
let _ = on_event.send(DownloadEvent::Progress { chunk_length });
},
|| {
let _ = on_event.send(&DownloadEvent::Finished);
let _ = on_event.send(DownloadEvent::Finished);
},
)
.await?;
@@ -122,7 +122,7 @@ pub(crate) async fn install<R: Runtime>(
pub(crate) async fn download_and_install<R: Runtime>(
webview: Webview<R>,
rid: ResourceId,
on_event: Channel,
on_event: Channel<DownloadEvent>,
) -> Result<()> {
let update = webview.resources_table().get::<Update>(rid)?;
@@ -138,7 +138,7 @@ pub(crate) async fn download_and_install<R: Runtime>(
let _ = on_event.send(DownloadEvent::Progress { chunk_length });
},
|| {
let _ = on_event.send(&DownloadEvent::Finished);
let _ = on_event.send(DownloadEvent::Finished);
},
)
.await?;