refactor(代理): 用户余量巡检与长样式出件,压回可读性棘轮

推送闸门抓到 UserApiSecretService 1278→1408、两枚 Vue 超过 800 行:
把用户级余量查询/缓存/巡检拆到 UserProxyBalanceService,两端组件的大段
样式移到同名 .css 由 scoped src 挂载。行为与选择器不变,只为让长文件棘轮
回到基线以内(不调基线、不整份回写)。
This commit is contained in:
2026-10-21 14:26:03 +08:00
parent 86d78160fd
commit 6096e85d32
10 changed files with 1237 additions and 1199 deletions
@@ -680,200 +680,4 @@ onUnmounted(() => {
defineExpose({ saveAll, reload })
</script>
<style scoped>
.secret-settings-body {
display: flex;
flex-direction: column;
gap: 14px;
max-height: 62vh;
overflow-y: auto;
padding-right: 4px;
}
.secret-card {
padding: 18px;
border: 1px solid #313b46;
border-radius: 10px;
background: #20252b;
}
.secret-card-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.secret-card-title {
color: #eef4fb;
font-size: 15px;
font-weight: 700;
}
.lock-tag {
display: inline-flex;
align-items: center;
margin-left: 8px;
padding: 1px 8px;
border: 1px solid #6b5a2e;
border-radius: 999px;
background: #2e2a1c;
color: #e6c76a;
font-size: 11px;
font-weight: 600;
vertical-align: middle;
}
.secret-card-desc {
margin-top: 4px;
color: #909ba8;
font-size: 12px;
line-height: 1.5;
}
.secret-input {
width: 100%;
height: 42px;
padding: 0 12px;
box-sizing: border-box;
border: 1px solid #3b4652;
border-radius: 10px;
background: #1b2026;
color: #dce6f0;
font-size: 13px;
outline: none;
}
.secret-input:focus {
border-color: #5b96d6;
}
.secret-input:disabled {
color: #707b86;
cursor: not-allowed;
opacity: .72;
}
.secret-actions {
display: flex;
align-items: center;
gap: 10px;
margin-top: 10px;
}
.check-btn {
height: 32px;
padding: 0 14px;
border: 1px solid #3c4a58;
border-radius: 8px;
background: #262e37;
color: #dbe5f0;
font-size: 12px;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
flex-shrink: 0;
}
.check-btn:hover:not(:disabled) {
border-color: #4c647d;
}
.check-btn:disabled {
cursor: not-allowed;
opacity: .6;
}
.check-result {
color: #7f8a96;
font-size: 12px;
line-height: 1.5;
}
.check-result--ok {
color: #7fd6a4;
}
.check-result--fail {
color: #ff9b9b;
}
.check-result--warn {
color: #f0c674;
}
.proxy-field .field-label {
display: block;
}
.proxy-plan-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.proxy-plan-hint {
margin-top: 8px;
color: #7f8a96;
font-size: 12px;
line-height: 1.5;
}
.retention-block {
margin-top: 12px;
}
.field-label {
margin-bottom: 8px;
color: #a3afbb;
font-size: 12px;
}
.retention-options {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.retention-option {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
border-radius: 999px;
background: #1b2026;
color: #dce4ec;
font-size: 12px;
cursor: pointer;
}
.retention-option input {
margin: 0;
}
.retention-option--disabled {
cursor: not-allowed;
opacity: .6;
}
.secret-meta {
margin-top: 10px;
color: #7f8a96;
font-size: 12px;
}
.link-danger {
border: none;
background: transparent;
color: #ff9b9b;
font-size: 12px;
cursor: pointer;
padding: 0;
}
.link-danger:disabled {
cursor: not-allowed;
opacity: .55;
}
</style>
<style scoped src="./api-secret-settings-panel.css"></style>
@@ -462,843 +462,6 @@ onUnmounted(() => {
})
</script>
<style scoped>
.notification-bell {
position: relative;
display: inline-flex;
align-items: center;
}
<style scoped src="./notification-bell.css"></style>
.bell-trigger {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
padding: 0;
border: none;
border-radius: 9px;
background: transparent;
color: #c8d2e2;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
.bell-trigger:hover,
.bell-trigger--active {
background: rgba(255, 255, 255, 0.08);
color: #f5f8fc;
}
.bell-icon {
width: 19px;
height: 19px;
}
.bell-badge {
position: absolute;
top: 1px;
right: 0;
min-width: 17px;
height: 17px;
padding: 0 4px;
box-sizing: border-box;
border-radius: 999px;
background: #e5484d;
color: #fff;
font-size: 10px;
font-weight: 700;
line-height: 17px;
text-align: center;
box-shadow: 0 1px 4px rgba(229, 72, 77, 0.45);
pointer-events: none;
}
/* ---------------- 面板 ---------------- */
.bell-panel {
--bell-bg: #151a26;
--bell-bg-elev: #1a2130;
--bell-border: #2b3548;
--bell-text: #ecf2fa;
--bell-text-dim: #9fabc0;
--bell-text-mute: #6f7d92;
--bell-accent: #6ea8ff;
--bell-accent-soft: rgba(110, 168, 255, 0.14);
--bell-hover: rgba(255, 255, 255, 0.045);
--bell-unread-bg: rgba(110, 168, 255, 0.07);
--bell-input-bg: #10151f;
--bell-shadow: 0 20px 48px rgba(0, 0, 0, 0.52), 0 2px 8px rgba(0, 0, 0, 0.32);
--bell-error: #ff7b7b;
--bell-error-bg: rgba(255, 123, 123, 0.14);
--bell-warning: #f0bb61;
--bell-warning-bg: rgba(240, 187, 97, 0.14);
--bell-info: #6ea8ff;
--bell-info-bg: rgba(110, 168, 255, 0.14);
--bell-skeleton: rgba(255, 255, 255, 0.07);
--bell-skeleton-shine: rgba(255, 255, 255, 0.13);
position: fixed;
z-index: 3200;
display: flex;
flex-direction: column;
width: 376px;
max-width: calc(100vw - 24px);
max-height: min(560px, calc(100vh - 96px));
border: 1px solid var(--bell-border);
border-radius: 14px;
background: var(--bell-bg);
box-shadow: var(--bell-shadow);
overflow: hidden;
font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "微软雅黑", sans-serif;
}
.bell-panel--light {
--bell-bg: #ffffff;
--bell-bg-elev: #f7f9fc;
--bell-border: #e6ecf3;
--bell-text: #1e2a3a;
--bell-text-dim: #5d6b7e;
--bell-text-mute: #93a1b3;
--bell-accent: #4c5bd4;
--bell-accent-soft: rgba(76, 91, 212, 0.1);
--bell-hover: #f2f6fb;
--bell-unread-bg: rgba(76, 91, 212, 0.055);
--bell-input-bg: #ffffff;
--bell-shadow: 0 20px 44px rgba(23, 43, 77, 0.16), 0 2px 8px rgba(23, 43, 77, 0.08);
--bell-error: #d64545;
--bell-error-bg: rgba(214, 69, 69, 0.1);
--bell-warning: #b57b23;
--bell-warning-bg: rgba(181, 123, 35, 0.12);
--bell-info: #4c5bd4;
--bell-info-bg: rgba(76, 91, 212, 0.1);
--bell-skeleton: #eef2f7;
--bell-skeleton-shine: #f8fafd;
}
/* 头部 */
.bell-head {
display: flex;
flex: 0 0 auto;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 13px 16px 11px;
}
.bell-head-title {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.bell-title-text {
color: var(--bell-text);
font-size: 15px;
font-weight: 700;
letter-spacing: 0.01em;
}
.bell-unread-chip {
padding: 2px 8px;
border-radius: 999px;
background: var(--bell-accent-soft);
color: var(--bell-accent);
font-size: 11px;
font-weight: 600;
white-space: nowrap;
}
.bell-read-all {
display: inline-flex;
flex-shrink: 0;
align-items: center;
gap: 4px;
padding: 5px 10px;
border: 1px solid var(--bell-border);
border-radius: 8px;
background: transparent;
color: var(--bell-text-dim);
font-size: 12px;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.bell-read-all svg {
width: 12px;
height: 12px;
}
.bell-read-all:hover:not(:disabled) {
border-color: var(--bell-accent);
background: var(--bell-hover);
color: var(--bell-accent);
}
.bell-read-all:disabled {
opacity: 0.55;
cursor: not-allowed;
}
/* 筛选区 */
.bell-filters {
display: flex;
flex: 0 0 auto;
flex-direction: column;
gap: 8px;
padding: 10px 12px 12px;
border-bottom: 1px solid var(--bell-border);
background: var(--bell-bg-elev);
}
.bell-search-box {
position: relative;
display: flex;
align-items: center;
}
.bell-search-icon {
position: absolute;
left: 10px;
width: 14px;
height: 14px;
color: var(--bell-text-mute);
pointer-events: none;
}
.bell-search-input {
width: 100%;
height: 32px;
padding: 0 30px 0 32px;
box-sizing: border-box;
border: 1px solid var(--bell-border);
border-radius: 9px;
background: var(--bell-input-bg);
color: var(--bell-text);
font-size: 12px;
outline: none;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bell-search-input::placeholder {
color: var(--bell-text-mute);
}
.bell-search-input:focus {
border-color: var(--bell-accent);
box-shadow: 0 0 0 3px var(--bell-accent-soft);
}
.bell-search-clear {
position: absolute;
right: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
padding: 0;
border: none;
border-radius: 50%;
background: var(--bell-border);
color: var(--bell-bg);
cursor: pointer;
}
.bell-search-clear svg {
width: 10px;
height: 10px;
}
.bell-search-clear:hover {
background: var(--bell-text-mute);
}
/* 类型筛选 chip 行:比下拉更省纵向空间,与深色控制台风格一致 */
.bell-category-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.bell-chip {
height: 24px;
padding: 0 10px;
border: 1px solid var(--bell-border);
border-radius: 12px;
background: var(--bell-input-bg);
color: var(--bell-text-mute);
font-size: 12px;
line-height: 1;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.bell-chip:hover {
color: var(--bell-text);
border-color: var(--bell-accent);
}
.bell-chip.is-active {
border-color: var(--bell-accent);
background: var(--bell-accent-soft);
color: var(--bell-accent);
font-weight: 500;
}
.bell-sort-chips {
display: flex;
align-items: center;
gap: 6px;
}
.bell-sort-label {
margin-right: 2px;
color: var(--bell-text-mute);
font-size: 11px;
}
.bell-search-days {
display: flex;
align-items: center;
gap: 8px;
}
.bell-date-picker {
flex: 1;
min-width: 0;
width: 100%;
}
.bell-panel :deep(.bell-date-picker.el-date-editor) {
--el-fill-color-blank: var(--bell-input-bg);
--el-text-color-regular: var(--bell-text);
--el-text-color-placeholder: var(--bell-text-mute);
--el-text-color-secondary: var(--bell-text-mute);
--el-border-color: var(--bell-border);
--el-border-color-hover: var(--bell-accent);
--el-color-primary: var(--bell-accent);
height: 32px;
border-radius: 9px;
}
.bell-panel :deep(.bell-date-picker .el-range-input) {
font-size: 12px;
}
.bell-panel :deep(.bell-date-picker .el-range-separator) {
font-size: 12px;
color: var(--bell-text-mute);
}
.bell-search-reset {
flex-shrink: 0;
height: 32px;
padding: 0 12px;
border: 1px solid var(--bell-border);
border-radius: 9px;
background: var(--bell-input-bg);
color: var(--bell-text-dim);
font-size: 12px;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease;
}
.bell-search-reset:hover {
border-color: var(--bell-accent);
color: var(--bell-accent);
}
/* 列表 */
.bell-list {
flex: 1;
margin: 0;
padding: 0 0 4px;
list-style: none;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--bell-border) transparent;
}
.bell-list::-webkit-scrollbar {
width: 8px;
}
.bell-list::-webkit-scrollbar-track {
background: transparent;
}
.bell-list::-webkit-scrollbar-thumb {
border: 2px solid transparent;
border-radius: 999px;
background: var(--bell-border);
background-clip: content-box;
}
.bell-list::-webkit-scrollbar-thumb:hover {
background: var(--bell-text-mute);
background-clip: content-box;
}
.bell-day-head {
position: sticky;
top: 0;
z-index: 1;
padding: 9px 16px 6px;
background: var(--bell-bg);
color: var(--bell-text-mute);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.04em;
}
.bell-item {
position: relative;
display: flex;
gap: 10px;
padding: 11px 16px;
border-top: 1px solid transparent;
cursor: pointer;
transition: background 0.12s ease;
}
.bell-item:hover {
background: var(--bell-hover);
}
.bell-item--unread {
background: var(--bell-unread-bg);
}
/* ---- 聚合行(一级)与明细行(二级)---- */
.bell-group--open {
background: var(--bell-hover);
}
.bell-group-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-top: 5px;
}
.bell-group-count {
color: var(--bell-text-mute);
font-size: 11px;
}
.bell-group-toggle {
flex: 0 0 auto;
color: var(--bell-accent);
font-size: 11px;
font-weight: 600;
}
/* 明细缩进 + 左侧一道竖线:看得出"这是上面那一组里的东西",而不是又一批同级通知 */
.bell-item--detail {
padding-left: 30px;
}
.bell-item--detail::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 18px;
width: 2px;
border-radius: 2px;
background: var(--bell-border);
}
.bell-detail-state {
padding: 12px 16px;
color: var(--bell-text-mute);
font-size: 12px;
text-align: center;
}
.bell-item-icon {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
margin-top: 1px;
border-radius: 50%;
background: var(--bell-bg-elev);
color: var(--bell-text-mute);
}
.bell-item-icon svg {
width: 14px;
height: 14px;
}
.bell-item--unread.bell-item--error .bell-item-icon {
background: var(--bell-error-bg);
color: var(--bell-error);
}
.bell-item--unread.bell-item--warning .bell-item-icon {
background: var(--bell-warning-bg);
color: var(--bell-warning);
}
.bell-item--unread.bell-item--info .bell-item-icon {
background: var(--bell-info-bg);
color: var(--bell-info);
}
.bell-item-main {
flex: 1;
min-width: 0;
}
.bell-item-head {
display: flex;
align-items: baseline;
gap: 8px;
}
.bell-item-title {
flex: 1;
min-width: 0;
overflow: hidden;
color: var(--bell-text-dim);
font-size: 13px;
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
}
.bell-severity-tag {
flex: 0 0 auto;
padding: 1px 6px;
border: 1px solid currentColor;
border-radius: 999px;
font-size: 10.5px;
font-weight: 600;
line-height: 1.5;
}
.bell-severity-tag--urgent {
background: rgba(255, 123, 123, 0.12);
color: #ff7b7b;
}
.bell-severity-tag--high {
background: rgba(240, 187, 97, 0.12);
color: #f0bb61;
}
.bell-severity-tag--medium {
background: rgba(110, 168, 255, 0.12);
color: #6ea8ff;
}
.bell-severity-tag--low {
background: rgba(147, 161, 179, 0.12);
color: #93a1b3;
}
.bell-panel--light .bell-severity-tag--urgent {
background: #fdecec;
color: #c92a2a;
}
.bell-panel--light .bell-severity-tag--high {
background: #fdf3e2;
color: #b26a12;
}
.bell-panel--light .bell-severity-tag--medium {
background: #eaf2fb;
color: #2f6fb3;
}
.bell-panel--light .bell-severity-tag--low {
background: #f1f4f7;
color: #6b7c8e;
}
.bell-item--unread .bell-item-title {
color: var(--bell-text);
font-weight: 700;
}
.bell-item--unread.bell-item--error .bell-item-title {
color: var(--bell-error);
}
.bell-item--unread.bell-item--warning .bell-item-title {
color: var(--bell-warning);
}
.bell-item-dot {
flex: 0 0 auto;
align-self: center;
width: 6px;
height: 6px;
border-radius: 50%;
background: transparent;
}
.bell-item-dot--on {
background: var(--bell-error);
}
.bell-item-time {
flex: 0 0 auto;
color: var(--bell-text-mute);
font-size: 11px;
font-variant-numeric: tabular-nums;
}
.bell-item-content {
display: -webkit-box;
margin: 3px 0 0;
overflow: hidden;
color: var(--bell-text-mute);
font-size: 12px;
line-height: 1.6;
overflow-wrap: anywhere;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.bell-item--unread .bell-item-content {
color: var(--bell-text-dim);
}
/* 空态 / 加载态 */
.bell-state {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 40px 20px;
text-align: center;
}
.bell-state-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 46px;
height: 46px;
border-radius: 50%;
background: var(--bell-bg-elev);
color: var(--bell-text-mute);
}
.bell-state-icon svg {
width: 22px;
height: 22px;
}
.bell-state-icon--error {
background: var(--bell-error-bg);
color: var(--bell-error);
}
.bell-state-text {
margin: 0;
color: var(--bell-text-dim);
font-size: 13px;
}
.bell-state-sub {
margin: 0;
color: var(--bell-text-mute);
font-size: 12px;
}
.bell-state-action {
margin-top: 4px;
padding: 5px 14px;
border: 1px solid var(--bell-border);
border-radius: 8px;
background: transparent;
color: var(--bell-accent);
font-size: 12px;
cursor: pointer;
}
.bell-state-action:hover {
border-color: var(--bell-accent);
background: var(--bell-hover);
}
.bell-skeleton {
flex: 1;
padding: 8px 16px;
}
.bell-skeleton-row {
display: flex;
gap: 10px;
padding: 10px 0;
}
.bell-skeleton-icon {
flex: 0 0 auto;
width: 26px;
height: 26px;
border-radius: 50%;
background: var(--bell-skeleton);
animation: bell-pulse 1.4s ease-in-out infinite;
}
.bell-skeleton-lines {
display: flex;
flex: 1;
flex-direction: column;
gap: 8px;
padding-top: 2px;
}
.bell-skeleton-bar {
height: 10px;
border-radius: 5px;
background: var(--bell-skeleton);
animation: bell-pulse 1.4s ease-in-out infinite;
}
.bell-skeleton-bar--title {
width: 62%;
}
.bell-skeleton-bar--text {
width: 88%;
background: var(--bell-skeleton-shine);
}
@keyframes bell-pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.45;
}
}
/* 底部:结构对齐后台列表分页(共 N 条 + 每页条数下拉 + 上一页 / 第 x / y 页 / 下一页) */
.bell-foot {
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 9px 12px 9px 16px;
border-top: 1px solid var(--bell-border);
background: var(--bell-bg-elev);
}
.bell-foot-meta {
display: flex;
align-items: center;
gap: 8px;
}
.bell-foot-total {
color: var(--bell-text-mute);
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.bell-size-select {
height: 26px;
padding: 0 4px;
border: 1px solid var(--bell-border);
border-radius: 7px;
background: var(--bell-bg);
color: var(--bell-text-dim);
font-family: inherit;
font-size: 12px;
cursor: pointer;
outline: none;
color-scheme: dark;
}
.bell-panel--light .bell-size-select {
color-scheme: light;
}
.bell-size-select:hover,
.bell-size-select:focus {
border-color: var(--bell-accent);
color: var(--bell-accent);
}
.bell-size-select option {
background: var(--bell-bg);
color: var(--bell-text);
}
.bell-pager {
display: flex;
align-items: center;
gap: 8px;
}
.bell-page-btn {
min-height: 26px;
padding: 0 10px;
border: 1px solid var(--bell-border);
border-radius: 8px;
background: var(--bell-bg);
color: var(--bell-text-dim);
font-family: inherit;
font-size: 12px;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.bell-page-btn:hover:not(:disabled) {
border-color: var(--bell-accent);
background: var(--bell-hover);
color: var(--bell-accent);
}
.bell-page-btn:disabled {
background: var(--bell-bg-elev);
color: var(--bell-text-mute);
opacity: 0.6;
cursor: not-allowed;
}
.bell-page-info {
min-width: 58px;
color: var(--bell-text-dim);
font-size: 12px;
font-variant-numeric: tabular-nums;
text-align: center;
}
/* ---- 浅色主题(桌面入口首页顶栏) ---- */
.notification-bell--light .bell-trigger {
color: #55627a;
}
.notification-bell--light .bell-trigger:hover,
.notification-bell--light .bell-trigger--active {
background: rgba(76, 91, 212, 0.1);
color: #4c5bd4;
}
</style>
<style>
/* 日期选择面板与通知面板同为 body 级浮层,须压在通知面板(3200)之上 */
.bell-date-popper {
z-index: 3300 !important;
}
</style>
<style src="./notification-bell-popover.css"></style>
@@ -0,0 +1,195 @@
.secret-settings-body {
display: flex;
flex-direction: column;
gap: 14px;
max-height: 62vh;
overflow-y: auto;
padding-right: 4px;
}
.secret-card {
padding: 18px;
border: 1px solid #313b46;
border-radius: 10px;
background: #20252b;
}
.secret-card-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.secret-card-title {
color: #eef4fb;
font-size: 15px;
font-weight: 700;
}
.lock-tag {
display: inline-flex;
align-items: center;
margin-left: 8px;
padding: 1px 8px;
border: 1px solid #6b5a2e;
border-radius: 999px;
background: #2e2a1c;
color: #e6c76a;
font-size: 11px;
font-weight: 600;
vertical-align: middle;
}
.secret-card-desc {
margin-top: 4px;
color: #909ba8;
font-size: 12px;
line-height: 1.5;
}
.secret-input {
width: 100%;
height: 42px;
padding: 0 12px;
box-sizing: border-box;
border: 1px solid #3b4652;
border-radius: 10px;
background: #1b2026;
color: #dce6f0;
font-size: 13px;
outline: none;
}
.secret-input:focus {
border-color: #5b96d6;
}
.secret-input:disabled {
color: #707b86;
cursor: not-allowed;
opacity: .72;
}
.secret-actions {
display: flex;
align-items: center;
gap: 10px;
margin-top: 10px;
}
.check-btn {
height: 32px;
padding: 0 14px;
border: 1px solid #3c4a58;
border-radius: 8px;
background: #262e37;
color: #dbe5f0;
font-size: 12px;
font-weight: 700;
cursor: pointer;
white-space: nowrap;
flex-shrink: 0;
}
.check-btn:hover:not(:disabled) {
border-color: #4c647d;
}
.check-btn:disabled {
cursor: not-allowed;
opacity: .6;
}
.check-result {
color: #7f8a96;
font-size: 12px;
line-height: 1.5;
}
.check-result--ok {
color: #7fd6a4;
}
.check-result--fail {
color: #ff9b9b;
}
.check-result--warn {
color: #f0c674;
}
.proxy-field .field-label {
display: block;
}
.proxy-plan-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.proxy-plan-hint {
margin-top: 8px;
color: #7f8a96;
font-size: 12px;
line-height: 1.5;
}
.retention-block {
margin-top: 12px;
}
.field-label {
margin-bottom: 8px;
color: #a3afbb;
font-size: 12px;
}
.retention-options {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.retention-option {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 10px;
border-radius: 999px;
background: #1b2026;
color: #dce4ec;
font-size: 12px;
cursor: pointer;
}
.retention-option input {
margin: 0;
}
.retention-option--disabled {
cursor: not-allowed;
opacity: .6;
}
.secret-meta {
margin-top: 10px;
color: #7f8a96;
font-size: 12px;
}
.link-danger {
border: none;
background: transparent;
color: #ff9b9b;
font-size: 12px;
cursor: pointer;
padding: 0;
}
.link-danger:disabled {
cursor: not-allowed;
opacity: .55;
}
@@ -0,0 +1,4 @@
/* 日期选择面板与通知面板同为 body 级浮层,须压在通知面板(3200)之上 */
.bell-date-popper {
z-index: 3300 !important;
}
@@ -0,0 +1,831 @@
.notification-bell {
position: relative;
display: inline-flex;
align-items: center;
}
.bell-trigger {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
padding: 0;
border: none;
border-radius: 9px;
background: transparent;
color: #c8d2e2;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease;
}
.bell-trigger:hover,
.bell-trigger--active {
background: rgba(255, 255, 255, 0.08);
color: #f5f8fc;
}
.bell-icon {
width: 19px;
height: 19px;
}
.bell-badge {
position: absolute;
top: 1px;
right: 0;
min-width: 17px;
height: 17px;
padding: 0 4px;
box-sizing: border-box;
border-radius: 999px;
background: #e5484d;
color: #fff;
font-size: 10px;
font-weight: 700;
line-height: 17px;
text-align: center;
box-shadow: 0 1px 4px rgba(229, 72, 77, 0.45);
pointer-events: none;
}
/* ---------------- 面板 ---------------- */
.bell-panel {
--bell-bg: #151a26;
--bell-bg-elev: #1a2130;
--bell-border: #2b3548;
--bell-text: #ecf2fa;
--bell-text-dim: #9fabc0;
--bell-text-mute: #6f7d92;
--bell-accent: #6ea8ff;
--bell-accent-soft: rgba(110, 168, 255, 0.14);
--bell-hover: rgba(255, 255, 255, 0.045);
--bell-unread-bg: rgba(110, 168, 255, 0.07);
--bell-input-bg: #10151f;
--bell-shadow: 0 20px 48px rgba(0, 0, 0, 0.52), 0 2px 8px rgba(0, 0, 0, 0.32);
--bell-error: #ff7b7b;
--bell-error-bg: rgba(255, 123, 123, 0.14);
--bell-warning: #f0bb61;
--bell-warning-bg: rgba(240, 187, 97, 0.14);
--bell-info: #6ea8ff;
--bell-info-bg: rgba(110, 168, 255, 0.14);
--bell-skeleton: rgba(255, 255, 255, 0.07);
--bell-skeleton-shine: rgba(255, 255, 255, 0.13);
position: fixed;
z-index: 3200;
display: flex;
flex-direction: column;
width: 376px;
max-width: calc(100vw - 24px);
max-height: min(560px, calc(100vh - 96px));
border: 1px solid var(--bell-border);
border-radius: 14px;
background: var(--bell-bg);
box-shadow: var(--bell-shadow);
overflow: hidden;
font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "微软雅黑", sans-serif;
}
.bell-panel--light {
--bell-bg: #ffffff;
--bell-bg-elev: #f7f9fc;
--bell-border: #e6ecf3;
--bell-text: #1e2a3a;
--bell-text-dim: #5d6b7e;
--bell-text-mute: #93a1b3;
--bell-accent: #4c5bd4;
--bell-accent-soft: rgba(76, 91, 212, 0.1);
--bell-hover: #f2f6fb;
--bell-unread-bg: rgba(76, 91, 212, 0.055);
--bell-input-bg: #ffffff;
--bell-shadow: 0 20px 44px rgba(23, 43, 77, 0.16), 0 2px 8px rgba(23, 43, 77, 0.08);
--bell-error: #d64545;
--bell-error-bg: rgba(214, 69, 69, 0.1);
--bell-warning: #b57b23;
--bell-warning-bg: rgba(181, 123, 35, 0.12);
--bell-info: #4c5bd4;
--bell-info-bg: rgba(76, 91, 212, 0.1);
--bell-skeleton: #eef2f7;
--bell-skeleton-shine: #f8fafd;
}
/* 头部 */
.bell-head {
display: flex;
flex: 0 0 auto;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 13px 16px 11px;
}
.bell-head-title {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.bell-title-text {
color: var(--bell-text);
font-size: 15px;
font-weight: 700;
letter-spacing: 0.01em;
}
.bell-unread-chip {
padding: 2px 8px;
border-radius: 999px;
background: var(--bell-accent-soft);
color: var(--bell-accent);
font-size: 11px;
font-weight: 600;
white-space: nowrap;
}
.bell-read-all {
display: inline-flex;
flex-shrink: 0;
align-items: center;
gap: 4px;
padding: 5px 10px;
border: 1px solid var(--bell-border);
border-radius: 8px;
background: transparent;
color: var(--bell-text-dim);
font-size: 12px;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.bell-read-all svg {
width: 12px;
height: 12px;
}
.bell-read-all:hover:not(:disabled) {
border-color: var(--bell-accent);
background: var(--bell-hover);
color: var(--bell-accent);
}
.bell-read-all:disabled {
opacity: 0.55;
cursor: not-allowed;
}
/* 筛选区 */
.bell-filters {
display: flex;
flex: 0 0 auto;
flex-direction: column;
gap: 8px;
padding: 10px 12px 12px;
border-bottom: 1px solid var(--bell-border);
background: var(--bell-bg-elev);
}
.bell-search-box {
position: relative;
display: flex;
align-items: center;
}
.bell-search-icon {
position: absolute;
left: 10px;
width: 14px;
height: 14px;
color: var(--bell-text-mute);
pointer-events: none;
}
.bell-search-input {
width: 100%;
height: 32px;
padding: 0 30px 0 32px;
box-sizing: border-box;
border: 1px solid var(--bell-border);
border-radius: 9px;
background: var(--bell-input-bg);
color: var(--bell-text);
font-size: 12px;
outline: none;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bell-search-input::placeholder {
color: var(--bell-text-mute);
}
.bell-search-input:focus {
border-color: var(--bell-accent);
box-shadow: 0 0 0 3px var(--bell-accent-soft);
}
.bell-search-clear {
position: absolute;
right: 8px;
display: inline-flex;
align-items: center;
justify-content: center;
width: 16px;
height: 16px;
padding: 0;
border: none;
border-radius: 50%;
background: var(--bell-border);
color: var(--bell-bg);
cursor: pointer;
}
.bell-search-clear svg {
width: 10px;
height: 10px;
}
.bell-search-clear:hover {
background: var(--bell-text-mute);
}
/* 类型筛选 chip 行:比下拉更省纵向空间,与深色控制台风格一致 */
.bell-category-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.bell-chip {
height: 24px;
padding: 0 10px;
border: 1px solid var(--bell-border);
border-radius: 12px;
background: var(--bell-input-bg);
color: var(--bell-text-mute);
font-size: 12px;
line-height: 1;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.bell-chip:hover {
color: var(--bell-text);
border-color: var(--bell-accent);
}
.bell-chip.is-active {
border-color: var(--bell-accent);
background: var(--bell-accent-soft);
color: var(--bell-accent);
font-weight: 500;
}
.bell-sort-chips {
display: flex;
align-items: center;
gap: 6px;
}
.bell-sort-label {
margin-right: 2px;
color: var(--bell-text-mute);
font-size: 11px;
}
.bell-search-days {
display: flex;
align-items: center;
gap: 8px;
}
.bell-date-picker {
flex: 1;
min-width: 0;
width: 100%;
}
.bell-panel :deep(.bell-date-picker.el-date-editor) {
--el-fill-color-blank: var(--bell-input-bg);
--el-text-color-regular: var(--bell-text);
--el-text-color-placeholder: var(--bell-text-mute);
--el-text-color-secondary: var(--bell-text-mute);
--el-border-color: var(--bell-border);
--el-border-color-hover: var(--bell-accent);
--el-color-primary: var(--bell-accent);
height: 32px;
border-radius: 9px;
}
.bell-panel :deep(.bell-date-picker .el-range-input) {
font-size: 12px;
}
.bell-panel :deep(.bell-date-picker .el-range-separator) {
font-size: 12px;
color: var(--bell-text-mute);
}
.bell-search-reset {
flex-shrink: 0;
height: 32px;
padding: 0 12px;
border: 1px solid var(--bell-border);
border-radius: 9px;
background: var(--bell-input-bg);
color: var(--bell-text-dim);
font-size: 12px;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease;
}
.bell-search-reset:hover {
border-color: var(--bell-accent);
color: var(--bell-accent);
}
/* 列表 */
.bell-list {
flex: 1;
margin: 0;
padding: 0 0 4px;
list-style: none;
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--bell-border) transparent;
}
.bell-list::-webkit-scrollbar {
width: 8px;
}
.bell-list::-webkit-scrollbar-track {
background: transparent;
}
.bell-list::-webkit-scrollbar-thumb {
border: 2px solid transparent;
border-radius: 999px;
background: var(--bell-border);
background-clip: content-box;
}
.bell-list::-webkit-scrollbar-thumb:hover {
background: var(--bell-text-mute);
background-clip: content-box;
}
.bell-day-head {
position: sticky;
top: 0;
z-index: 1;
padding: 9px 16px 6px;
background: var(--bell-bg);
color: var(--bell-text-mute);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.04em;
}
.bell-item {
position: relative;
display: flex;
gap: 10px;
padding: 11px 16px;
border-top: 1px solid transparent;
cursor: pointer;
transition: background 0.12s ease;
}
.bell-item:hover {
background: var(--bell-hover);
}
.bell-item--unread {
background: var(--bell-unread-bg);
}
/* ---- 聚合行(一级)与明细行(二级)---- */
.bell-group--open {
background: var(--bell-hover);
}
.bell-group-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-top: 5px;
}
.bell-group-count {
color: var(--bell-text-mute);
font-size: 11px;
}
.bell-group-toggle {
flex: 0 0 auto;
color: var(--bell-accent);
font-size: 11px;
font-weight: 600;
}
/* 明细缩进 + 左侧一道竖线:看得出"这是上面那一组里的东西",而不是又一批同级通知 */
.bell-item--detail {
padding-left: 30px;
}
.bell-item--detail::before {
content: '';
position: absolute;
top: 0;
bottom: 0;
left: 18px;
width: 2px;
border-radius: 2px;
background: var(--bell-border);
}
.bell-detail-state {
padding: 12px 16px;
color: var(--bell-text-mute);
font-size: 12px;
text-align: center;
}
.bell-item-icon {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
margin-top: 1px;
border-radius: 50%;
background: var(--bell-bg-elev);
color: var(--bell-text-mute);
}
.bell-item-icon svg {
width: 14px;
height: 14px;
}
.bell-item--unread.bell-item--error .bell-item-icon {
background: var(--bell-error-bg);
color: var(--bell-error);
}
.bell-item--unread.bell-item--warning .bell-item-icon {
background: var(--bell-warning-bg);
color: var(--bell-warning);
}
.bell-item--unread.bell-item--info .bell-item-icon {
background: var(--bell-info-bg);
color: var(--bell-info);
}
.bell-item-main {
flex: 1;
min-width: 0;
}
.bell-item-head {
display: flex;
align-items: baseline;
gap: 8px;
}
.bell-item-title {
flex: 1;
min-width: 0;
overflow: hidden;
color: var(--bell-text-dim);
font-size: 13px;
font-weight: 500;
text-overflow: ellipsis;
white-space: nowrap;
}
.bell-severity-tag {
flex: 0 0 auto;
padding: 1px 6px;
border: 1px solid currentColor;
border-radius: 999px;
font-size: 10.5px;
font-weight: 600;
line-height: 1.5;
}
.bell-severity-tag--urgent {
background: rgba(255, 123, 123, 0.12);
color: #ff7b7b;
}
.bell-severity-tag--high {
background: rgba(240, 187, 97, 0.12);
color: #f0bb61;
}
.bell-severity-tag--medium {
background: rgba(110, 168, 255, 0.12);
color: #6ea8ff;
}
.bell-severity-tag--low {
background: rgba(147, 161, 179, 0.12);
color: #93a1b3;
}
.bell-panel--light .bell-severity-tag--urgent {
background: #fdecec;
color: #c92a2a;
}
.bell-panel--light .bell-severity-tag--high {
background: #fdf3e2;
color: #b26a12;
}
.bell-panel--light .bell-severity-tag--medium {
background: #eaf2fb;
color: #2f6fb3;
}
.bell-panel--light .bell-severity-tag--low {
background: #f1f4f7;
color: #6b7c8e;
}
.bell-item--unread .bell-item-title {
color: var(--bell-text);
font-weight: 700;
}
.bell-item--unread.bell-item--error .bell-item-title {
color: var(--bell-error);
}
.bell-item--unread.bell-item--warning .bell-item-title {
color: var(--bell-warning);
}
.bell-item-dot {
flex: 0 0 auto;
align-self: center;
width: 6px;
height: 6px;
border-radius: 50%;
background: transparent;
}
.bell-item-dot--on {
background: var(--bell-error);
}
.bell-item-time {
flex: 0 0 auto;
color: var(--bell-text-mute);
font-size: 11px;
font-variant-numeric: tabular-nums;
}
.bell-item-content {
display: -webkit-box;
margin: 3px 0 0;
overflow: hidden;
color: var(--bell-text-mute);
font-size: 12px;
line-height: 1.6;
overflow-wrap: anywhere;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.bell-item--unread .bell-item-content {
color: var(--bell-text-dim);
}
/* 空态 / 加载态 */
.bell-state {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 40px 20px;
text-align: center;
}
.bell-state-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 46px;
height: 46px;
border-radius: 50%;
background: var(--bell-bg-elev);
color: var(--bell-text-mute);
}
.bell-state-icon svg {
width: 22px;
height: 22px;
}
.bell-state-icon--error {
background: var(--bell-error-bg);
color: var(--bell-error);
}
.bell-state-text {
margin: 0;
color: var(--bell-text-dim);
font-size: 13px;
}
.bell-state-sub {
margin: 0;
color: var(--bell-text-mute);
font-size: 12px;
}
.bell-state-action {
margin-top: 4px;
padding: 5px 14px;
border: 1px solid var(--bell-border);
border-radius: 8px;
background: transparent;
color: var(--bell-accent);
font-size: 12px;
cursor: pointer;
}
.bell-state-action:hover {
border-color: var(--bell-accent);
background: var(--bell-hover);
}
.bell-skeleton {
flex: 1;
padding: 8px 16px;
}
.bell-skeleton-row {
display: flex;
gap: 10px;
padding: 10px 0;
}
.bell-skeleton-icon {
flex: 0 0 auto;
width: 26px;
height: 26px;
border-radius: 50%;
background: var(--bell-skeleton);
animation: bell-pulse 1.4s ease-in-out infinite;
}
.bell-skeleton-lines {
display: flex;
flex: 1;
flex-direction: column;
gap: 8px;
padding-top: 2px;
}
.bell-skeleton-bar {
height: 10px;
border-radius: 5px;
background: var(--bell-skeleton);
animation: bell-pulse 1.4s ease-in-out infinite;
}
.bell-skeleton-bar--title {
width: 62%;
}
.bell-skeleton-bar--text {
width: 88%;
background: var(--bell-skeleton-shine);
}
@keyframes bell-pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.45;
}
}
/* 底部:结构对齐后台列表分页(共 N 条 + 每页条数下拉 + 上一页 / 第 x / y 页 / 下一页) */
.bell-foot {
display: flex;
flex: 0 0 auto;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 9px 12px 9px 16px;
border-top: 1px solid var(--bell-border);
background: var(--bell-bg-elev);
}
.bell-foot-meta {
display: flex;
align-items: center;
gap: 8px;
}
.bell-foot-total {
color: var(--bell-text-mute);
font-size: 12px;
font-variant-numeric: tabular-nums;
}
.bell-size-select {
height: 26px;
padding: 0 4px;
border: 1px solid var(--bell-border);
border-radius: 7px;
background: var(--bell-bg);
color: var(--bell-text-dim);
font-family: inherit;
font-size: 12px;
cursor: pointer;
outline: none;
color-scheme: dark;
}
.bell-panel--light .bell-size-select {
color-scheme: light;
}
.bell-size-select:hover,
.bell-size-select:focus {
border-color: var(--bell-accent);
color: var(--bell-accent);
}
.bell-size-select option {
background: var(--bell-bg);
color: var(--bell-text);
}
.bell-pager {
display: flex;
align-items: center;
gap: 8px;
}
.bell-page-btn {
min-height: 26px;
padding: 0 10px;
border: 1px solid var(--bell-border);
border-radius: 8px;
background: var(--bell-bg);
color: var(--bell-text-dim);
font-family: inherit;
font-size: 12px;
cursor: pointer;
transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.bell-page-btn:hover:not(:disabled) {
border-color: var(--bell-accent);
background: var(--bell-hover);
color: var(--bell-accent);
}
.bell-page-btn:disabled {
background: var(--bell-bg-elev);
color: var(--bell-text-mute);
opacity: 0.6;
cursor: not-allowed;
}
.bell-page-info {
min-width: 58px;
color: var(--bell-text-dim);
font-size: 12px;
font-variant-numeric: tabular-nums;
text-align: center;
}
/* ---- 浅色主题(桌面入口首页顶栏) ---- */
.notification-bell--light .bell-trigger {
color: #55627a;
}
.notification-bell--light .bell-trigger:hover,
.notification-bell--light .bell-trigger--active {
background: rgba(76, 91, 212, 0.1);
color: #4c5bd4;
}