feat(ui): redesign login page as two-column layout + rework sidebar (rant 2026-09-11, PR2) - #153
Merged
Merged
Conversation
Second step of the front-end adaptation to the new prototype (rant 2026-09-11T16:23:43, PR2 of the suggested rollout order: login page + sidebar). Login page (single centered card -> two-column split): - Left: brand narrative panel (.login-brand) with logo tile, eyebrow, serif headline "don't let your token plan go to waste", sub-copy, four selling-point chips, the gateway endpoint card (.gw) listing all three API types (OpenAI Chat / OpenAI Responses / Anthropic Messages) with their real routes, the vendor list, and the footer meta line - Right: form panel (.login-panel) with a login / register tab switcher (.auth-tabs) that reuses the EXISTING register flow via showAuthForm -- no new behaviour, the register, verify-code and forgot-password forms are all preserved and still reachable - Login-only extras (divider, guest entry, footer, tip) are grouped in #auth-login-extras and hidden when another auth form is shown, so the register fields no longer render below the guest button - Theme toggle added top-right (.login-theme, frosted glass), sharing one toggleTheme() helper with the sidebar button - Prototype-only demo content deliberately NOT implemented: no "any email/password works" footnote, no PROTOTYPE badge, no role switcher Sidebar: - Restructured to the prototype shell: .sb-brand (logo tile + title + role subtitle), nav, then .sb-foot (user chip + theme toggle + full-width logout) -- the theme toggle moves from the header into the footer - .nav-group is now the prototype's monospace uppercase group label - Marketplace nav item shows a model-count badge (.nav-count) sourced from the same data as the list (Live.models when signed in, guest catalogue otherwise) - nav item / user chip / avatar restyled to the prototype (34px avatar, accent-soft background, --fg-soft hover) Compatibility: - 12 new i18n keys added to both zh and en (login.title, login.tab.*, login.brand.*, login.gw.*, login.panel.sub); key parity verified 701/701 - Guest mode still works: setGuestSidebar() hides only the account controls, keeping the theme toggle reachable - Responsive: the brand panel collapses below 900px (prototype rule) and the endpoint cards stack below 560px - Dead rules from the old implementation removed (.logo, .sidebar-bottom, .sidebar-top) Gates: cargo test 148/148, cargo fmt --check, cargo clippy -D warnings, node --check on all ui/js files, CSS var integrity (0 undefined refs) and HTML tag balance. Rendered headless in both themes to confirm the layout.
This was referenced Sep 11, 2026
argszero
added a commit
that referenced
this pull request
Sep 11, 2026
发布 v0.7.21(rant 2026-09-11T21:03:06)。 - Cargo.toml / Cargo.lock: 0.7.20 → 0.7.21 - ui/index.html: cache-bust ?v=20260911-2 → ?v=20260911-3(5 处资源引用) - CHANGELOG.md: 新增 v0.7.21 条目,概括 6 片全站 UI 重设计 (#152 OKLCH 设计 token 层 / #153 登录页左右分栏 + 侧边栏 / #154 共享组件层 / #155 仪表盘·市场·共享 / #156 钱包·交易 / #157 设置·管理·运营) 本次为纯前端改动,后端契约未变;部署结构不变(数据库仍留 NAS,不启用 WAL)。 Gates: cargo test 148 passed / cargo fmt --check clean / cargo clippy clean / node --check x4 / i18n ZH-EN 762=762 exact parity. Co-authored-by: argszero <argszero@argszerodeMac-mini.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR2 of the front-end adaptation to the new high-fidelity prototype — login page redesign (single centered card → two-column split) + sidebar rework, per the rollout order suggested by the host's rant.
Rant addressed (verbatim quote of the relevant sections):
Rant timestamp:
2026-09-11T16:23:43.625143+08:00(projectaitokenpool).Changes
Login page — two-column layout
Left brand panel (
.login-brand): logo tile + wordmark, eyebrow line, serif headline, sub-copy, four selling-point chips, and the gateway endpoint card listing three API types with their real routes plus the vendor strip and footer meta.The three declared endpoints are accurate against the backend, not copied blindly:
src/gateway.rsregisters/v1/chat/completions,/v1/responses(P3-A) and/anthropic/v1/messages, so the three-row card is honest. (This matters because the rant explicitly warns about the settings page: 「需与后端实际支持的路由对齐后再定…没有则按实际能力呈现,勿虚标」.)Right form panel (
.login-panel): title, subtitle, and a login / register tab switcher. The tabs drive the existingshowAuthForm()function, so the register / verify-code / forgot-password flows are all preserved with zero behavioural change — the rant's hard requirement that 「这 4 个既有流程一个都不能丢」 is met. Login-only extras (divider / guest entry / footer / tip) live in#auth-login-extrasand hide when another form is showing.Theme toggle moved to the top-right as
.login-theme(frosted glass), sharing onetoggleTheme()helper with the sidebar button.Prototype demo content intentionally omitted: no "any email/password works" footnote, no
PROTOTYPEbadge, no role switcher.Sidebar
Restructured to the prototype shell —
.sb-brand→nav→.sb-foot(user chip + theme toggle + full-width logout). The theme toggle moves from the sidebar header into the footer, matching the prototype. Marketplace gains a model-count badge sourced from the same data as the list (Live.modelswhen signed in, guest catalogue otherwise). Nav items, user chip and avatar were restyled to the prototype (34px avatar,--accent-softbackground,--fg-softhover). The existing role-based filtering and shortcut-key hints are untouched.Compatibility & preserved behaviour
login.title,login.tab.login/register,login.brand.*,login.gw.*,login.panel.sub); key parity verified at 701/701 with no missing entries in either languagesetGuestSidebar()helper that hides only the account controls and keeps the theme toggle reachable (it used to live in the header).logo,.sidebar-bottom,.sidebar-top)Verification
cargo test— 148/148 passedcargo fmt --check/cargo clippy --all-targets -- -D warnings— cleannode --checkon allui/js/*.js— OKvar()references, balanced braces/parensdata-i18n*key inindex.htmlresolvesRemaining rant work
PR3 shared component layer · PR4 dashboard/market/sharing · PR5 wallet/transactions · PR6 settings/admin/ops.