mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
feat(webui): rebuild console with tabbed pages
Replace the single-file frontend (app.js, styles.css) with a multi-file ES module structure served from go:embed, and reorganize the 13 pages into 8 tabbed pages under 4 navigation groups: runtime (overview, diagnostics), integrations (access guide, API keys), models (quotas, rotation), and system (configuration, account). The redesign adopts a monochrome light/dark design system driven by prefers-color-scheme, replaces prompt()/confirm() flows with in-page dialogs, and keeps every management API call and deep link (old hashes alias to the new pages). Behavior changes: the log SSE connection now spans the whole console session and buffers while the stream tab is hidden; quota polling runs only while its tab is active; the first-run checklist appears on the overview page and hides once ready. Also fixes a crash on the rotation page: the persisted state serializes empty orders and maps as JSON null, which is now normalized before rendering, with the same defensive handling in the quota and API key pages. CI now syntax-checks the ES modules via node --input-type=module, and the README structure notes are updated.
This commit is contained in:
26 files changed
+4098
-3297
No files matched your search
@@ -53,6 +53,10 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
- name: Check WebUI syntax
|
||||
run: node --check webui/app.js
|
||||
shell: bash
|
||||
run: |
|
||||
for f in webui/js/*.js webui/js/pages/*.js; do
|
||||
node --input-type=module --check < "$f" || { echo "syntax error: $f" >&2; exit 1; }
|
||||
done
|
||||
- name: Check container entrypoint syntax
|
||||
run: sh -n docker-entrypoint.sh
|
||||
Reference in new issue
Block a user