Simplify strategy switch auth controls#12
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb00adc565
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <span class="pill ready auth-status" id="auth-status" hidden></span> | ||
| <a class="btn" id="login-link" href="/login" hidden data-i18n="login">登录</a> | ||
| <button class="btn" id="logout-button" type="button" hidden data-i18n="logout">退出</button> |
There was a problem hiding this comment.
The new auth controls rely on the hidden attribute, but these elements also match .pill/.btn, whose author CSS sets display: inline-flex; that can override the browser's [hidden] display rule, so the later *.hidden = ... toggles do not reliably hide them. In the static/GitHub Pages fallback this leaves Sign in/Sign out controls visible even though /api/session is unavailable, and on the Worker the inactive auth action can appear beside the active one. Add an explicit [hidden] { display: none !important; } rule or toggle a class that wins.
Useful? React with 👍 / 👎.
Summary
Tests