SAML2 Login Dark mode
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 86/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 领域
- authentication, design, frontend
调研方向
从 static/less/auth.less 开始,该文件为 Django 渲染的身份验证界面提供样式,并将现有的浅色模式选择器与 issue 中显示的深色模式行为进行比较。在其中实现 prefers-color-scheme 规则,然后运行相关的前端或资源构建检查,并在浏览器设置为深色模式时验证身份验证界面。
由索引模型根据 Issue 内容生成。
描述
Problem Statement
It would be great to have a Dark mode for this screen, as it is a jarring experience for users using Dark mode.
Solution Brainstorm
As a test you can inject this chrome snippet to see what it could look like
const style = document.createElement('style');
style.textContent = `
@media (prefers-color-scheme: dark) {
body.auth {
background: #24202b;
color: #e9e5eb;
}
body.auth a {
color: #a396e8;
}
body.auth .pattern-bg {
background-color: #24202b;
opacity: 0.1;
}
body.auth .box {
background: #2f2937;
border-color: #453e4f;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
body.auth .box .box-header {
background: #39323f;
color: #e9e5eb;
border-bottom-color: #453e4f;
}
body.auth .auth-container.border-bottom {
border-bottom-color: #453e4f;
}
body.auth .auth-provider-column {
border-left-color: #453e4f;
}
body.auth .auth-container .help-center-link {
color: #a396e8;
}
body.auth .auth-footer .secondary {
color: #b5b0bd;
}
body.auth .auth-footer .secondary:hover {
color: #e9e5eb;
}
body.auth .nav-tabs > li > a {
color: #b5b0bd;
}
body.auth .nav-tabs > li > a:hover,
body.auth .nav-tabs > li > a:active,
body.auth .nav-tabs > li > a:focus {
color: #e9e5eb;
}
body.auth .nav-tabs > li.active a,
body.auth .nav-tabs > li.active a:hover,
body.auth .nav-tabs > li.active a:focus {
color: #e9e5eb;
}
body.auth .form-control {
background: #24202b;
border-color: #453e4f;
color: #e9e5eb;
box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.12);
}
body.auth .form-control::placeholder {
color: #b5b0bd;
}
body.auth .form-control:focus {
border-color: #6c5fc7;
box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.12), 0 0 6px rgba(108, 95, 199, 0.5);
}
body.auth .form-control:-webkit-autofill,
body.auth .form-control:-webkit-autofill:hover,
body.auth .form-control:-webkit-autofill:focus {
-webkit-text-fill-color: #e9e5eb;
box-shadow: inset 0 0 0 1000px #24202b;
caret-color: #e9e5eb;
}
body.auth .help-block {
color: #b5b0bd;
}
body.auth .btn-default {
color: #e9e5eb;
background: #39323f;
border-color: #453e4f;
}
body.auth .btn-default:hover {
color: #e9e5eb;
background: #413a48;
border-color: #51495d;
}
body.auth .btn-default:hover:active,
body.auth .btn-default:focus,
body.auth .btn-default:active,
body.auth .btn-default.active,
body.auth .btn-default.active:hover {
color: #e9e5eb;
background: #342e3a;
border-color: #51495d;
}
body.auth .provider-logo.github,
body.auth .provider-logo.rippling {
filter: invert(1);
}
body.auth .alert-danger {
background: #3b2733;
border-color: #6b3a44;
color: #f3b0b5;
}
body.auth .error,
body.auth .has-error .help-block,
body.auth .has-error .control-label {
color: #f3b0b5;
}
body.auth .has-error .form-control {
border-color: #6b3a44;
}
body.auth .has-error .form-control:focus {
border-color: #6b3a44;
}
}
`;
document.head.appendChild(style);
To make this permanent
static/less/auth.less
/**
* Auth Dark Mode
* ============================================================================
* These pages are rendered by Django rather than the React app, so the body
* never gets a `.theme-*` class to key off of. Visitors are also usually signed
* out, meaning there is no stored theme preference to read. Follow the OS
* setting instead.
*/
@auth-dark-bg: #24202b;
@auth-dark-surface: #2f2937;
@auth-dark-surface-raised: #39323f;
@auth-dark-border: #453e4f;
@auth-dark-content: #e9e5eb;
@auth-dark-content-muted: #b5b0bd;
@auth-dark-link: #a396e8;
@auth-dark-danger-bg: #3b2733;
@auth-dark-danger-border: #6b3a44;
@auth-dark-danger-content: #f3b0b5;
@media (prefers-color-scheme: dark) {
body.auth {
background: @auth-dark-bg;
color: @auth-dark-content;
a {
color: @auth-dark-link;
}
// The tiled pattern is light line art, so once the backdrop behind it is
// dark it reads as a subtle highlight rather than a wash of gray.
.pattern-bg {
background-color: @auth-dark-bg;
opacity: 0.1;
}
.box {
background: @auth-dark-surface;
border-color: @auth-dark-border;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.box .box-header {
background: @auth-dark-surface-raised;
color: @auth-dark-content;
border-bottom-color: @auth-dark-border;
}
.auth-container.border-bottom {
border-bottom-color: @auth-dark-border;
}
.auth-provider-column {
border-left-color: @auth-dark-border;
}
.auth-container .help-center-link {
color: @auth-dark-link;
}
.auth-footer .secondary {
color: @auth-dark-content-muted;
&:hover {
color: @auth-dark-content;
}
}
.nav-tabs > li > a {
color: @auth-dark-content-muted;
&:hover,
&:active,
&:focus {
color: @auth-dark-content;
}
}
.nav-tabs > li.active {
a,
a:hover,
a:focus {
color: @auth-dark-content;
}
}
.form-control {
background: @auth-dark-bg;
border-color: @auth-dark-border;
color: @auth-dark-content;
box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.12);
&::placeholder {
color: @auth-dark-content-muted;
}
&:focus {
border-color: @purple-light;
box-shadow:
inset 0 2px 0 rgba(0, 0, 0, 0.12),
0 0 6px rgba(108, 95, 199, 0.5);
}
// Chrome paints autofilled inputs with an opaque light background that
// ignores `background-color`; an inset shadow is the only way to cover it.
&:-webkit-autofill,
&:-webkit-autofill:hover,
&:-webkit-autofill:focus {
-webkit-text-fill-color: @auth-dark-content;
box-shadow: inset 0 0 0 1000px @auth-dark-bg;
caret-color: @auth-dark-content;
}
}
.help-block {
color: @auth-dark-content-muted;
}
.btn-default {
color: @auth-dark-content;
background: @auth-dark-surface-raised;
border-color: @auth-dark-border;
&:hover {
color: @auth-dark-content;
background: lighten(@auth-dark-surface-raised, 4);
border-color: lighten(@auth-dark-border, 6);
}
&:hover:active,
&:focus,
&:active,
&.active,
&.active:hover {
color: @auth-dark-content;
background: darken(@auth-dark-surface-raised, 3);
border-color: lighten(@auth-dark-border, 6);
}
}
// Both marks are solid black and would disappear against a dark button.
// Every other provider logo is full color and needs no adjustment.
.provider-logo.github,
.provider-logo.rippling {
filter: invert(1);
}
.alert-danger {
background: @auth-dark-danger-bg;
border-color: @auth-dark-danger-border;
color: @auth-dark-danger-content;
}
.error,
.has-error .help-block,
.has-error .control-label {
color: @auth-dark-danger-content;
}
.has-error .form-control {
border-color: @auth-dark-danger-border;
&:focus {
border-color: @auth-dark-danger-border;
}
}
}
}
- 主要语言
- Python
- 星标
- 45.7k
- 派生
- 5k
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 655
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/sentry 的其他 Issue
-
Repeated integration DELETE runs uninstall() again and can remove a shared install from another org可能已有人在做 @sentry-junior 于 1 天前认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 72/100
getsentry/sentry#129229 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
getsentry/sentry#129182 · 1 条评论 ·
维护者通常 1 天内回复
-
find_referenced_groups: Fixes-keyword ID list spans newlines, linking wrong issues as fixed可能已有人在做 @CodeAlex52 于 30 天前认领。 未关闭Product Area: Releases Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 86/100
getsentry/sentry#125575 · 3 条评论 ·
维护者通常 1 天内回复
-
Cocoa replays hide Logs tab on supported SDK versions可能已有人在做 @Brian-An 于 20 天前认领。 未关闭Bug Cocoa Replays
难度 2/5 1-3 小时 新手友好度 82/100
getsentry/sentry#124217 · 1 条评论 ·
维护者通常 1 天内回复
-
Incorrect Russian translation in django.po可能已有人在做 @nightcityblade 于 17 天前认领。 未关闭Bug Good First Issue Product Area: Settings - Integrations
难度 1/5 1 小时以内 新手友好度 90/100
getsentry/sentry#120651 · 3 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
vllm-project/vllm#64845 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
dekobon/big-code-analysis#1729 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
pydantic/pydantic-ai#12091 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100