Merge branch 'labstaging' into staging
This commit is contained in:
commit
51b911168f
@ -149,6 +149,7 @@ export default function QuizAnswerer(props: Props) {
|
||||
background: "black",
|
||||
zIndex: 999,
|
||||
opacity: 0,
|
||||
pointerEvents: "auto",
|
||||
}}
|
||||
/>
|
||||
<QuizAnswererInner {...props} />
|
||||
|
@ -43,8 +43,9 @@ export default function ViewPublicationPage() {
|
||||
const root = document.getElementById("root");
|
||||
const overlay = document.getElementById("hideoverlay");
|
||||
|
||||
if (!settings.cfg?.isUnSc) overlay?.remove();
|
||||
|
||||
if (root !== null && overlay !== null && settings.cfg?.isUnSc) {
|
||||
overlay.style.cssText = "pointerEvents = auto;";
|
||||
unscreen(overlay, root);
|
||||
}
|
||||
}, []);
|
||||
|
@ -43,7 +43,6 @@ export const File = ({ currentQuestion }: FileProps) => {
|
||||
marginTop: "20px",
|
||||
maxWidth: answer?.split("|")[0] ? "640px" : "600px",
|
||||
}}
|
||||
onClick={(event) => event.preventDefault()}
|
||||
>
|
||||
{answer?.split("|")[0] ? (
|
||||
<UploadedFile
|
||||
|
@ -1,11 +1,11 @@
|
||||
function addOverlay(overlay: HTMLElement) {
|
||||
// const overlay = document.getElementById('overlay');
|
||||
overlay.style.opacity = "1"; // Затемнено
|
||||
overlay.style.pointerEvents = "auto"; // Включить клики
|
||||
overlay.style.display = "inherit"; //
|
||||
}
|
||||
function removeOverlay(overlay: HTMLElement) {
|
||||
overlay.style.opacity = "0"; // Вернуть в исходное состояние
|
||||
overlay.style.pointerEvents = "none"; // Игнорировать клики
|
||||
overlay.style.display = "none"; //
|
||||
}
|
||||
function addRemoveOverlayTimer(overlay: HTMLElement, time = 1000) {
|
||||
addOverlay(overlay);
|
||||
@ -19,7 +19,8 @@ let isMouseInside = true;
|
||||
let isWindowFocused = true;
|
||||
|
||||
export default function unscreen(overlay: HTMLElement, root: HTMLElement) {
|
||||
let focusTimeout: NodeJS.Timeout | undefined;
|
||||
overlay.style.display = "none";
|
||||
|
||||
// Проверка состояния и выполнение нужного действия
|
||||
function checkFocusAndMouse() {
|
||||
if (!isWindowFocused || !isMouseInside) {
|
||||
@ -59,7 +60,6 @@ export default function unscreen(overlay: HTMLElement, root: HTMLElement) {
|
||||
root.addEventListener("contextmenu", (event) => event.preventDefault());
|
||||
|
||||
window.addEventListener("keydown", function (event) {
|
||||
event.preventDefault();
|
||||
if (event.key === "PrintScreen" || (event.ctrlKey && event.key === "p")) {
|
||||
addRemoveOverlayTimer(overlay);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user