APmanageur Wi-Fi V1.0
This commit is contained in:
1 parent
f78e380236
commit
2b33e31589
4 files changed
+423
-119
No files matched your search
+52
-25
@@ -601,17 +601,31 @@
|
||||
}
|
||||
|
||||
/* Boutons de sélection de jeu Easter Egg */
|
||||
.game-switch-btn.active {
|
||||
background: var(--blue) !important;
|
||||
color: var(--blue-text, #071326) !important;
|
||||
button.game-switch-btn,
|
||||
.game-switch-btn {
|
||||
background: var(--panel2) !important;
|
||||
color: var(--text) !important;
|
||||
border: 1px solid var(--line) !important;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease !important;
|
||||
}
|
||||
button.game-switch-btn:hover,
|
||||
.game-switch-btn:hover {
|
||||
border-color: var(--blue) !important;
|
||||
color: var(--blue) !important;
|
||||
}
|
||||
html[data-theme] button.game-switch-btn.active,
|
||||
html button.game-switch-btn.active,
|
||||
button.game-switch-btn.active,
|
||||
.game-switch-btn.active {
|
||||
background: var(--blue, #007aff) !important;
|
||||
color: #ffffff !important;
|
||||
border-color: var(--blue, #007aff) !important;
|
||||
box-shadow: 0 0 14px rgba(92, 167, 255, 0.45) !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
html[data-theme="light"] .game-switch-btn.active,
|
||||
html[data-theme="winxp"] .game-switch-btn.active,
|
||||
html[data-theme="macos"][data-macos-mode="light"] .game-switch-btn.active,
|
||||
html[data-theme="macos"]:not([data-macos-mode="dark"]) .game-switch-btn.active {
|
||||
background: var(--blue) !important;
|
||||
html[data-theme] button.game-switch-btn.active span,
|
||||
button.game-switch-btn.active span {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
@@ -6275,14 +6289,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="display:flex;align-items:center;gap:6px;flex-wrap:wrap">
|
||||
<button type="button" id="btnEggGame_tetris" class="secondary game-switch-btn active" onclick="switchEasterEggGame('tetris')" style="padding:5px 12px;font-size:12px;border-radius:6px;display:inline-flex;align-items:center;gap:4px">🧱 <span>Tetris</span></button>
|
||||
<button type="button" id="btnEggGame_dino" class="secondary game-switch-btn" onclick="switchEasterEggGame('dino')" style="padding:5px 12px;font-size:12px;border-radius:6px;display:inline-flex;align-items:center;gap:4px">🦖 <span>Dino T-Rex</span></button>
|
||||
<button type="button" id="btnEggGame_zipline" class="secondary game-switch-btn" onclick="switchEasterEggGame('zipline')" style="padding:5px 12px;font-size:12px;border-radius:6px;display:inline-flex;align-items:center;gap:4px">⚡ <span>Zip (LinkedIn)</span></button>
|
||||
<button type="button" id="btnEggGame_tetris" class="game-switch-btn active" onclick="switchEasterEggGame('tetris')" style="padding:5px 12px;font-size:12px;border-radius:6px;display:inline-flex;align-items:center;gap:4px">🧱 <span>Tetris</span></button>
|
||||
<button type="button" id="btnEggGame_dino" class="game-switch-btn" onclick="switchEasterEggGame('dino')" style="padding:5px 12px;font-size:12px;border-radius:6px;display:inline-flex;align-items:center;gap:4px">🦖 <span>Dino T-Rex</span></button>
|
||||
<button type="button" id="btnEggGame_zipline" class="game-switch-btn" onclick="switchEasterEggGame('zipline')" style="padding:5px 12px;font-size:12px;border-radius:6px;display:inline-flex;align-items:center;gap:4px">⚡ <span>Zip (LinkedIn)</span></button>
|
||||
<button type="button" class="secondary" style="padding:4px 10px;font-size:16px;margin-left:4px" onclick="closeEasterEggModal()" title="Fermer (Échap)">✕</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body" style="padding:0;flex:1;background:#071326;display:flex;justify-content:center;align-items:center;min-height:560px">
|
||||
<iframe id="easterEggGameIframe" src="" style="width:100%;height:580px;border:0;display:block" title="Easter Egg Game" allow="autoplay"></iframe>
|
||||
<div class="modal-body" style="padding:0;flex:1;background:var(--bg,#071326);display:flex;justify-content:center;align-items:center;min-height:640px">
|
||||
<iframe id="easterEggGameIframe" src="" style="width:100%;height:640px;border:0;display:block" title="Easter Egg Game" allow="autoplay"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -9123,12 +9137,6 @@ ${vpnBadgeTopo}
|
||||
const pct = qBytes > 0 ? Math.min(100, Math.round((usageBytes / qBytes) * 100)) : 0;
|
||||
const remaining = Math.max(0, qBytes - usageBytes);
|
||||
|
||||
if ($('quotaExceededBadge')) $('quotaExceededBadge').style.display = exceeded ? 'inline-block' : 'none';
|
||||
|
||||
if ($('quotaUsageLabel')) {
|
||||
$('quotaUsageLabel').textContent = `${usageStr} / ${formatBytes(qBytes)} (${pct}%)`;
|
||||
$('quotaUsageLabel').style.color = exceeded ? 'var(--red)' : (pct >= 85 ? '#f59e0b' : 'var(--text)');
|
||||
}
|
||||
if ($('quotaUsageBar')) {
|
||||
$('quotaUsageBar').style.width = `${pct}%`;
|
||||
$('quotaUsageBar').style.background = exceeded ? 'var(--red)' : (pct >= 85 ? '#f59e0b' : 'var(--blue)');
|
||||
@@ -14463,13 +14471,29 @@ ${vpnBadgeTopo}
|
||||
document.querySelectorAll('.game-switch-btn').forEach(btn => {
|
||||
const isActive = (btn.id === 'btnEggGame_' + gameName);
|
||||
btn.classList.toggle('active', isActive);
|
||||
if (isActive) {
|
||||
btn.style.setProperty('background', 'var(--blue)', 'important');
|
||||
btn.style.setProperty('color', '#ffffff', 'important');
|
||||
btn.style.setProperty('border-color', 'var(--blue)', 'important');
|
||||
btn.style.setProperty('box-shadow', '0 0 14px rgba(92,167,255,0.45)', 'important');
|
||||
btn.style.setProperty('font-weight', '700', 'important');
|
||||
} else {
|
||||
btn.style.removeProperty('background');
|
||||
btn.style.removeProperty('color');
|
||||
btn.style.removeProperty('border-color');
|
||||
btn.style.removeProperty('box-shadow');
|
||||
btn.style.removeProperty('font-weight');
|
||||
}
|
||||
});
|
||||
|
||||
const iframe = $('easterEggGameIframe');
|
||||
if (iframe) {
|
||||
const activeTheme = document.documentElement.dataset.theme || 'dark';
|
||||
const activeMacosMode = document.documentElement.dataset.macosMode || '';
|
||||
const themeQuery = '?theme=' + encodeURIComponent(activeTheme) + (activeMacosMode ? '&macosMode=' + encodeURIComponent(activeMacosMode) : '');
|
||||
const activeLang = (typeof currentLanguage !== 'undefined' ? currentLanguage : (document.documentElement.lang || 'fr'));
|
||||
const themeQuery = '?theme=' + encodeURIComponent(activeTheme) +
|
||||
(activeMacosMode ? '&macosMode=' + encodeURIComponent(activeMacosMode) : '') +
|
||||
'&lang=' + encodeURIComponent(activeLang);
|
||||
iframe.src = '/jeux/' + gameName + '.html' + themeQuery;
|
||||
setTimeout(() => {
|
||||
try { iframe.focus(); if (iframe.contentWindow) iframe.contentWindow.focus(); } catch (e) { }
|
||||
@@ -14479,14 +14503,17 @@ ${vpnBadgeTopo}
|
||||
|
||||
function parseEasterEggGameName(rawVal) {
|
||||
if (!rawVal || typeof rawVal !== 'string') return null;
|
||||
const clean = rawVal.trim();
|
||||
const m = clean.match(/^jeu\s*:\s*(.*)$/i) || (clean.toLowerCase() === 'jeu' ? ['', 'tetris'] : null);
|
||||
const clean = rawVal.trim().toLowerCase();
|
||||
if (clean === 'jeu' || clean === 'game' || clean === 'arcade' || clean === 'easteregg' || clean === 'easter egg') {
|
||||
return 'tetris';
|
||||
}
|
||||
const m = clean.match(/^(?:jeu|game|arcade)\s*:\s*(.*)$/i);
|
||||
if (!m) return null;
|
||||
let g = (m[1] || 'tetris').trim().toLowerCase();
|
||||
if (g === 'dinausore' || g === 'dinosaure' || g === 'trex' || g === 't-rex' || g === 'chrome') return 'dino';
|
||||
if (g === 'dino' || g === 'dinausore' || g === 'dinosaure' || g === 'trex' || g === 't-rex' || g === 'chrome' || g === 'runner') return 'dino';
|
||||
if (g === 'zip' || g === 'zipline' || g === 'linkedin') return 'zipline';
|
||||
if (g === 'tetris' || g === '') return 'tetris';
|
||||
return g;
|
||||
if (g === 'tetris' || g === 'brique' || g === 'bricks' || g === '') return 'tetris';
|
||||
return 'tetris';
|
||||
}
|
||||
|
||||
function attachEasterEggTrigger(inputEl) {
|
||||
|
||||
Reference in new issue
Block a user