移除返回旧版入口和相关代码

This commit is contained in:
eafonyang
2026-08-17 14:56:42 +08:00
parent 8ca8128e2b
commit fac0dc0c19
8 changed files with 30 additions and 18 deletions
+6 -2
View File
@@ -1,10 +1,14 @@
# What's New
> This document records feature updates and bug fixes for the Luxsin X9 controller. A new entry is appended here after each release.
> This document records feature updates and bug fixes for the Luxsin X9 controller. Entries are listed in reverse chronological order — the newest release appears first.
## v2026.08.17
### Changes
- Removed the "Legacy version" entry from the home page. The legacy Web UI is no longer being updated or maintained — please use this new Web UI for the best experience.
## v2026.08.06
### New Features
- Added a "What's New" entry on the home page, allowing you to view release notes online.
- Added Undo support on the EQ page: tap the Undo button to revert your most recent change. It covers band parameter edits (frequency / gain / Q / filter type), slider drag adjustments, preamp and auto-preamp changes, A/B mode copy & switch, and batch edits. Each undo shows a toast describing exactly what was reverted (e.g. "A Band 3 GAIN +2.0 → 0.0").
-1
View File
@@ -31,7 +31,6 @@
"powerOffToastDemo": "Demomodus: Vom Gerät getrennt.",
"powerOffToastSent": "Abschaltbefehl gesendet.",
"doubleClickHint": "Doppelklick zum Eintreten",
"backToLegacy": "Alte Version",
"changelog": "Neuerungen",
"changelogLoadFailed": "Laden fehlgeschlagen, bitte später erneut versuchen"
},
-1
View File
@@ -31,7 +31,6 @@
"powerOffToastDemo": "Demo mode: disconnected from the device.",
"powerOffToastSent": "Shutdown command sent.",
"doubleClickHint": "Double-click to enter",
"backToLegacy": "Legacy version",
"changelog": "What's New",
"changelogLoadFailed": "Failed to load, please try again later"
},
-1
View File
@@ -31,7 +31,6 @@
"powerOffToastDemo": "Modo demo: desconectado del dispositivo.",
"powerOffToastSent": "Comando de apagado enviado.",
"doubleClickHint": "Doble clic para entrar",
"backToLegacy": "Versión anterior",
"changelog": "Novedades",
"changelogLoadFailed": "Error al cargar, inténtelo de nuevo más tarde"
},
-1
View File
@@ -31,7 +31,6 @@
"powerOffToastDemo": "Mode démo : déconnecté de l'appareil.",
"powerOffToastSent": "Commande d'extinction envoyée.",
"doubleClickHint": "Double-clic pour entrer",
"backToLegacy": "Ancienne version",
"changelog": "Nouveautés",
"changelogLoadFailed": "Échec du chargement, veuillez réessayer plus tard"
},
-1
View File
@@ -31,7 +31,6 @@
"powerOffToastDemo": "演示模式:已中斷與裝置的連線",
"powerOffToastSent": "已傳送關機指令",
"doubleClickHint": "按兩下進入",
"backToLegacy": "返回舊版",
"changelog": "更新說明",
"changelogLoadFailed": "載入失敗,請稍後再試"
},
-1
View File
@@ -31,7 +31,6 @@
"powerOffToastDemo": "演示模式:已断开与设备的连接",
"powerOffToastSent": "已发送关机指令",
"doubleClickHint": "双击进入",
"backToLegacy": "返回旧版",
"changelog": "更新说明",
"changelogLoadFailed": "加载失败,请稍后重试"
},
+24 -10
View File
@@ -36,7 +36,6 @@ import {
Sliders,
Activity,
Gauge,
Undo2,
Bluetooth,
SkipBack,
SkipForward,
@@ -195,12 +194,35 @@ export default function Home() {
const [volumeConfirm, setVolumeConfirm] = useState<null | "min" | "max">(null);
const [easterEggActive, setEasterEggActive] = useState(false);
const [vuHeights, setVuHeights] = useState<number[]>(idleVuBarHeights);
/** 更新说明入口展示的最新版本号(取自 changelog.md 首个 "## v..." 标题) */
const [changelogVersion, setChangelogVersion] = useState<string | null>(null);
const jackProgressRef = useRef(0);
const jackResetTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
const eggRafRef = useRef<number | null>(null);
/** 下次三连击成功时播放的律动:1=旋律,2=海浪(各需单独三连击触发) */
const jackEggNextRef = useRef<1 | 2>(1);
// 拉取更新说明首个版本号,静默降级(失败则入口不显示版本)
useEffect(() => {
let cancelled = false;
fetch(`${import.meta.env.BASE_URL}changelog.md`)
.then((res) => {
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.text();
})
.then((text) => {
if (cancelled) return;
const m = text.match(/^##\s+(v[^\s#]+)\s*$/m);
if (m) setChangelogVersion(m[1]);
})
.catch(() => {
/* 静默:入口不显示版本号 */
});
return () => {
cancelled = true;
};
}, []);
const homeText = useMemo((): HomeLocale => {
if (!deviceState) return {} as HomeLocale;
const loc =
@@ -956,18 +978,10 @@ export default function Home() {
thumbnail={`${import.meta.env.BASE_URL}images/vu/vu${(ds.vu ?? 0) + 1}.png`}
onClick={() => setLocation("/vu")}
/>
<ListRow
icon={<Undo2 size={18} />}
label={homeText.backToLegacy ?? "返回旧版"}
onClick={() => {
const target = ip.trim();
if (!target) return;
window.location.href = `https://am.luxsinaudio.com/i.html?ip=${encodeURIComponent(target)}`;
}}
/>
<ListRow
icon={<BookOpenCheck size={18} />}
label={homeText.changelog ?? "更新说明"}
value={changelogVersion ?? undefined}
onClick={() => setLocation("/changelog")}
/>
</div>