Refactor code structure for improved readability and maintainability

This commit is contained in:
Will Miao
2025-05-03 17:06:57 +08:00
parent 235dcd5fa6
commit 48df7e1078
6 changed files with 18 additions and 8 deletions

View File

@@ -151,11 +151,12 @@
}
.qrcode-image {
max-width: 100%;
max-width: 80%;
height: auto;
border-radius: var(--border-radius-sm);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
border: 1px solid var(--lora-border);
aspect-ratio: 1/1; /* Ensure proper aspect ratio for the square QR code */
}
.support-footer {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

View File

@@ -90,7 +90,7 @@ export class HeaderManager {
const toggleText = qrToggle.querySelector('.toggle-text');
if (qrContainer.classList.contains('show')) {
toggleText.textContent = 'Hide QR Codes';
toggleText.textContent = 'Hide WeChat QR Code';
// Add small delay to ensure DOM is updated before scrolling
setTimeout(() => {
const supportModal = document.querySelector('.support-modal');
@@ -102,7 +102,7 @@ export class HeaderManager {
}
}, 250);
} else {
toggleText.textContent = 'Show QR Codes';
toggleText.textContent = 'Show WeChat QR Code';
}
});
}