pinokiod 3.74.0 → 3.75.0
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.
- package/package.json +1 -1
- package/server/public/common.js +41 -0
- package/server/public/style.css +4 -0
package/package.json
CHANGED
package/server/public/common.js
CHANGED
|
@@ -470,11 +470,52 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
470
470
|
});
|
|
471
471
|
|
|
472
472
|
function openDropdown() {
|
|
473
|
+
const isMinimized = document.body.classList.contains('minimized');
|
|
474
|
+
|
|
475
|
+
if (isMinimized) {
|
|
476
|
+
// Create a portal container for centered positioning
|
|
477
|
+
let portal = document.getElementById('dropdown-portal');
|
|
478
|
+
if (!portal) {
|
|
479
|
+
portal = document.createElement('div');
|
|
480
|
+
portal.id = 'dropdown-portal';
|
|
481
|
+
portal.style.cssText = `
|
|
482
|
+
position: fixed;
|
|
483
|
+
top: 0;
|
|
484
|
+
left: 0;
|
|
485
|
+
width: 100%;
|
|
486
|
+
height: 100%;
|
|
487
|
+
display: flex;
|
|
488
|
+
justify-content: center;
|
|
489
|
+
align-items: center;
|
|
490
|
+
z-index: 1000000000;
|
|
491
|
+
pointer-events: none;
|
|
492
|
+
`;
|
|
493
|
+
document.body.appendChild(portal);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// Move dropdown to portal and make it visible
|
|
497
|
+
portal.appendChild(dropdownContent);
|
|
498
|
+
dropdownContent.style.position = 'static';
|
|
499
|
+
dropdownContent.style.pointerEvents = 'auto';
|
|
500
|
+
}
|
|
501
|
+
|
|
473
502
|
dropdownContent.classList.add('show');
|
|
474
503
|
dropdown.classList.add('active');
|
|
475
504
|
}
|
|
476
505
|
|
|
477
506
|
function closeDropdown() {
|
|
507
|
+
const isMinimized = document.body.classList.contains('minimized');
|
|
508
|
+
|
|
509
|
+
if (isMinimized) {
|
|
510
|
+
// Move dropdown back to original container
|
|
511
|
+
const portal = document.getElementById('dropdown-portal');
|
|
512
|
+
if (portal && dropdownContent.parentElement === portal) {
|
|
513
|
+
dropdown.appendChild(dropdownContent);
|
|
514
|
+
dropdownContent.style.position = '';
|
|
515
|
+
dropdownContent.style.pointerEvents = '';
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
478
519
|
dropdownContent.classList.remove('show');
|
|
479
520
|
dropdown.classList.remove('active');
|
|
480
521
|
}
|