(country, force_refresh=False)
| 7238 | node.classList.toggle('active', isActive); |
| 7239 | node.classList.toggle('primary', isActive); |
| 7240 | if (node.classList.contains('nav-app-btn')) { if (isActive) node.setAttribute('aria-current','page'); else node.removeAttribute('aria-current'); } |
| 7241 | }); |
| 7242 | var meta = APP_META.find(function(app){ return app.id === appId; }); |
| 7243 | var label = meta ? t(meta.label) : appId; |
| 7244 | var context = document.getElementById('mobileContextLabel'); if (context) context.textContent = label; |
| 7245 | document.title = label + ' · DedSec OS'; |
| 7246 | var notifications = document.getElementById('notificationsPanel'); if (notifications) notifications.classList.add('hidden'); |
| 7247 | if (appId === 'terminal') window.setTimeout(focusTerminalComposer, 80); |
| 7248 | } |
| 7249 | |
| 7250 | |
| 7251 | function bindMenuToggle() { |
| 7252 | async function toggleFullscreen() { |
| 7253 | try { |
| 7254 | if (!document.fullscreenElement) await document.documentElement.requestFullscreen(); |
| 7255 | else await document.exitFullscreen(); |
| 7256 | } catch (err) { handleError(err); } |
| 7257 | } |
| 7258 | var fullButton = document.getElementById('fullscreenTopBtn'); |
| 7259 | if (fullButton) fullButton.addEventListener('click', function(event){ event.stopPropagation(); toggleFullscreen(); }); |
| 7260 | var mobileFull = document.getElementById('mobileFullscreenBtn'); |
| 7261 | if (mobileFull) mobileFull.addEventListener('click', function(event){ event.stopPropagation(); toggleFullscreen(); }); |
| 7262 | var mobileNotifications = document.getElementById('mobileNotificationsBtn'); |
| 7263 | if (mobileNotifications) mobileNotifications.addEventListener('click', async function(){ |
| 7264 | try { var data=await apiGet('/api/notifications'); renderNotificationsPanel((data.notifications && data.notifications.items) || []); } catch(err){ handleError(err); } |
| 7265 | }); |
| 7266 | var mobileExit = document.getElementById('mobileExitBtn'); |
no test coverage detected