mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Merge pull request #1552 from PR0M3TH3AN/fix-video-modal-share-button-8912381817946423114
Fix video modal share button logic
This commit is contained in:
2 files changed
+73
-4
No files matched your search
@@ -2797,10 +2797,6 @@ export class VideoModal {
|
||||
}
|
||||
|
||||
updateSourceAvailability(video) {
|
||||
if (!this.sourceToggleContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
const hasUrl = Boolean(
|
||||
typeof video?.url === "string" && video.url.trim()
|
||||
);
|
||||
@@ -2809,6 +2805,12 @@ export class VideoModal {
|
||||
video?.torrentSupported
|
||||
);
|
||||
|
||||
this.setShareEnabled(hasUrl || hasMagnet);
|
||||
|
||||
if (!this.sourceToggleContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasUrl || hasMagnet) {
|
||||
this.sourceToggleContainer.removeAttribute("hidden");
|
||||
this.sourceToggleContainer.classList.remove("hidden");
|
||||
|
||||
Reference in new issue
Block a user