asab_webui_shell 27.2.8 → 27.2.10-beta.1
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.
|
@@ -435,6 +435,7 @@ class Application extends _react.Component {
|
|
|
435
435
|
this.setState(prevState => ({
|
|
436
436
|
printReadyIndicators: prevState.printReadyIndicators + 1
|
|
437
437
|
}));
|
|
438
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'push');
|
|
438
439
|
}
|
|
439
440
|
popPrintReadyIndicator() {
|
|
440
441
|
this.setState(prevState => {
|
|
@@ -446,6 +447,7 @@ class Application extends _react.Component {
|
|
|
446
447
|
printReadyIndicators: Math.max(nextValue, 0)
|
|
447
448
|
};
|
|
448
449
|
});
|
|
450
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'pop');
|
|
449
451
|
}
|
|
450
452
|
registerService(service) {
|
|
451
453
|
if (service.Name in this.Services) {
|
|
@@ -496,11 +498,13 @@ class Application extends _react.Component {
|
|
|
496
498
|
if (this.state.printReadyIndicators === 0) {
|
|
497
499
|
document.body.setAttribute('print-ready', 'true');
|
|
498
500
|
this._printReadyTimeout = null;
|
|
501
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'set true');
|
|
499
502
|
}
|
|
500
|
-
},
|
|
503
|
+
}, 1500); // Add 1500ms delay to ensure that the print-ready attribute is set after the last print-ready indicator is popped
|
|
501
504
|
} else {
|
|
502
505
|
this._clearPrintReadyTimeout();
|
|
503
506
|
document.body.setAttribute('print-ready', 'false');
|
|
507
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'set false');
|
|
504
508
|
}
|
|
505
509
|
}
|
|
506
510
|
componentWillUnmount() {
|
|
@@ -513,6 +517,7 @@ class Application extends _react.Component {
|
|
|
513
517
|
}
|
|
514
518
|
this._clearPrintReadyTimeout();
|
|
515
519
|
document.body.removeAttribute('print-ready');
|
|
520
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'unmount removed');
|
|
516
521
|
}
|
|
517
522
|
_clearPrintReadyTimeout() {
|
|
518
523
|
if (this._printReadyTimeout !== null) {
|
|
@@ -547,6 +552,7 @@ class Application extends _react.Component {
|
|
|
547
552
|
if (this.SplashscreenRequestors.size == 0) {
|
|
548
553
|
var splashscreen = document.getElementById('app-splashscreen'); // See public/index.html
|
|
549
554
|
splashscreen === null || splashscreen === void 0 || splashscreen.classList.add("d-none");
|
|
555
|
+
console.log('print-ready', document.body.getAttribute('print-ready'), 'splash last removed, pop');
|
|
550
556
|
// Decrement print-ready indicator value if no splash screen requestors are present
|
|
551
557
|
this.popPrintReadyIndicator();
|
|
552
558
|
}
|
|
@@ -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
|
|