mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-02 02:42:28 +00:00
Fix viewer mute blur regression and update modal overrides
This commit is contained in:
1 parent
3936b1ed9f
commit
9dfe7ef20e
5 files changed
+193
-11
No files matched your search
@@ -3989,11 +3989,11 @@ export class VideoModal {
|
||||
const badge = this.moderationBadge;
|
||||
const textEl = this.moderationBadgeText;
|
||||
|
||||
const shouldShow = Boolean(context?.shouldShow);
|
||||
const showModeration = Boolean(context?.shouldShow);
|
||||
const shouldBlur = Boolean(context?.activeBlur && !context?.overrideActive);
|
||||
const hiddenActive = Boolean(context?.activeHidden && !context?.overrideActive);
|
||||
|
||||
if (!shouldShow) {
|
||||
if (!showModeration) {
|
||||
if (stage && stage.dataset.visualState === "blurred") {
|
||||
delete stage.dataset.visualState;
|
||||
}
|
||||
@@ -4031,7 +4031,11 @@ export class VideoModal {
|
||||
}
|
||||
|
||||
if (overlay) {
|
||||
overlay.removeAttribute("hidden");
|
||||
if (showModeration && !context?.overrideActive) {
|
||||
overlay.removeAttribute("hidden");
|
||||
} else {
|
||||
overlay.setAttribute("hidden", "");
|
||||
}
|
||||
overlay.dataset.overlayState = context?.overrideActive ? "override" : "active";
|
||||
}
|
||||
|
||||
@@ -4129,7 +4133,12 @@ export class VideoModal {
|
||||
const actions = this.ensureModerationActionsContainer();
|
||||
let actionsAttached = false;
|
||||
|
||||
if (context?.allowOverride) {
|
||||
const allowOverride =
|
||||
context?.overrideActive === true ||
|
||||
context?.allowOverride === true ||
|
||||
(shouldBlur && !context?.overrideActive && context?.blurReason !== "viewer-mute");
|
||||
|
||||
if (allowOverride) {
|
||||
const mode = context.overrideActive ? "hide" : "override";
|
||||
const primaryButton = this.ensureModerationPrimaryButton(mode);
|
||||
if (primaryButton) {
|
||||
|
||||
Reference in new issue
Block a user