(country, force_refresh=False, silent=False)
| 7277 | } |
| 7278 | if (mobile) { |
| 7279 | mobile.innerHTML = APP_META.map(function(app) { |
| 7280 | return '<button class="mobile-nav-btn nav-app-btn' + (app.id === state.activeApp ? ' active' : '') + '" data-app="' + app.id + '" aria-label="' + escapeHtml(t(app.label)) + '"' + (app.id === state.activeApp ? ' aria-current="page"' : '') + '>' + iconSvg(app.id) + '<span>' + escapeHtml(t(app.label)) + '</span></button>'; |
| 7281 | }).join(''); |
| 7282 | } |
| 7283 | document.querySelectorAll('.nav-app-btn').forEach(function(btn) { |
| 7284 | btn.addEventListener('click', function() { setActiveApp(btn.getAttribute('data-app')); }); |
| 7285 | }); |
| 7286 | } |
| 7287 | |
| 7288 | var THEME_SWATCHES = [ |
| 7289 | ['dedsec','#cd93ff'],['cyan','#57d6ff'],['green','#51cf66'],['amber','#ffb347'], |
| 7290 | ['ice','#8be9fd'],['crimson','#ff5d7a'],['neon','#b8ff4d'],['rose','#ff9ed1'], |
| 7291 | ['ocean','#4fd8c8'],['sunset','#ff8c42'],['slate','#8b9bb4'],['ghost','#e8edf5'], |
| 7292 | ['violet','#b57cff'],['ruby','#ff4d6d'],['forest','#35c759'],['midnight','#5aa9ff'] |
| 7293 | ]; |
| 7294 | |
| 7295 | function renderThemeSwatches(selected) { |
| 7296 | var host = document.getElementById('themeSwatches'); |
| 7297 | if (!host) return; |
| 7298 | host.innerHTML = THEME_SWATCHES.map(function(item){ |
no test coverage detected