fix: memperbaiki responsivitas header pada tampilan mobile
This commit is contained in:
+36
-12
@@ -930,16 +930,33 @@ function closeDashboard() {
|
||||
// ==========================================
|
||||
function updateConnectionStatus() {
|
||||
var statusEl = document.getElementById('connection-status');
|
||||
if (!statusEl) return;
|
||||
var mobileStatusEl = document.getElementById('mobile-connection-status');
|
||||
var mobileStatusText = document.getElementById('mobile-connection-text');
|
||||
|
||||
if (navigator.onLine) {
|
||||
statusEl.classList.remove('offline');
|
||||
statusEl.classList.add('online');
|
||||
statusEl.setAttribute('title', 'Koneksi Stabil');
|
||||
if (statusEl) {
|
||||
statusEl.classList.remove('offline');
|
||||
statusEl.classList.add('online');
|
||||
statusEl.setAttribute('title', 'Koneksi Stabil');
|
||||
}
|
||||
if (mobileStatusEl) {
|
||||
mobileStatusEl.style.color = '#10b981';
|
||||
}
|
||||
if (mobileStatusText) {
|
||||
mobileStatusText.textContent = 'Online';
|
||||
}
|
||||
} else {
|
||||
statusEl.classList.remove('online');
|
||||
statusEl.classList.add('offline');
|
||||
statusEl.setAttribute('title', 'Koneksi Terputus - Peta mungkin tidak dimuat sempurna');
|
||||
if (statusEl) {
|
||||
statusEl.classList.remove('online');
|
||||
statusEl.classList.add('offline');
|
||||
statusEl.setAttribute('title', 'Koneksi Terputus - Peta mungkin tidak dimuat sempurna');
|
||||
}
|
||||
if (mobileStatusEl) {
|
||||
mobileStatusEl.style.color = '#ef4444';
|
||||
}
|
||||
if (mobileStatusText) {
|
||||
mobileStatusText.textContent = 'Offline';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -955,15 +972,22 @@ updateConnectionStatus();
|
||||
// 17. MODAL TENTANG APLIKASI
|
||||
// ==========================================
|
||||
var aboutBtn = document.getElementById('about-btn');
|
||||
var mobileAboutBtn = document.getElementById('mobile-about-btn');
|
||||
var aboutModal = document.getElementById('about-modal');
|
||||
var aboutCloseBtn = document.getElementById('about-close-btn');
|
||||
var aboutOkBtn = document.getElementById('about-ok-btn');
|
||||
|
||||
if (aboutBtn && aboutModal) {
|
||||
aboutBtn.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
aboutModal.classList.add('active');
|
||||
});
|
||||
var openAboutModal = function (e) {
|
||||
e.preventDefault();
|
||||
aboutModal.classList.add('active');
|
||||
// Tutup menu mobile jika sedang terbuka
|
||||
var menu = document.getElementById('mobile-menu-dropdown');
|
||||
if (menu) menu.classList.remove('active');
|
||||
};
|
||||
|
||||
if (aboutModal) {
|
||||
if (aboutBtn) aboutBtn.addEventListener('click', openAboutModal);
|
||||
if (mobileAboutBtn) mobileAboutBtn.addEventListener('click', openAboutModal);
|
||||
|
||||
var closeModal = function () {
|
||||
aboutModal.classList.remove('active');
|
||||
|
||||
Reference in New Issue
Block a user