asab_webui_shell 27.3.4 → 27.3.5
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.
|
@@ -489,6 +489,7 @@ class Application extends _react.Component {
|
|
|
489
489
|
this.setState(prevState => ({
|
|
490
490
|
printReadyIndicators: prevState.printReadyIndicators + 1
|
|
491
491
|
}));
|
|
492
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'push');
|
|
492
493
|
}
|
|
493
494
|
popPrintReadyIndicator() {
|
|
494
495
|
this.setState(prevState => {
|
|
@@ -500,6 +501,7 @@ class Application extends _react.Component {
|
|
|
500
501
|
printReadyIndicators: Math.max(nextValue, 0)
|
|
501
502
|
};
|
|
502
503
|
});
|
|
504
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'pop');
|
|
503
505
|
}
|
|
504
506
|
registerService(service) {
|
|
505
507
|
if (service.Name in this.Services) {
|
|
@@ -550,11 +552,13 @@ class Application extends _react.Component {
|
|
|
550
552
|
if (this.state.printReadyIndicators === 0) {
|
|
551
553
|
document.body.setAttribute('print-ready', 'true');
|
|
552
554
|
this._printReadyTimeout = null;
|
|
555
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'set true');
|
|
553
556
|
}
|
|
554
557
|
}, 1500); // Add 1500ms delay to ensure that the print-ready attribute is set after the last print-ready indicator is popped
|
|
555
558
|
} else {
|
|
556
559
|
this._clearPrintReadyTimeout();
|
|
557
560
|
document.body.setAttribute('print-ready', 'false');
|
|
561
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'set false');
|
|
558
562
|
}
|
|
559
563
|
}
|
|
560
564
|
componentWillUnmount() {
|
|
@@ -567,6 +571,7 @@ class Application extends _react.Component {
|
|
|
567
571
|
}
|
|
568
572
|
this._clearPrintReadyTimeout();
|
|
569
573
|
document.body.removeAttribute('print-ready');
|
|
574
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'unmount removed');
|
|
570
575
|
}
|
|
571
576
|
_clearPrintReadyTimeout() {
|
|
572
577
|
if (this._printReadyTimeout !== null) {
|
|
@@ -601,6 +606,7 @@ class Application extends _react.Component {
|
|
|
601
606
|
if (this.SplashscreenRequestors.size == 0) {
|
|
602
607
|
var splashscreen = document.getElementById('app-splashscreen'); // See public/index.html
|
|
603
608
|
splashscreen === null || splashscreen === void 0 || splashscreen.classList.add("d-none");
|
|
609
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'splash last removed, pop');
|
|
604
610
|
// Decrement print-ready indicator value if no splash screen requestors are present
|
|
605
611
|
this.popPrintReadyIndicator();
|
|
606
612
|
}
|
|
@@ -36,15 +36,18 @@ function UnauthorizedAccessScreen(props) {
|
|
|
36
36
|
if (!isAuthorized) {
|
|
37
37
|
document.body.setAttribute('print-ready', 'true');
|
|
38
38
|
document.body.setAttribute('print-unauthorized', 'true');
|
|
39
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'UnauthorizedAccessScreen set true');
|
|
39
40
|
} else {
|
|
40
41
|
document.body.removeAttribute('print-ready');
|
|
41
42
|
document.body.removeAttribute('print-unauthorized');
|
|
43
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'UnauthorizedAccessScreen cleared');
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
// Cleanup function to remove the attributes when the component unmounts
|
|
45
47
|
return () => {
|
|
46
48
|
document.body.removeAttribute('print-ready');
|
|
47
49
|
document.body.removeAttribute('print-unauthorized');
|
|
50
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'UnauthorizedAccessScreen cleanup');
|
|
48
51
|
};
|
|
49
52
|
}, [isAuthorized]);
|
|
50
53
|
|