diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index 94057b9..27315f8 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -13,8 +13,8 @@ android { minSdk = 26 targetSdk = 35 // versionCode = major*1_000_000 + minor*10_000 + patch*100 + build - versionCode = 4_025_001 - versionName = "4.2.5+1" + versionCode = 4_026_001 + versionName = "4.2.6+1" vectorDrawables.useSupportLibrary = true ndk { abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86_64") diff --git a/dist/navis-release/update.json b/dist/navis-release/update.json index 4a0134a..4512095 100644 --- a/dist/navis-release/update.json +++ b/dist/navis-release/update.json @@ -1,11 +1,11 @@ { - "version": "4.2.5", - "notes": "4.2.5: переключатель языка Русский / English (localStorage navis.lang, по умолчанию RU); все строки UI и динамические подписи серверов", + "version": "4.2.6", + "notes": "4.2.6: fix sidebar RU/EN and theme toggles — applyTheme param shadowed i18n t(), so init threw and click listeners never bound", "platform": "windows-amd64", "os": "windows", "arch": "amd64", "url": "https://git.de4ima.uk/Evilfox/navi/raw/branch/Windows/dist/navis-release/windows/EvilFox.exe", - "sha256": "fb8bf0fb98662601235ca6e33ba51f9aaf2a1602f3177c602adb8023161bcd90", + "sha256": "843fd62f7fe0ae09261322fb90d7f281a48472b78e6a9c543b6a9637fe1cc83e", "mandatory": false, "platforms": { "android": { @@ -40,7 +40,7 @@ }, "windows-amd64": { "url": "https://git.de4ima.uk/Evilfox/navi/raw/branch/Windows/dist/navis-release/windows/EvilFox.exe", - "sha256": "fb8bf0fb98662601235ca6e33ba51f9aaf2a1602f3177c602adb8023161bcd90", + "sha256": "843fd62f7fe0ae09261322fb90d7f281a48472b78e6a9c543b6a9637fe1cc83e", "os": "windows", "arch": "amd64" } diff --git a/dist/navis-release/windows/EvilFox.exe b/dist/navis-release/windows/EvilFox.exe index 3c3c0bb..91171a8 100644 Binary files a/dist/navis-release/windows/EvilFox.exe and b/dist/navis-release/windows/EvilFox.exe differ diff --git a/dist/navis-release/windows/Navis.exe b/dist/navis-release/windows/Navis.exe index 3c3c0bb..91171a8 100644 Binary files a/dist/navis-release/windows/Navis.exe and b/dist/navis-release/windows/Navis.exe differ diff --git a/dist/navis-release/windows/evilfox-cli.exe b/dist/navis-release/windows/evilfox-cli.exe index eea0495..46b15d8 100644 Binary files a/dist/navis-release/windows/evilfox-cli.exe and b/dist/navis-release/windows/evilfox-cli.exe differ diff --git a/dist/navis-release/windows/vpnclient.exe b/dist/navis-release/windows/vpnclient.exe index eea0495..46b15d8 100644 Binary files a/dist/navis-release/windows/vpnclient.exe and b/dist/navis-release/windows/vpnclient.exe differ diff --git a/dist/update.json b/dist/update.json index 4a0134a..4512095 100644 --- a/dist/update.json +++ b/dist/update.json @@ -1,11 +1,11 @@ { - "version": "4.2.5", - "notes": "4.2.5: переключатель языка Русский / English (localStorage navis.lang, по умолчанию RU); все строки UI и динамические подписи серверов", + "version": "4.2.6", + "notes": "4.2.6: fix sidebar RU/EN and theme toggles — applyTheme param shadowed i18n t(), so init threw and click listeners never bound", "platform": "windows-amd64", "os": "windows", "arch": "amd64", "url": "https://git.de4ima.uk/Evilfox/navi/raw/branch/Windows/dist/navis-release/windows/EvilFox.exe", - "sha256": "fb8bf0fb98662601235ca6e33ba51f9aaf2a1602f3177c602adb8023161bcd90", + "sha256": "843fd62f7fe0ae09261322fb90d7f281a48472b78e6a9c543b6a9637fe1cc83e", "mandatory": false, "platforms": { "android": { @@ -40,7 +40,7 @@ }, "windows-amd64": { "url": "https://git.de4ima.uk/Evilfox/navi/raw/branch/Windows/dist/navis-release/windows/EvilFox.exe", - "sha256": "fb8bf0fb98662601235ca6e33ba51f9aaf2a1602f3177c602adb8023161bcd90", + "sha256": "843fd62f7fe0ae09261322fb90d7f281a48472b78e6a9c543b6a9637fe1cc83e", "os": "windows", "arch": "amd64" } diff --git a/internal/appui/index.html b/internal/appui/index.html index a3fbb55..1fabf26 100644 --- a/internal/appui/index.html +++ b/internal/appui/index.html @@ -2440,8 +2440,10 @@ } catch (_) {} return "light"; } - function applyTheme(t) { - const theme = t === "dark" ? "dark" : "light"; + // Param must not be named `t` — that shadows the i18n helper and throws on title update, + // aborting script init so theme/lang click listeners never bind (4.2.5 regression). + function applyTheme(next) { + const theme = next === "dark" ? "dark" : "light"; document.documentElement.setAttribute("data-theme", theme); try { localStorage.setItem(THEME_KEY, theme); } catch (_) {} if (themeToggle) { @@ -2451,24 +2453,34 @@ if (themeSwitch) themeSwitch.checked = theme === "dark"; } applyTheme(document.documentElement.getAttribute("data-theme") || readTheme()); - if (themeToggle) { - themeToggle.addEventListener("click", () => { - const cur = document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light"; - applyTheme(cur === "dark" ? "light" : "dark"); + // Event delegation on stable parents (survives future re-renders; not disabled by busy). + const sideFoot = document.querySelector(".side-foot"); + if (sideFoot) { + sideFoot.addEventListener("click", (e) => { + const langBtn = e.target.closest("button[data-lang]"); + if (langBtn && sideFoot.contains(langBtn)) { + setLang(langBtn.getAttribute("data-lang")); + return; + } + const themeBtn = e.target.closest("#themeToggle, .theme-toggle"); + if (themeBtn && sideFoot.contains(themeBtn)) { + const cur = document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light"; + applyTheme(cur === "dark" ? "light" : "dark"); + } }); } if (themeSwitch) { themeSwitch.addEventListener("change", () => applyTheme(themeSwitch.checked ? "dark" : "light")); } - - function wireLangSeg(root) { - if (!root) return; - root.querySelectorAll("button[data-lang]").forEach((b) => { - b.addEventListener("click", () => setLang(b.getAttribute("data-lang"))); + const langSegSettings = $("langSegSettings"); + if (langSegSettings) { + langSegSettings.addEventListener("click", (e) => { + const langBtn = e.target.closest("button[data-lang]"); + if (langBtn && langSegSettings.contains(langBtn)) { + setLang(langBtn.getAttribute("data-lang")); + } }); } - wireLangSeg($("langSeg")); - wireLangSeg($("langSegSettings")); applyTranslations(); function skippedVersion() { diff --git a/internal/update/update.go b/internal/update/update.go index 4eed290..a5a4378 100644 --- a/internal/update/update.go +++ b/internal/update/update.go @@ -18,7 +18,7 @@ import ( // CurrentVersion is the product/semver used for update eligibility (feed "version"). // Keep major.minor.patch only — no build suffix here. -const CurrentVersion = "4.2.5" +const CurrentVersion = "4.2.6" // BuildNumber is the monotonic build within CurrentVersion (Windows FileVersion 4th part, // macOS CFBundleVersion suffix, Android versionCode low digits). Bump on every release build. diff --git a/packaging/msix/AppxManifest.xml b/packaging/msix/AppxManifest.xml index 894af25..2b1832a 100644 --- a/packaging/msix/AppxManifest.xml +++ b/packaging/msix/AppxManifest.xml @@ -33,7 +33,7 @@ diff --git a/server/update.json b/server/update.json index 4a0134a..4512095 100644 --- a/server/update.json +++ b/server/update.json @@ -1,11 +1,11 @@ { - "version": "4.2.5", - "notes": "4.2.5: переключатель языка Русский / English (localStorage navis.lang, по умолчанию RU); все строки UI и динамические подписи серверов", + "version": "4.2.6", + "notes": "4.2.6: fix sidebar RU/EN and theme toggles — applyTheme param shadowed i18n t(), so init threw and click listeners never bound", "platform": "windows-amd64", "os": "windows", "arch": "amd64", "url": "https://git.de4ima.uk/Evilfox/navi/raw/branch/Windows/dist/navis-release/windows/EvilFox.exe", - "sha256": "fb8bf0fb98662601235ca6e33ba51f9aaf2a1602f3177c602adb8023161bcd90", + "sha256": "843fd62f7fe0ae09261322fb90d7f281a48472b78e6a9c543b6a9637fe1cc83e", "mandatory": false, "platforms": { "android": { @@ -40,7 +40,7 @@ }, "windows-amd64": { "url": "https://git.de4ima.uk/Evilfox/navi/raw/branch/Windows/dist/navis-release/windows/EvilFox.exe", - "sha256": "fb8bf0fb98662601235ca6e33ba51f9aaf2a1602f3177c602adb8023161bcd90", + "sha256": "843fd62f7fe0ae09261322fb90d7f281a48472b78e6a9c543b6a9637fe1cc83e", "os": "windows", "arch": "amd64" } diff --git a/versioninfo.json b/versioninfo.json index a5b024e..bcab3f5 100644 --- a/versioninfo.json +++ b/versioninfo.json @@ -1,7 +1,7 @@ { "FixedFileInfo": { - "FileVersion": { "Major": 4, "Minor": 2, "Patch": 5, "Build": 1 }, - "ProductVersion": { "Major": 4, "Minor": 2, "Patch": 5, "Build": 1 }, + "FileVersion": { "Major": 4, "Minor": 2, "Patch": 6, "Build": 1 }, + "ProductVersion": { "Major": 4, "Minor": 2, "Patch": 6, "Build": 1 }, "FileFlagsMask": "3f", "FileFlags": "00", "FileOS": "40004", @@ -11,12 +11,12 @@ "StringFileInfo": { "CompanyName": "EvilFox", "FileDescription": "EvilFox — VPN client (Naive / Hy2 / AWG / VLESS / VMess / Trojan)", - "FileVersion": "4.2.5.1", + "FileVersion": "4.2.6.1", "InternalName": "EvilFox", "LegalCopyright": "Copyright (c) EvilFox", "OriginalFilename": "EvilFox.exe", "ProductName": "EvilFox", - "ProductVersion": "4.2.5.1", + "ProductVersion": "4.2.6.1", "Comments": "Open-source VPN/proxy client. https://evilfox.win/" }, "VarFileInfo": {