Share a card's image from the preview

A share button beside the preview's close button sends the face being
shown at Scryfall's large size: on desktop the image is decoded and put on
the clipboard (tauri-plugin-clipboard-manager); on Android it's saved to
the cache and handed to the system share sheet by a small in-repo plugin
(SharePlugin.kt) through the app's FileProvider. The preview's corner
buttons are also a little larger.
This commit is contained in:
2026-10-24 15:20:27 -05:00
parent 7415289257
commit 226878fdd7
10 changed files with 597 additions and 5 deletions

View File

@@ -25,6 +25,11 @@ mtgc-core = { path = "../crates/mtgc-core" }
tauri-plugin-opener = "2.5.4"
url = "2"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
# Copying a card image: the clipboard takes raw pixels, and Scryfall serves JPEGs.
tauri-plugin-clipboard-manager = "2"
image = { version = "0.25", default-features = false, features = ["jpeg"] }
[target.'cfg(target_os = "android")'.dependencies]
# Delivers sync sign-ins back to the app through the `mtgc://` scheme.
tauri-plugin-deep-link = "2"