Skip to content

fix: 区分分类锁定开关的锁定/未锁定状态颜色#118

Merged
AmintaCCCP merged 2 commits intomainfrom
fix/category-lock-toggle-colors
Apr 27, 2026
Merged

fix: 区分分类锁定开关的锁定/未锁定状态颜色#118
AmintaCCCP merged 2 commits intomainfrom
fix/category-lock-toggle-colors

Conversation

@AmintaCCCP
Copy link
Copy Markdown
Owner

@AmintaCCCP AmintaCCCP commented Apr 27, 2026

Summary

  • 修复分类锁定开关在暗色模式下未锁定状态颜色不明显的问题
  • 未锁定状态:暗色模式下使用 gray-600(深灰色)
  • 锁定状态:保持 status-amber(琥珀色)

Test plan

  • 在亮色模式下验证未锁定(灰色)和锁定(琥珀色)状态可区分
  • 在暗色模式下验证未锁定(深灰色)和锁定(琥珀色)状态可区分

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Improved the category lock toggle appearance in dark mode for better contrast and readability.
    • Updated the toggle’s checked color to the primary brand violet for clearer state indication.
    • Visual-only change; toggle behavior and functionality remain unchanged.

未锁定状态在暗色模式下使用深灰色(gray-600),锁定状态使用琥珀色(status-amber),使两种状态在明暗两种主题下都有明显区分。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f1a04dd-867c-4845-bb37-622bfc7cbfce

📥 Commits

Reviewing files that changed from the base of the PR and between a63fe84 and 2ecc55e.

📒 Files selected for processing (1)
  • src/components/RepositoryEditModal.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/components/RepositoryEditModal.tsx

📝 Walkthrough

Walkthrough

Updated switch track styling in the RepositoryEditModal component: the dark-mode background changed from dark:bg-white/10 to dark:bg-gray-600, and the checked state color changed from peer-checked:bg-status-amber to peer-checked:bg-brand-violet. No logic or behavior changes.

Changes

Cohort / File(s) Summary
Switch/Styling
src/components/RepositoryEditModal.tsx
Changed switch track dark-mode class from dark:bg-white/10 to dark:bg-gray-600 and updated checked-state class from peer-checked:bg-status-amber to peer-checked:bg-brand-violet.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 I nudged a toggle in the night,
From pale white mist to steady gray—
Now violet gleams when checked just right,
A tiny tweak to brighten the way. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: distinguishing locked/unlocked state colors in the category lock toggle, which aligns with the color adjustments made in RepositoryEditModal.tsx.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/category-lock-toggle-colors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

开启状态改为 brand-violet,与"AI 自动分类"等高亮按钮颜色一致。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@AmintaCCCP AmintaCCCP merged commit 8c0ef99 into main Apr 27, 2026
5 checks passed
@AmintaCCCP AmintaCCCP mentioned this pull request Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant