+
@@ -9109,8 +9109,6 @@ ${vpnBadgeTopo}
}
function setBwPreset(downMbps, upMbps) {
- if ($('inputRateDown')) $('inputRateDown').value = downMbps;
- if ($('selectRateDownUnit')) $('selectRateDownUnit').value = 'Mbps';
if ($('inputRateUp')) $('inputRateUp').value = upMbps;
if ($('selectRateUpUnit')) $('selectRateUpUnit').value = 'Mbps';
}
@@ -14476,11 +14474,27 @@ ${vpnBadgeTopo}
if (iframe) iframe.src = '';
};
+ const GAME_DIMENSIONS = {
+ tetris: { maxWidth: '490px', height: '520px' },
+ dino: { maxWidth: '690px', height: '360px' },
+ zipline: { maxWidth: '470px', height: '500px' },
+ demineur: { maxWidth: '560px', height: '530px' },
+ pacman: { maxWidth: '460px', height: '510px' },
+ spaceinvaders: { maxWidth: '550px', height: '540px' },
+ '2048': { maxWidth: '440px', height: '500px' }
+ };
+
window.switchEasterEggGame = function (gameName) {
currentEasterEggGame = gameName;
const validGames = ['tetris', 'dino', 'zipline', 'demineur', 'pacman', 'spaceinvaders', '2048'];
if (!validGames.includes(gameName)) gameName = 'tetris';
+ const dim = GAME_DIMENSIONS[gameName] || GAME_DIMENSIONS.tetris;
+ const card = $('modalEasterEggCard') || document.querySelector('#modalEasterEggGames .modal-card');
+ if (card) {
+ card.style.maxWidth = dim.maxWidth;
+ }
+
document.querySelectorAll('.game-switch-btn').forEach(btn => {
const isActive = (btn.id === 'btnEggGame_' + gameName);
btn.classList.toggle('active', isActive);
@@ -14501,6 +14515,7 @@ ${vpnBadgeTopo}
const iframe = $('easterEggGameIframe');
if (iframe) {
+ iframe.style.height = dim.height;
const activeTheme = document.documentElement.dataset.theme || 'dark';
const activeMacosMode = document.documentElement.dataset.macosMode || '';
const activeLang = (typeof currentLanguage !== 'undefined' ? currentLanguage : (document.documentElement.lang || 'fr'));