|
553 | 553 | .system-window, .missing-messages-window { |
554 | 554 | position: fixed; |
555 | 555 | top: 70px; |
556 | | - left: 20px; |
| 556 | + right: 20px; |
557 | 557 | width: 300px; |
558 | 558 | max-height: 250px; |
559 | 559 | background: rgba(0, 17, 0, 0.95); |
|
566 | 566 | } |
567 | 567 |
|
568 | 568 | .missing-messages-window { |
569 | | - top: 70px; |
| 569 | + top: 330px; |
570 | 570 | right: 20px; |
571 | | - left: auto; |
572 | 571 | border-color: #ff6600; |
573 | 572 | box-shadow: 0 0 15px rgba(255, 102, 0, 0.3); |
574 | 573 | } |
|
701 | 700 | @media (max-width: 768px) { |
702 | 701 | .system-window, .missing-messages-window { |
703 | 702 | top: 50px; |
704 | | - left: 10px; |
| 703 | + right: 10px; |
705 | 704 | width: 250px; |
706 | 705 | max-height: 150px; |
707 | 706 | } |
708 | 707 |
|
709 | 708 | .missing-messages-window { |
| 709 | + top: 210px; |
710 | 710 | right: 10px; |
711 | | - left: auto; |
712 | 711 | } |
713 | 712 |
|
714 | 713 | .system-window-content, .missing-messages-window-content { |
|
724 | 723 | @media (max-width: 480px) { |
725 | 724 | .system-window, .missing-messages-window { |
726 | 725 | width: calc(100vw - 40px); |
| 726 | + right: 10px; |
727 | 727 | } |
728 | 728 |
|
729 | 729 | .system-window { |
730 | | - left: 10px; |
| 730 | + top: 50px; |
731 | 731 | } |
732 | 732 |
|
733 | 733 | .missing-messages-window { |
734 | | - right: 10px; |
735 | | - left: auto; |
736 | | - top: 220px; |
| 734 | + top: 210px; |
737 | 735 | } |
738 | 736 | } |
739 | 737 | </style> |
|
1000 | 998 |
|
1001 | 999 | this.systemWindow.style.left = xOffset + 'px'; |
1002 | 1000 | this.systemWindow.style.top = yOffset + 'px'; |
| 1001 | + this.systemWindow.style.right = 'auto'; // Clear right positioning when dragging |
1003 | 1002 | } |
1004 | 1003 | }); |
1005 | 1004 |
|
|
1045 | 1044 |
|
1046 | 1045 | this.systemWindow.style.left = xOffset + 'px'; |
1047 | 1046 | this.systemWindow.style.top = yOffset + 'px'; |
| 1047 | + this.systemWindow.style.right = 'auto'; // Clear right positioning when dragging |
1048 | 1048 | } |
1049 | 1049 | }); |
1050 | 1050 |
|
|
1057 | 1057 |
|
1058 | 1058 | // Initialize position from current CSS |
1059 | 1059 | const computedStyle = window.getComputedStyle(this.systemWindow); |
1060 | | - xOffset = parseInt(computedStyle.left) || 20; |
| 1060 | + const rightValue = parseInt(computedStyle.right); |
| 1061 | + if (!isNaN(rightValue)) { |
| 1062 | + xOffset = window.innerWidth - this.systemWindow.offsetWidth - rightValue; |
| 1063 | + } else { |
| 1064 | + xOffset = parseInt(computedStyle.left) || (window.innerWidth - this.systemWindow.offsetWidth - 20); |
| 1065 | + } |
1061 | 1066 | yOffset = parseInt(computedStyle.top) || 70; |
1062 | 1067 | } |
1063 | 1068 |
|
|
1102 | 1107 |
|
1103 | 1108 | this.missingMessagesWindow.style.left = xOffset + 'px'; |
1104 | 1109 | this.missingMessagesWindow.style.top = yOffset + 'px'; |
| 1110 | + this.missingMessagesWindow.style.right = 'auto'; // Clear right positioning when dragging |
1105 | 1111 | } |
1106 | 1112 | }); |
1107 | 1113 |
|
|
1147 | 1153 |
|
1148 | 1154 | this.missingMessagesWindow.style.left = xOffset + 'px'; |
1149 | 1155 | this.missingMessagesWindow.style.top = yOffset + 'px'; |
| 1156 | + this.missingMessagesWindow.style.right = 'auto'; // Clear right positioning when dragging |
1150 | 1157 | } |
1151 | 1158 | }); |
1152 | 1159 |
|
|
1163 | 1170 | if (!isNaN(rightValue)) { |
1164 | 1171 | xOffset = window.innerWidth - this.missingMessagesWindow.offsetWidth - rightValue; |
1165 | 1172 | } else { |
1166 | | - xOffset = parseInt(computedStyle.left) || 20; |
| 1173 | + xOffset = parseInt(computedStyle.left) || (window.innerWidth - this.missingMessagesWindow.offsetWidth - 20); |
1167 | 1174 | } |
1168 | | - yOffset = parseInt(computedStyle.top) || 70; |
1169 | | - this.missingMessagesWindow.style.left = xOffset + 'px'; |
1170 | | - this.missingMessagesWindow.style.right = 'auto'; |
| 1175 | + yOffset = parseInt(computedStyle.top) || 330; |
1171 | 1176 | } |
1172 | 1177 |
|
1173 | 1178 | // Utility function to convert bytes to hex string |
|
0 commit comments