mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-30 17:32:26 +00:00
Refactor video modal sharing options into a unified Share menu
- Replaced the standalone "Copy Magnet" button and "Share" button with a new Share menu. - Implemented `createVideoShareMenuPanel` to render the new menu with "Copy URL", "Share on Nostr", "Copy Magnet", and "Copy CDN Link" options. - Updated `VideoModal.js` to manage the share menu state and handle actions. - Added `video:share-nostr` and `video:copy-cdn` event handlers in `app.js`. - Removed the `#copyMagnetBtn` element from `video-modal.html`. - Preserved existing functionality for "Copy URL" and "Copy Magnet". - "Share on Nostr" is currently a placeholder logging a message, disabled for logged-out users. - "Copy CDN Link" is disabled if no URL is available.
This commit is contained in:
1 parent
4c9ae3b882
commit
bd868fb7ea
8 files changed
+140
-24
No files matched your search
@@ -304,25 +304,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="video-modal__actions-group">
|
||||
<button
|
||||
id="copyMagnetBtn"
|
||||
type="button"
|
||||
class="video-modal__action-button focus-ring accent-action-button"
|
||||
aria-label="Copy magnet"
|
||||
>
|
||||
<svg
|
||||
class="video-modal__action-icon icon-image"
|
||||
viewBox="0 0 24 24"
|
||||
aria-hidden="true"
|
||||
focusable="false"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M17.374 20.235c2.444-2.981 6.626-8.157 6.626-8.157l-3.846-3.092s-2.857 3.523-6.571 8.097c-4.312 5.312-11.881-2.41-6.671-6.671 4.561-3.729 8.097-6.57 8.097-6.57l-3.092-3.842s-5.173 4.181-8.157 6.621c-2.662 2.175-3.76 4.749-3.76 7.24 0 5.254 4.867 10.139 10.121 10.139 2.487 0 5.064-1.095 7.253-3.765zm4.724-7.953l-1.699 2.111-1.74-1.397 1.701-2.114 1.738 1.4zm-10.386-10.385l1.4 1.738-2.113 1.701-1.397-1.74 2.11-1.699z"
|
||||
/>
|
||||
</svg>
|
||||
<span class="video-modal__action-label">Copy magnet</span>
|
||||
</button>
|
||||
<div class="popover" data-modal-zap-wrapper>
|
||||
<button
|
||||
id="modalZapBtn"
|
||||
|
||||
Reference in new issue
Block a user