566 lines
13 KiB
CSS
566 lines
13 KiB
CSS
/*
|
|
* 个人设置(/user-center/settings)页面样式。
|
|
* 浅色数值来自原型图.zip:个人设置1/2/3、账号绑定、安全设置、通知设置/通知设置2(1920 宽视口实测)。
|
|
* 深色主题无原型:统一由现有主题变量与 Ant Design token 推导,不使用固定深色色值以外的装饰。
|
|
* 页面内只允许使用本文件定义的 --ps-* 变量或既有 --ui-* / --surface-* / --text-* 变量,JSX 中不写颜色。
|
|
*/
|
|
.ui-personal-settings {
|
|
--ps-border: #e2e8ee;
|
|
--ps-text: rgba(0, 0, 0, 0.88);
|
|
--ps-desc: #627489;
|
|
--ps-amount: #a75e0b;
|
|
--ps-card-shadow: 0 6px 24px rgba(15, 23, 42, 0.025);
|
|
--ps-header-bg: linear-gradient(90deg, #ffffff 0%, #fef7e9 72%, #eff8f4 100%);
|
|
--ps-preview-bg: linear-gradient(180deg, #f2f9f4 0%, #fdf6e9 100%);
|
|
--ps-frame-bg: #ffffff;
|
|
--ps-option-selected-bg: #fffbf4;
|
|
--ps-method-selected-bg: #fff0d7;
|
|
--ps-selected-border: #a75e0b;
|
|
--ps-selected-title: #914b05;
|
|
--ps-panel-bg: #f7fafc;
|
|
--ps-danger-bg: #fff8f8;
|
|
--ps-danger-border: #efdada;
|
|
--ps-code-bg: #18232e;
|
|
--ps-code-text: #dceee9;
|
|
--ps-tabs-split: #f0f0f0;
|
|
background: var(--uc-page-bg);
|
|
}
|
|
html.dark .ui-personal-settings {
|
|
--ps-border: var(--border-subtle);
|
|
--ps-text: var(--uc-heading);
|
|
--ps-desc: var(--text-secondary);
|
|
--ps-amount: var(--ui-color-primary);
|
|
--ps-card-shadow: none;
|
|
--ps-header-bg: linear-gradient(
|
|
90deg,
|
|
var(--surface-card) 0%,
|
|
color-mix(in srgb, var(--ui-color-primary) 8%, var(--surface-card)) 72%,
|
|
color-mix(in srgb, var(--ui-color-success) 8%, var(--surface-card)) 100%
|
|
);
|
|
--ps-preview-bg: linear-gradient(
|
|
180deg,
|
|
color-mix(in srgb, var(--ui-color-success) 7%, var(--surface-card)) 0%,
|
|
color-mix(in srgb, var(--ui-color-primary) 7%, var(--surface-card)) 100%
|
|
);
|
|
--ps-frame-bg: var(--surface-card);
|
|
--ps-option-selected-bg: color-mix(
|
|
in srgb,
|
|
var(--ui-color-primary) 10%,
|
|
var(--surface-card)
|
|
);
|
|
--ps-method-selected-bg: color-mix(
|
|
in srgb,
|
|
var(--ui-color-primary) 16%,
|
|
var(--surface-card)
|
|
);
|
|
--ps-selected-border: var(--ui-color-primary);
|
|
--ps-selected-title: var(--ui-color-primary);
|
|
--ps-panel-bg: var(--ui-color-fill-0);
|
|
--ps-danger-bg: color-mix(
|
|
in srgb,
|
|
var(--ui-color-danger) 8%,
|
|
var(--surface-card)
|
|
);
|
|
--ps-danger-border: color-mix(
|
|
in srgb,
|
|
var(--ui-color-danger) 35%,
|
|
var(--surface-card)
|
|
);
|
|
--ps-code-bg: color-mix(in srgb, #000 35%, var(--surface-card));
|
|
--ps-code-text: var(--uc-heading);
|
|
--ps-tabs-split: var(--border-subtle);
|
|
}
|
|
|
|
/* 卡片:1px 边框、10px 圆角、极淡外阴影(原型实测) */
|
|
.ui-personal-settings .ui-personal-profile,
|
|
.ui-personal-settings .ui-personal-content {
|
|
border-color: var(--ps-border);
|
|
border-radius: 10px;
|
|
box-shadow: var(--ps-card-shadow);
|
|
}
|
|
|
|
/* 资料头卡 */
|
|
.ui-personal-settings .ui-personal-profile {
|
|
margin-bottom: 20px;
|
|
background: var(--ps-header-bg);
|
|
}
|
|
.ui-personal-settings .ui-personal-profile > .ant-card-body {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
gap: 24px;
|
|
padding: 21px 26px 23px;
|
|
}
|
|
.ui-profile-identity {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 16px;
|
|
min-width: 0;
|
|
}
|
|
.ui-profile-avatar {
|
|
display: inline-flex;
|
|
flex-shrink: 0;
|
|
padding: 4px;
|
|
border: 1px solid var(--ps-border);
|
|
border-radius: 12px;
|
|
background: var(--ps-frame-bg);
|
|
}
|
|
.ui-profile-avatar .ant-avatar {
|
|
border-radius: 10px;
|
|
}
|
|
.ui-profile-name {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 10px;
|
|
}
|
|
.ui-profile-name strong {
|
|
color: var(--ps-text);
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
line-height: 26px;
|
|
}
|
|
.ui-profile-name .ant-tag {
|
|
margin: 0;
|
|
}
|
|
.ui-profile-sub {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
color: var(--ps-desc);
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
}
|
|
.ui-profile-id {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 0;
|
|
border: 0;
|
|
background: transparent;
|
|
color: inherit;
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
.ui-profile-id:hover {
|
|
color: var(--ui-color-primary);
|
|
}
|
|
.ui-profile-id:focus-visible {
|
|
outline: 2px solid var(--ui-color-primary);
|
|
outline-offset: 2px;
|
|
border-radius: 2px;
|
|
}
|
|
.ui-profile-stats {
|
|
display: flex;
|
|
gap: 40px;
|
|
}
|
|
.ui-profile-stats span {
|
|
display: block;
|
|
color: var(--ps-desc);
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
}
|
|
.ui-profile-stats strong {
|
|
display: block;
|
|
margin-top: 6px;
|
|
color: var(--ps-amount);
|
|
font-size: 24px;
|
|
font-weight: 700;
|
|
line-height: 32px;
|
|
}
|
|
|
|
/* 设置卡与页签:页签文字距卡片上沿 24px,2px 主色下划线 */
|
|
.ui-personal-settings .ui-personal-content {
|
|
min-height: 480px;
|
|
}
|
|
.ui-personal-settings .ui-personal-content > .ant-card-body {
|
|
padding: 2px 26px 26px;
|
|
}
|
|
.ui-personal-content > .ant-card-body > .ant-tabs > .ant-tabs-nav {
|
|
margin-bottom: 24px;
|
|
}
|
|
.ui-personal-content > .ant-card-body > .ant-tabs > .ant-tabs-nav::before {
|
|
border-bottom-color: var(--ps-tabs-split);
|
|
}
|
|
.ui-personal-content .ant-tabs-tab {
|
|
padding: 16px 0 18px;
|
|
}
|
|
|
|
/* 区块头:18px 标题 + 说明 + 操作,下方 1px 分隔线 */
|
|
.ui-settings-section-head {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 16px;
|
|
margin-bottom: 22px;
|
|
padding-bottom: 20px;
|
|
border-bottom: 1px solid var(--ps-border);
|
|
}
|
|
.ui-settings-section-head h2 {
|
|
margin: 0;
|
|
color: var(--ps-text);
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
line-height: 26px;
|
|
}
|
|
.ui-settings-section-head p {
|
|
margin: 7px 0 0;
|
|
color: var(--ps-desc);
|
|
font-size: 13px;
|
|
line-height: 20px;
|
|
}
|
|
.ui-settings-section-extra {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 头像设置 */
|
|
.ui-avatar-layout {
|
|
display: grid;
|
|
grid-template-columns: 215px minmax(0, 1fr);
|
|
gap: 28px;
|
|
}
|
|
.ui-avatar-preview {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 28px 22px 24px;
|
|
border: 1px solid var(--ps-border);
|
|
border-radius: 10px;
|
|
background: var(--ps-preview-bg);
|
|
text-align: center;
|
|
}
|
|
.ui-avatar-preview-frame {
|
|
display: inline-flex;
|
|
padding: 8px;
|
|
border: 1px solid var(--ps-border);
|
|
border-radius: 18px;
|
|
background: var(--ps-frame-bg);
|
|
}
|
|
.ui-avatar-preview-frame > img {
|
|
display: block;
|
|
width: 94px;
|
|
height: 94px;
|
|
border-radius: 12px;
|
|
}
|
|
.ui-avatar-preview strong {
|
|
margin-top: 20px;
|
|
color: var(--ps-text);
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
line-height: 24px;
|
|
}
|
|
.ui-avatar-preview-live {
|
|
margin-top: 10px;
|
|
color: var(--ps-amount);
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
}
|
|
.ui-avatar-preview p {
|
|
margin: 9px 0 0;
|
|
color: var(--ps-desc);
|
|
font-size: 12px;
|
|
line-height: 22px;
|
|
}
|
|
.ui-avatar-field-label {
|
|
margin-bottom: 9px;
|
|
color: var(--ps-text);
|
|
font-size: 14px;
|
|
line-height: 20px;
|
|
}
|
|
.ui-avatar-field {
|
|
margin-top: 24px;
|
|
}
|
|
.ui-avatar-field .ui-avatar-field-label {
|
|
margin-bottom: 8px;
|
|
}
|
|
.ui-avatar-field .ui-avatar-field-label-muted {
|
|
margin-bottom: 14px;
|
|
color: var(--ps-desc);
|
|
}
|
|
.ui-avatar-text-input {
|
|
width: 600px;
|
|
max-width: 100%;
|
|
}
|
|
.ui-avatar-help {
|
|
margin: 6px 0 0;
|
|
color: var(--ui-color-text-2);
|
|
font-size: 12px;
|
|
line-height: 20px;
|
|
}
|
|
.ui-avatar-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: 15px 13px;
|
|
}
|
|
.ui-avatar-option {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 13px;
|
|
padding: 16px 8px 12px;
|
|
border: 2px solid transparent;
|
|
border-radius: 10px;
|
|
background: transparent;
|
|
color: var(--ps-text);
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
.ui-avatar-option img {
|
|
width: 46px;
|
|
height: 46px;
|
|
border-radius: 12px;
|
|
}
|
|
.ui-avatar-option span {
|
|
font-size: 12px;
|
|
line-height: 18px;
|
|
}
|
|
.ui-avatar-option:hover {
|
|
background: var(--ui-color-fill-0);
|
|
}
|
|
.ui-avatar-option.selected {
|
|
border-color: var(--ps-selected-border);
|
|
background: var(--ps-option-selected-bg);
|
|
}
|
|
.ui-avatar-check {
|
|
position: absolute;
|
|
top: 4px;
|
|
right: 4px;
|
|
color: var(--ps-selected-border);
|
|
}
|
|
.ui-avatar-option:focus-visible {
|
|
outline: 2px solid var(--ui-color-primary);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* 账号绑定 / 安全设置:描边行卡 */
|
|
.ui-settings-rows {
|
|
display: grid;
|
|
gap: 18px;
|
|
}
|
|
.ui-settings-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 24px;
|
|
padding: 22px;
|
|
border: 1px solid var(--ps-border);
|
|
border-radius: 10px;
|
|
background: var(--surface-card);
|
|
}
|
|
.ui-settings-row-danger {
|
|
border-color: var(--ps-danger-border);
|
|
background: var(--ps-danger-bg);
|
|
}
|
|
.ui-settings-row-text {
|
|
min-width: 0;
|
|
}
|
|
.ui-settings-row-text h3 {
|
|
margin: 0;
|
|
color: var(--ps-text);
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
line-height: 22px;
|
|
}
|
|
.ui-settings-row-text p {
|
|
margin: 8px 0 0;
|
|
color: var(--ps-desc);
|
|
font-size: 13px;
|
|
line-height: 20px;
|
|
}
|
|
.ui-settings-row-text .ui-settings-row-warning {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
color: var(--ui-color-warning);
|
|
}
|
|
.ui-settings-row-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
gap: 16px;
|
|
}
|
|
.ui-settings-row-actions .ant-tag {
|
|
margin: 0;
|
|
}
|
|
.ui-binding-muted {
|
|
color: var(--ui-color-text-2);
|
|
}
|
|
.ui-binding-account {
|
|
display: inline-block;
|
|
max-width: 240px;
|
|
overflow: hidden;
|
|
color: var(--ps-desc);
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
vertical-align: bottom;
|
|
cursor: pointer;
|
|
}
|
|
.ui-binding-account:hover {
|
|
color: var(--ui-color-primary);
|
|
}
|
|
.ui-binding-popover-label {
|
|
margin-top: 4px;
|
|
color: var(--ui-color-text-2);
|
|
font-size: 11px;
|
|
}
|
|
.ui-binding-telegram-tip {
|
|
margin: 12px 0;
|
|
color: var(--ui-color-text-1);
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 通知设置 */
|
|
.ui-notify-label {
|
|
margin-bottom: 8px;
|
|
color: var(--ps-text);
|
|
font-size: 14px;
|
|
line-height: 22px;
|
|
}
|
|
.ui-notify-methods-field {
|
|
margin-bottom: 24px;
|
|
}
|
|
.ui-notify-methods {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 15px;
|
|
}
|
|
.ui-notify-method {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 12px;
|
|
padding: 16px 16px 16px 20px;
|
|
border: 1px solid var(--ps-border);
|
|
border-radius: 8px;
|
|
background: var(--surface-card);
|
|
color: var(--ps-desc);
|
|
font: inherit;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
}
|
|
.ui-notify-method:hover {
|
|
border-color: var(--ui-color-primary-hover);
|
|
}
|
|
.ui-notify-method.selected {
|
|
border-color: var(--ps-selected-border);
|
|
background: var(--ps-method-selected-bg);
|
|
}
|
|
.ui-notify-method:focus-visible {
|
|
outline: 2px solid var(--ui-color-primary);
|
|
outline-offset: 2px;
|
|
}
|
|
.ui-notify-method-text {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 0;
|
|
}
|
|
.ui-notify-method-text strong {
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
line-height: 22px;
|
|
}
|
|
.ui-notify-method.selected .ui-notify-method-text strong {
|
|
color: var(--ps-selected-title);
|
|
}
|
|
.ui-notify-method-text span {
|
|
font-size: 12px;
|
|
line-height: 20px;
|
|
}
|
|
.ui-notify-method-check {
|
|
flex-shrink: 0;
|
|
color: var(--ps-selected-border);
|
|
}
|
|
.ui-notify-form .ant-form-item-label > label {
|
|
color: var(--ps-text);
|
|
}
|
|
/* 与上方 Form.Item 的 24px 下外边距折叠,实际间距 25px(原型实测) */
|
|
.ui-notify-panel {
|
|
margin-top: 25px;
|
|
padding: 20px 20px 19px;
|
|
border: 1px solid var(--ps-border);
|
|
border-radius: 10px;
|
|
background: var(--ps-panel-bg);
|
|
}
|
|
.ui-notify-panel .ant-form-item:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
.ui-notify-code-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin: 4px 0 12px;
|
|
color: var(--ps-text);
|
|
font-size: 13px;
|
|
line-height: 22px;
|
|
}
|
|
.ui-notify-copy {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 0;
|
|
border: 0;
|
|
background: transparent;
|
|
color: var(--ps-text);
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
.ui-notify-copy svg {
|
|
color: var(--ui-color-primary);
|
|
}
|
|
.ui-notify-copy:hover {
|
|
color: var(--ui-color-primary);
|
|
}
|
|
.ui-notify-copy:focus-visible {
|
|
outline: 2px solid var(--ui-color-primary);
|
|
outline-offset: 2px;
|
|
}
|
|
.ui-notify-code {
|
|
margin: 0 0 1px;
|
|
padding: 18px 20px;
|
|
overflow-x: auto;
|
|
border-radius: 8px;
|
|
background: var(--ps-code-bg);
|
|
color: var(--ps-code-text);
|
|
font-family: var(--ui-font-family-mono);
|
|
font-size: 12px;
|
|
line-height: 21.5px;
|
|
white-space: pre;
|
|
}
|
|
|
|
/* 窄屏:统一规范,纵向堆叠,保持操作可达 */
|
|
@media (max-width: 1024px) {
|
|
.ui-avatar-grid {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
@media (max-width: 768px) {
|
|
.ui-personal-settings .ui-personal-profile > .ant-card-body {
|
|
padding: 16px;
|
|
}
|
|
.ui-personal-settings .ui-personal-content > .ant-card-body {
|
|
padding: 2px 16px 16px;
|
|
}
|
|
.ui-profile-stats {
|
|
gap: 24px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.ui-avatar-layout {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
.ui-settings-section-head,
|
|
.ui-settings-row {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
}
|
|
.ui-settings-row-actions {
|
|
justify-content: space-between;
|
|
}
|
|
.ui-notify-methods {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
}
|