fix: add --surface-subtle token, restore info grouping, and apply theme-aware favorite color

- Add --surface-subtle (oklch 3% opacity) to replace rgba(0,0,0,0.03)
- Fix info items, creator-info, civitai-view, modal-send-btn, header-actions
  to use --surface-subtle instead of --surface-hover
- Keep true hover states on --surface-hover
- Use light #d4a017 / dark #ffc107 for --favorite-color based on theme
- Replace hardcoded #ffc107 and #d4a017 with var(--favorite-color)
This commit is contained in:
Will Miao
2026-05-21 21:14:07 +08:00
parent 08afb05ece
commit eb22054580
25 changed files with 191 additions and 121 deletions

View File

@@ -105,14 +105,14 @@
.info-item {
padding: var(--space-2);
background: rgba(0, 0, 0, 0.03);
background: var(--surface-subtle);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: var(--border-radius-sm);
}
/* 调整深色主题下的样式 */
/* Dark theme info item styles */
[data-theme="dark"] .info-item {
background: rgba(255, 255, 255, 0.03);
background: var(--surface-subtle);
border: 1px solid var(--lora-border);
}
@@ -271,13 +271,13 @@
}
}
/* 修改 back-to-top 按钮样式,使其固定在 modal 内部 */
/* Back-to-top button pinned inside modal */
.modal-content .back-to-top {
position: sticky; /* 改用 sticky 定位 */
float: right; /* 使用 float 确保按钮在右侧 */
bottom: 20px; /* 距离底部的距离 */
margin-right: 20px; /* 右侧间距 */
margin-top: -56px; /* 负边距确保不占用额外空间 */
position: sticky;
float: right;
bottom: 20px;
margin-right: 20px;
margin-top: -56px;
width: 36px;
height: 36px;
border-radius: 50%;
@@ -334,7 +334,7 @@
outline: none;
}
/* 合并编辑按钮样式 */
/* Consolidated edit button styles */
.edit-model-name-btn,
.edit-file-name-btn,
.edit-base-model-btn,
@@ -369,7 +369,7 @@
.edit-base-model-btn:hover,
.edit-model-description-btn:hover,
.edit-version-name-btn:hover {
opacity: 0.8 !important;
opacity: 0.8;
background: rgba(0, 0, 0, 0.05);
}
@@ -387,7 +387,7 @@
}
.base-wrapper {
flex: 2; /* 分配更多空间给base model */
flex: 2; /* Allocate more space to base model */
}
/* Base model display and editing styles */
@@ -447,7 +447,7 @@
margin: 0;
padding: var(--space-1);
border-radius: var(--border-radius-xs);
font-size: 1.5em !important;
font-size: 1.5em;
font-weight: 600;
line-height: 1.2;
color: var(--text-color);
@@ -888,7 +888,7 @@
align-items: center;
gap: 10px;
padding: 2px 10px;
background: rgba(0, 0, 0, 0.03);
background: var(--surface-subtle);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: var(--border-radius-sm);
max-width: fit-content;
@@ -899,7 +899,7 @@
[data-theme="dark"] .creator-info,
[data-theme="dark"] .civitai-view,
[data-theme="dark"] .modal-send-btn {
background: rgba(255, 255, 255, 0.03);
background: var(--surface-subtle);
border: 1px solid var(--lora-border);
}
@@ -958,7 +958,7 @@
align-items: center;
gap: 6px;
padding: 6px 12px;
background: rgba(0, 0, 0, 0.03);
background: var(--surface-subtle);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: var(--border-radius-sm);
color: var(--text-color);
@@ -981,7 +981,7 @@
align-items: center;
gap: 6px;
padding: 6px 12px;
background: rgba(0, 0, 0, 0.03);
background: var(--surface-subtle);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: var(--border-radius-sm);
color: var(--text-color);
@@ -992,7 +992,7 @@
}
[data-theme="dark"] .modal-send-btn {
background: rgba(255, 255, 255, 0.03);
background: var(--surface-subtle);
border: 1px solid var(--lora-border);
}

View File

@@ -455,9 +455,9 @@
}
.import-formats {
font-size: 0.8em !important;
opacity: 0.6 !important;
margin-top: var(--space-2) !important;
font-size: 0.8em;
opacity: 0.6;
margin-top: var(--space-2);
}
.select-files-btn {
@@ -481,7 +481,7 @@
/* For dark theme */
[data-theme="dark"] .import-container {
background: rgba(255, 255, 255, 0.03);
background: var(--surface-subtle);
}
/* Setup Guidance State - When example images path is not configured */

View File

@@ -21,7 +21,7 @@
.model-tag-compact {
/* Updated styles to match info-item appearance */
background: rgba(0, 0, 0, 0.03);
background: var(--surface-subtle);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: var(--border-radius-xs);
padding: 2px 8px;
@@ -45,7 +45,7 @@
/* Adjust dark theme tag styles */
[data-theme="dark"] .model-tag-compact {
background: rgba(255, 255, 255, 0.03);
background: var(--surface-subtle);
border: 1px solid var(--lora-border);
}
@@ -101,7 +101,7 @@
.tooltip-tag {
/* Updated styles to match info-item appearance */
background: rgba(0, 0, 0, 0.03);
background: var(--surface-hover);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: var(--border-radius-xs);
padding: 3px 8px;
@@ -111,7 +111,7 @@
/* Adjust dark theme tooltip tag styles */
[data-theme="dark"] .tooltip-tag {
background: rgba(255, 255, 255, 0.03);
background: var(--surface-hover);
border: 1px solid var(--lora-border);
}

View File

@@ -1,14 +1,14 @@
/* Update Trigger Words styles */
.info-item.trigger-words {
padding: var(--space-2);
background: rgba(0, 0, 0, 0.03);
background: var(--surface-subtle);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: var(--border-radius-sm);
}
/* 调整 trigger words 样式 */
/* Trigger words styles */
[data-theme="dark"] .info-item.trigger-words {
background: rgba(255, 255, 255, 0.03);
background: var(--surface-subtle);
border: 1px solid var(--lora-border);
}

View File

@@ -186,7 +186,7 @@
height: 88px;
border-radius: var(--border-radius-xs);
overflow: hidden;
background: rgba(0, 0, 0, 0.03);
background: var(--surface-hover);
display: flex;
align-items: center;
justify-content: center;