mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
feat: update to tauri beta.24 (#1537)
* feat: update to tauri beta.24 * remove .tauri * pnpm build
This commit is contained in:
committed by
GitHub
parent
9973f8ee83
commit
22a17980ff
@@ -24,6 +24,6 @@
|
||||
"LICENSE"
|
||||
],
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "2.0.0-beta.14"
|
||||
"@tauri-apps/api": "2.0.0-beta.15"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ pub fn init<R: Runtime>() -> TauriPlugin<R, Option<config::Config>> {
|
||||
.on_event(|app, event| {
|
||||
if let RunEvent::WindowEvent {
|
||||
label: _,
|
||||
event: WindowEvent::DragDrop(DragDropEvent::Dropped { paths, position: _ }),
|
||||
event: WindowEvent::DragDrop(DragDropEvent::Drop { paths, position: _ }),
|
||||
..
|
||||
} = event
|
||||
{
|
||||
|
||||
@@ -50,29 +50,29 @@ enum WatcherKind {
|
||||
Watcher(RecommendedWatcher),
|
||||
}
|
||||
|
||||
fn watch_raw(on_event: Channel, rx: Receiver<notify::Result<Event>>) {
|
||||
fn watch_raw(on_event: Channel<Event>, rx: Receiver<notify::Result<Event>>) {
|
||||
spawn(move || {
|
||||
while let Ok(event) = rx.recv() {
|
||||
if let Ok(event) = event {
|
||||
// TODO: Should errors be emitted too?
|
||||
let _ = on_event.send(&event);
|
||||
let _ = on_event.send(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
fn watch_debounced(on_event: Channel, rx: Receiver<DebounceEventResult>) {
|
||||
fn watch_debounced(on_event: Channel<Event>, rx: Receiver<DebounceEventResult>) {
|
||||
spawn(move || {
|
||||
while let Ok(Ok(events)) = rx.recv() {
|
||||
for event in events {
|
||||
// TODO: Should errors be emitted too?
|
||||
let _ = on_event.send(&event.event);
|
||||
let _ = on_event.send(event.event);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct WatchOptions {
|
||||
base_dir: Option<BaseDirectory>,
|
||||
@@ -85,7 +85,7 @@ pub async fn watch<R: Runtime>(
|
||||
webview: Webview<R>,
|
||||
paths: Vec<SafePathBuf>,
|
||||
options: WatchOptions,
|
||||
on_event: Channel,
|
||||
on_event: Channel<Event>,
|
||||
global_scope: GlobalScope<Entry>,
|
||||
command_scope: CommandScope<Entry>,
|
||||
) -> CommandResult<ResourceId> {
|
||||
|
||||
Reference in New Issue
Block a user