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

@@ -2220,6 +2220,7 @@ tbody tr:hover {
max-width: min(720px, 90vw);
}
.preview-modal-compact .preview-modal-close,
.preview-modal-compact .preview-modal-share,
.preview-modal-compact .preview-modal-flip,
.preview-modal-compact:not(.preview-modal-show-info) .preview-info,
.preview-modal-show-info .preview-modal-faces {
@@ -2227,8 +2228,20 @@ tbody tr:hover {
}
.preview-modal-close {
position: absolute;
top: -14px;
right: -14px;
top: -16px;
right: -16px;
}
/* The preview's corner buttons are its main controls, so a little larger
than the overlay buttons on tiles. */
.preview-modal-close .icon-btn,
.preview-modal-share .icon-btn {
width: 32px;
height: 32px;
}
.preview-modal-close .icon-btn svg,
.preview-modal-share .icon-btn svg {
width: 18px;
height: 18px;
}
.preview-modal-close .icon-btn {
box-shadow: var(--shadow-md);
@@ -2237,6 +2250,15 @@ tbody tr:hover {
background: var(--danger);
color: #fff;
}
/* Beside the close button, to its left: past its 32px, plus a 12px gap. */
.preview-modal-share {
position: absolute;
top: -16px;
right: 28px;
}
.preview-modal-share .icon-btn {
box-shadow: var(--shadow-md);
}
.preview-modal-flip {
position: absolute;
bottom: 14px;