|
|
|
@ -13,7 +13,7 @@ use rfd::{AsyncFileDialog, AsyncMessageDialog};
|
|
|
|
|
use serde::de::DeserializeOwned;
|
|
|
|
|
use tauri::{plugin::PluginApi, AppHandle, Runtime};
|
|
|
|
|
|
|
|
|
|
use crate::{models::*, FileDialogBuilder, FilePath, MessageDialogBuilder, OK};
|
|
|
|
|
use crate::{models::*, FileDialogBuilder, FilePath, MessageDialogBuilder, StopAccessingPath, OK};
|
|
|
|
|
|
|
|
|
|
pub fn init<R: Runtime, C: DeserializeOwned>(
|
|
|
|
|
app: &AppHandle<R>,
|
|
|
|
@ -207,6 +207,13 @@ pub fn save_file<R: Runtime, F: FnOnce(Option<FilePath>) + Send + 'static>(
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn stop_accessing_path<R: Runtime>(
|
|
|
|
|
_dialog: FileDialogBuilder<R>,
|
|
|
|
|
_p: StopAccessingPath,
|
|
|
|
|
) -> bool {
|
|
|
|
|
true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Shows a message dialog
|
|
|
|
|
pub fn show_message_dialog<R: Runtime, F: FnOnce(bool) + Send + 'static>(
|
|
|
|
|
dialog: MessageDialogBuilder<R>,
|
|
|
|
|