Release 4.2.6+1: fix sidebar RU/EN and theme toggles — applyTheme param shadowed i18n t(), so init threw and click listeners never bound. Windows 4.2.6.1.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Navis
2026-08-02 10:21:52 +03:00
co-authored by Cursor
parent e633b63a9b
commit a1756715ef
12 changed files with 45 additions and 33 deletions
+2 -2
View File
@@ -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")
+4 -4
View File
@@ -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"
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+4 -4
View File
@@ -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"
}
+23 -11
View File
@@ -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", () => {
// 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() {
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -33,7 +33,7 @@
<Identity
Name="EvilFox.EvilFox"
Publisher="CN=EvilFox"
Version="4.2.5.1"
Version="4.2.6.1"
ProcessorArchitecture="x64" />
<Properties>
+4 -4
View File
@@ -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"
}
+4 -4
View File
@@ -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": {