Commit Graph

28 Commits

Author SHA1 Message Date
Andrew de Waal d7a0bb325d feat(dialog) - Support fileAccessMode for open dialog (#3030) (#3136)
* feat(dialog) - Support fileAccessMode for open dialog (#3030)

On iOS, when trying to access a file that exists outside of the app sandbox, one of 2 things need to happen to be able to perform any operations on said file:

* A copy of the file needs to be made to the internal app sandbox
* The method startAccessingSecurityScopedResource needs to be called.

Previously, a copy of the file was always being made when a file was selected through the picker dialog.

While this did ensure there were no file access exceptions when reading from the file, it does not scale well for large files.

To resolve this, we now support `fileAccessMode`, which allows a file handle to be returned without copying the file to the app sandbox.

This MR only supports this change for iOS; MacOS has a different set of needs for security scoped resources.

See discussion in #3716 for more discussion of the difference between iOS and MacOS.
See MR #3185 to see how these scoped files will be accessible using security scoping.

* fmt, clippy

* use enum

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2026-01-14 08:35:06 -03:00
Andrew de Waal dff6fa986a feat(dialog) - Support picker mode for open dialog (#3030) (#3034)
Co-authored-by: Andrew de Waal <andrewldewaal@gmail.com>
2025-11-20 22:28:13 +01:00
Fabian-Lars 5cd7778723 docs(dialog): add/fix doc item links, closes #3089 (#3091) 2025-11-09 17:07:35 +01:00
Amr Bashir 509eba8d44 feat: support message dialogs with 3 buttons (#2641)
* feat: support message dialogs with 3 buttons

* change file

* From<String>

* untagged & YesNoCancel

* revert package.json

* Update plugins/dialog/src/desktop.rs

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>

* no optional

* Update desktop.rs

* Update plugins/dialog/src/models.rs

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>

* change to an enum

* convert back into union

* regen

* update @since

* map buttons for linux

* enhance type

* Add examples

---------

Co-authored-by: Tony <68118705+Legend-Master@users.noreply.github.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Tony <legendmastertony@gmail.com>
2025-08-27 09:40:47 -03:00
Fabian-Lars 76f99ce999 fix(dialog): pub export Dialog (#2108)
fixes #2107
2024-11-27 11:59:55 +01:00
Fabian-Lars 51856e9e0a docs: Remove header image from inline docs (#2045) 2024-11-13 16:07:29 +01:00
Tony 2302c2db1c fix(dialog): ask and confirm not using system button texts (#1910)
* Fix `ask`'s button texts being ok and cancel

* Update change file
2024-10-20 08:48:45 -03:00
Tony 04459afbb6 refactor(dialog)!: use enum instead of label for buttons (#1842)
* refactor(dialog)!: use enum instead of label

* Add change file

* Fix doc comment typo

* Move ok and cancel to lib.rs
2024-10-01 09:34:20 -03:00
renovate[bot] 6bf1bd8d44 fix(deps): update rust crate rfd to 0.15 (v2) (#1805)
* fix(deps): update rust crate rfd to 0.15

* Fix compilation

* Add change file

* Remove platform specific note

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tony <legendmastertony@gmail.com>
2024-09-19 20:04:02 +08:00
Amr Bashir a2fe55512f refactor: add methods and implement traits for FilePath and SafeFilePath (#1727)
* refactor: add methods and implement traits for `FilePath` and `SafeFilePath`

closes #1726

* clippy

* path -> as_path

* fix prettierignore

* Discard changes to Cargo.lock

* Discard changes to Cargo.toml

* update tauri deps
2024-09-05 14:12:40 +03:00
Carlos Valdez b4c95b25df chore(dialog): fix misspell "ths" to "the" (#1719) 2024-09-02 14:05:11 +02:00
mikoto2000 448846b834 feat(fs): resolve content URIs on Android (#1658)
* Implemented writeTextFile on Android.

* Added license headers.

* fix fmt checks.

* implement more file APIs

* change file

* cleanup

* refactor dialog plugin to leverage new FS APIs

* implement metadata functions

* fix build

* expose FS rust API

* resolve resources on android

* update pnpm

* update docs

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-23 13:35:53 -03:00
Amr Bashir f690777a91 refacator(dialog): mark FileResponse as #[non_exhaustive] (#1660)
* recator(dialog): mark `FileResponse` as `#[non_exhaustive]`

closes #1623

* change file
2024-08-21 16:14:58 +03:00
mikoto2000 bc7eecf420 feat(dialog): Implemented android save dialog. (#1657)
* Implemented android save dialog.

* small cleanup

* lint

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2024-08-13 08:41:30 -03:00
Ale Guzman cd57dcdf04 feat(dialog): set len and modified_at fields in FileResponse on desktop (#1295) 2024-05-14 02:09:24 +03:00
Naman Garg 8d7689f6f9 Add WebviewWindow to code docs and template (#1144)
* Add WebviewWindow to code docs

* Shorten the WebView Name

* Apply suggestions from code review

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-04-09 11:56:00 -03:00
Lucas Fernandes Nogueira a04ea2f382 refactor: only inject API IIFE script when withGlobalTauri is true (#1071)
* refactor: only inject API IIFE script when withGlobalTauri is true

* fmt

* update tauri
2024-03-19 15:03:20 -03:00
Amr Bashir aa25c91bb0 feat(dialog): allow setting canCreateDirectories on macOS (#978)
* feat(dialog): allow setting `canCreateDirectories` on macOS

closes #949

* Discard changes to plugins/log/src/api-iife.js

* Discard changes to plugins/store/src/api-iife.js

* Discard changes to plugins/window-state/src/api-iife.js

* Update plugins/dialog/src/commands.rs

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/src/commands.rs

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/src/lib.rs

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/guest-js/index.ts

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

* Update plugins/dialog/guest-js/index.ts

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>

---------

Co-authored-by: Fabian-Lars <fabianlars@fabianlars.de>
2024-02-23 21:05:29 +02:00
Lucas Nogueira 8461cf1d1b chore: update to tauri beta.3 2024-02-19 17:10:49 -03:00
Mo beb6b139eb Fix invoke calls in dialog & shell init scripts (#675)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-10-22 10:09:40 -03:00
Lucas Fernandes Nogueira d1b7c2c1fb feat: build docs.rs documentation for Android (#654) 2023-10-19 17:39:54 +00:00
Jason Tsai be591d2feb fix(dialog): using AsyncMessageDialog for non linux, closes tauri#7182 (#445) 2023-08-07 09:34:16 -03:00
Simon Hyll 5fd597ddaf docs: added banners and icons (#443)
* added banners and icons

* fix: formatting
2023-06-20 14:55:14 +03:00
Lucas Fernandes Nogueira b131bc8f7c feat(plugins): inject API on window.__TAURI__ (#383) 2023-05-23 14:20:14 -03:00
Lucas Fernandes Nogueira fdec66c69f fix: adjust Cargo features to fix android build (#375) 2023-05-19 10:59:26 -03:00
Lucas Fernandes Nogueira 7ae7167fbe feat: add init scripts (#361) 2023-05-17 18:25:56 -03:00
Lucas Fernandes Nogueira 937e6a5be6 feat: use tauri next branch, fix tests, MSRV 1.65 (#354) 2023-05-12 17:16:50 -03:00
Lucas Fernandes Nogueira 7a8633f429 feat(dialog): add plugin (#306) 2023-04-18 22:41:12 -03:00