-
Notifications
You must be signed in to change notification settings - Fork 11.2k
fix: improve text visibility in warning box for dark mode in SettingsLog #1974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -106,20 +106,21 @@ export default function SettingsLog(props) { | |||||||||||||||||||||
| <Text type="tertiary"> ({t('约')} {daysDiff} {t('天前')})</Text> | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
| </p> | ||||||||||||||||||||||
| <div style={{ | ||||||||||||||||||||||
| background: '#fff7e6', | ||||||||||||||||||||||
| border: '1px solid #ffd591', | ||||||||||||||||||||||
| padding: '12px', | ||||||||||||||||||||||
| <div style={{ | ||||||||||||||||||||||
| background: '#fff7e6', | ||||||||||||||||||||||
| border: '1px solid #ffd591', | ||||||||||||||||||||||
| padding: '12px', | ||||||||||||||||||||||
| borderRadius: '4px', | ||||||||||||||||||||||
| marginTop: '12px' | ||||||||||||||||||||||
| marginTop: '12px', | ||||||||||||||||||||||
| color: '#333' | ||||||||||||||||||||||
| }}> | ||||||||||||||||||||||
| <Text type="warning" strong>⚠️ {t('注意')}:</Text> | ||||||||||||||||||||||
| <Text>{t('将删除')} </Text> | ||||||||||||||||||||||
| <Text strong type="danger">{targetTime}</Text> | ||||||||||||||||||||||
| <Text strong style={{ color: '#d46b08' }}>⚠️ {t('注意')}:</Text> | ||||||||||||||||||||||
| <Text style={{ color: '#333' }}>{t('将删除')} </Text> | ||||||||||||||||||||||
| <Text strong style={{ color: '#cf1322' }}>{targetTime}</Text> | ||||||||||||||||||||||
| {daysDiff > 0 && ( | ||||||||||||||||||||||
| <Text type="tertiary"> ({t('约')} {daysDiff} {t('天前')})</Text> | ||||||||||||||||||||||
| <Text style={{ color: '#8c8c8c' }}> ({t('约')} {daysDiff} {t('天前')})</Text> | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
| <Text> {t('之前的所有日志')}</Text> | ||||||||||||||||||||||
| <Text style={{ color: '#333' }}> {t('之前的所有日志')}</Text> | ||||||||||||||||||||||
|
Comment on lines
120
to
+123
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential accessibility issue: Light gray may have insufficient contrast. The light gray color Consider using a darker gray (e.g., Apply this diff to use a darker, more accessible gray: - <Text style={{ color: '#8c8c8c' }}> ({t('约')} {daysDiff} {t('天前')})</Text>
+ <Text style={{ color: '#666' }}> ({t('约')} {daysDiff} {t('天前')})</Text>Note: The verification script in the previous comment will confirm the actual contrast ratios. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| <p style={{ marginTop: '12px' }}> | ||||||||||||||||||||||
| <Text type="danger">{t('此操作不可恢复,请仔细确认时间后再操作!')}</Text> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify color contrast ratios meet WCAG AA standards.
The explicit colors solve the dark mode visibility issue. Please verify the contrast ratios:
#d46b08on#fff7e6#cf1322on#fff7e6Both should meet WCAG AA (4.5:1 for normal text, 3:1 for large text).
🏁 Script executed:
Length of output: 574
Adjust warning text color for WCAG AA compliance
Orange
#d46b08on#fff7e6yields 3.34:1 (fails 4.5:1 normal-text contrast; only meets 3:1 large-text). Use a darker shade or ensure it’s ≥18pt bold. Red#cf1322(5.23:1) is fine.🤖 Prompt for AI Agents