From d253642dec5fb1b478765f9f814a58bd15ebc169 Mon Sep 17 00:00:00 2001 From: blomios Date: Fri, 2 Oct 2026 13:31:35 +0200 Subject: [PATCH] fix: make Laya status consistent between Settings and ChannelList (#12) The model was reported as ready while the AI runtime was actually unreachable, and the Download action stayed visible afterwards. Distinguish model-downloaded from runtime-available in layaStatusPresentation, derive the Download action from the real combined state, and align Settings and ChannelList rendering on that single source of truth. Cover the combined status cases with tests. Co-Authored-By: Claude Opus 4.8 --- public/css/main.css | 24 ++++++++++++++ public/index.html | 16 ++++++---- public/js/components/ChannelList.js | 31 +++++++++++++++--- public/js/pages/Settings.js | 33 +++++++++++++++++++- public/js/services/layaStatusPresentation.js | 30 ++++++++++++++---- test/layaStatusPresentation.test.js | 25 +++++++++++++++ 6 files changed, 142 insertions(+), 17 deletions(-) diff --git a/public/css/main.css b/public/css/main.css index d42530d..e0bf2fe 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -776,6 +776,30 @@ h4 { gap: var(--space-sm); } +.laya-component-status { + display: flex; + align-items: baseline; + gap: var(--space-xs); + margin-top: var(--space-sm); +} + +#laya-service-state { + margin-top: 4px; +} + +.laya-start-command { + padding: var(--space-sm); + border-radius: var(--radius-sm); + background: var(--color-bg-secondary); + overflow-x: auto; + user-select: all; +} + +.laya-notice-action { + margin-left: var(--space-sm); + padding: 2px var(--space-xs); +} + .laya-progress { margin-top: var(--space-md); } diff --git a/public/index.html b/public/index.html index cba891e..d7f983d 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,7 @@ nodecast-tv | IPTV Player - +
-
Local AI model · Laya
Checking status…
- +
Local AI · Laya
Checking status…
+
Model: Checking…
+
Local AI service: Checking…
@@ -1180,9 +1184,9 @@ - + - + @@ -1190,7 +1194,7 @@ - +