Skip to content

Commit

Permalink
update gui
Browse files Browse the repository at this point in the history
  • Loading branch information
lindongchen committed Nov 9, 2024
1 parent df07072 commit d81984e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
4 changes: 2 additions & 2 deletions gui/src-plugin/tauri-plugin-share/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "tauri-plugin-share"
version = "0.1.0"
authors = [ "You" ]
description = ""
authors = [ "flomesh" ]
description = "A Tauri share plugin"
edition = "2021"
rust-version = "1.77.2"
exclude = ["/shares", "/webview-dist", "/webview-src", "/node_modules"]
Expand Down
17 changes: 17 additions & 0 deletions gui/src-plugin/tauri-plugin-share/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# Tauri Plugin share

## Share file
```
import { invoke } from '@tauri-apps/api/core'
invoke('plugin:share|share', {
path,
mimeType
})
path: ios: /private/var... | android: /storage/emulated/0/Android...
mimeType: application/pdf | application/zip ....
```


## Share from others app
TODO
3 changes: 1 addition & 2 deletions gui/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tauri-build = { version = "=2.0.2", features = [] }
# tauri = { version = "=2.0.2", features = ["devtools"] }
[dependencies]
fix-path-env = { git = "https://github.com/tauri-apps/fix-path-env-rs" }
tauri = { version = "=2.0.6", features = ["macos-proxy", "unstable"] }
tauri = { version = "=2.0.6", features = [ "protocol-asset", "macos-proxy", "macos-private-api", "image-ico", "image-png", "tray-icon", "unstable"] }
tauri-utils = "=2.0.2"
tauri-runtime = "=2.1.1"
tauri-plugin-shell = "=2.0.2"
Expand All @@ -32,7 +32,6 @@ tauri-plugin-persisted-scope = "=2.0.3"
tauri-plugin-deep-link = "=2.0.1"
tauri-plugin-clipboard-manager = "=2.0.1"
tauri-plugin-log = "=2.0.1"
# tauri-plugin-sharesheet = { git = "https://github.com/buildyourwebapp/tauri-plugin-sharesheet" }
tauri-plugin-share = { path = "../src-plugin/tauri-plugin-share/" }
lazy_static = "1.4"
serde = { version = "1", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion gui/src-tauri/Entitlements.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<false/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
Expand Down
13 changes: 8 additions & 5 deletions gui/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@
],
"security": {
"csp": null,
"assetProtocol": {
"enable": false,
"scope": []
},
"dangerousDisableAssetCspModification": false,
"freezePrototype": false,
"assetProtocol": {
"enable": true,
"scope": {
"allow": ["$APPDATA/**", "$HOME/**", "$RESOURCE/**", "$DOCUMENT/**"]
}
},
"capabilities": ["main-capability"]
},
"withGlobalTauri": true
"withGlobalTauri": true,
"macOSPrivateApi": true
},
"bundle": {
"active": true,
Expand Down

0 comments on commit d81984e

Please sign in to comment.