|
|
@ -12,7 +12,9 @@ use crate::{Dialog, FileDialogBuilder, FileResponse, MessageDialogKind, Result};
|
|
|
|
#[derive(Serialize)]
|
|
|
|
#[derive(Serialize)]
|
|
|
|
#[serde(untagged)]
|
|
|
|
#[serde(untagged)]
|
|
|
|
pub enum OpenResponse {
|
|
|
|
pub enum OpenResponse {
|
|
|
|
|
|
|
|
#[cfg(desktop)]
|
|
|
|
Folders(Option<Vec<PathBuf>>),
|
|
|
|
Folders(Option<Vec<PathBuf>>),
|
|
|
|
|
|
|
|
#[cfg(desktop)]
|
|
|
|
Folder(Option<PathBuf>),
|
|
|
|
Folder(Option<PathBuf>),
|
|
|
|
Files(Option<Vec<FileResponse>>),
|
|
|
|
Files(Option<Vec<FileResponse>>),
|
|
|
|
File(Option<FileResponse>),
|
|
|
|
File(Option<FileResponse>),
|
|
|
@ -46,12 +48,14 @@ pub struct OpenDialogOptions {
|
|
|
|
/// If [`Self::directory`] is true, indicates that it will be read recursively later.
|
|
|
|
/// If [`Self::directory`] is true, indicates that it will be read recursively later.
|
|
|
|
/// Defines whether subdirectories will be allowed on the scope or not.
|
|
|
|
/// Defines whether subdirectories will be allowed on the scope or not.
|
|
|
|
#[serde(default)]
|
|
|
|
#[serde(default)]
|
|
|
|
|
|
|
|
#[cfg_attr(mobile, allow(dead_code))]
|
|
|
|
recursive: bool,
|
|
|
|
recursive: bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// The options for the save dialog API.
|
|
|
|
/// The options for the save dialog API.
|
|
|
|
#[derive(Debug, Clone, Deserialize)]
|
|
|
|
#[derive(Debug, Clone, Deserialize)]
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
|
|
|
|
#[cfg_attr(mobile, allow(dead_code))]
|
|
|
|
pub struct SaveDialogOptions {
|
|
|
|
pub struct SaveDialogOptions {
|
|
|
|
/// The title of the dialog window.
|
|
|
|
/// The title of the dialog window.
|
|
|
|
title: Option<String>,
|
|
|
|
title: Option<String>,
|
|
|
|