asab_webui_shell 27.4.1 → 27.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -480,7 +480,6 @@ class Application extends _react.Component {
|
|
|
480
480
|
this.setState(prevState => ({
|
|
481
481
|
printReadyIndicators: prevState.printReadyIndicators + 1
|
|
482
482
|
}));
|
|
483
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'push');
|
|
484
483
|
}
|
|
485
484
|
popPrintReadyIndicator() {
|
|
486
485
|
this.setState(prevState => {
|
|
@@ -492,7 +491,6 @@ class Application extends _react.Component {
|
|
|
492
491
|
printReadyIndicators: Math.max(nextValue, 0)
|
|
493
492
|
};
|
|
494
493
|
});
|
|
495
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'pop');
|
|
496
494
|
}
|
|
497
495
|
registerService(service) {
|
|
498
496
|
if (service.Name in this.Services) {
|
|
@@ -543,13 +541,11 @@ class Application extends _react.Component {
|
|
|
543
541
|
if (this.state.printReadyIndicators === 0) {
|
|
544
542
|
document.body.setAttribute('print-ready', 'true');
|
|
545
543
|
this._printReadyTimeout = null;
|
|
546
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'set true');
|
|
547
544
|
}
|
|
548
545
|
}, 1500); // Add 1500ms delay to ensure that the print-ready attribute is set after the last print-ready indicator is popped
|
|
549
546
|
} else {
|
|
550
547
|
this._clearPrintReadyTimeout();
|
|
551
548
|
document.body.setAttribute('print-ready', 'false');
|
|
552
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'set false');
|
|
553
549
|
}
|
|
554
550
|
}
|
|
555
551
|
componentWillUnmount() {
|
|
@@ -562,7 +558,6 @@ class Application extends _react.Component {
|
|
|
562
558
|
}
|
|
563
559
|
this._clearPrintReadyTimeout();
|
|
564
560
|
document.body.removeAttribute('print-ready');
|
|
565
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'unmount removed');
|
|
566
561
|
}
|
|
567
562
|
_clearPrintReadyTimeout() {
|
|
568
563
|
if (this._printReadyTimeout !== null) {
|
|
@@ -597,7 +592,6 @@ class Application extends _react.Component {
|
|
|
597
592
|
if (this.SplashscreenRequestors.size == 0) {
|
|
598
593
|
var splashscreen = document.getElementById('app-splashscreen'); // See public/index.html
|
|
599
594
|
splashscreen === null || splashscreen === void 0 || splashscreen.classList.add("d-none");
|
|
600
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'splash last removed, pop');
|
|
601
595
|
// Decrement print-ready indicator value if no splash screen requestors are present
|
|
602
596
|
this.popPrintReadyIndicator();
|
|
603
597
|
}
|
|
@@ -35,18 +35,15 @@ function UnauthorizedAccessScreen(props) {
|
|
|
35
35
|
if (!isAuthorized) {
|
|
36
36
|
document.body.setAttribute('print-ready', 'true');
|
|
37
37
|
document.body.setAttribute('print-unauthorized', 'true');
|
|
38
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'UnauthorizedAccessScreen set true');
|
|
39
38
|
} else {
|
|
40
39
|
document.body.removeAttribute('print-ready');
|
|
41
40
|
document.body.removeAttribute('print-unauthorized');
|
|
42
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'UnauthorizedAccessScreen cleared');
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
// Cleanup function to remove the attributes when the component unmounts
|
|
46
44
|
return () => {
|
|
47
45
|
document.body.removeAttribute('print-ready');
|
|
48
46
|
document.body.removeAttribute('print-unauthorized');
|
|
49
|
-
console.log('print-ready', document.body.getAttribute('print-ready'), 'UnauthorizedAccessScreen cleanup');
|
|
50
47
|
};
|
|
51
48
|
}, [isAuthorized]);
|
|
52
49
|
|