mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
1367 lines
29 KiB
CSS
1367 lines
29 KiB
CSS
:root {
|
||
--bg-color: #ffffff;
|
||
--text-color: #333333;
|
||
--card-bg: #ffffff;
|
||
--border-color: #e0e0e0;
|
||
|
||
/* Color System */
|
||
--lora-accent: oklch(68% 0.28 256);
|
||
--lora-surface: oklch(100% 0 0 / 0.95);
|
||
--lora-border: oklch(90% 0.02 256 / 0.15);
|
||
--lora-text: oklch(95% 0.02 256);
|
||
--lora-error: oklch(75% 0.32 29);
|
||
|
||
/* Spacing Scale */
|
||
--space-1: calc(8px * 1);
|
||
--space-2: calc(8px * 2);
|
||
--space-3: calc(8px * 3);
|
||
|
||
/* Z-index Scale */
|
||
--z-base: 10;
|
||
--z-modal: 1000; /* 更新modal的z-index */
|
||
--z-overlay: 2000; /* 更新overlay的z-index,确保比modal高 */
|
||
|
||
/* Border Radius */
|
||
--border-radius-base: 12px;
|
||
--border-radius-sm: 8px;
|
||
--border-radius-xs: 4px;
|
||
}
|
||
|
||
[data-theme="dark"] {
|
||
--bg-color: #1a1a1a;
|
||
--text-color: #e0e0e0;
|
||
--card-bg: #2d2d2d;
|
||
--border-color: #404040;
|
||
|
||
--lora-accent: oklch(68% 0.28 256);
|
||
--lora-surface: oklch(25% 0.02 256 / 0.85);
|
||
--lora-border: oklch(90% 0.02 256 / 0.15);
|
||
--lora-text: oklch(98% 0.02 256);
|
||
}
|
||
|
||
body {
|
||
margin: 0;
|
||
font-family: 'Segoe UI', sans-serif;
|
||
background: var(--bg-color);
|
||
color: var(--text-color);
|
||
}
|
||
|
||
.container {
|
||
max-width: 1400px;
|
||
margin: 20px auto;
|
||
padding: 0 15px;
|
||
}
|
||
|
||
/* 文件夹标签样式 */
|
||
.folder-tags {
|
||
display: flex;
|
||
gap: 4px;
|
||
overflow-x: auto;
|
||
padding: 2px 0;
|
||
flex-wrap: wrap;
|
||
}
|
||
|
||
.tag {
|
||
cursor: pointer;
|
||
padding: 2px 8px;
|
||
margin: 2px;
|
||
border: 1px solid #ccc;
|
||
border-radius: var(--border-radius-xs);
|
||
display: inline-block;
|
||
line-height: 1.2;
|
||
font-size: 14px;
|
||
}
|
||
|
||
.tag.active {
|
||
background-color: #007bff;
|
||
color: white;
|
||
}
|
||
|
||
/* 卡片网格布局 */
|
||
.card-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); /* Adjusted from 320px */
|
||
gap: 12px; /* Reduced from var(--space-2) for tighter horizontal spacing */
|
||
margin-top: var(--space-2);
|
||
max-width: 1400px; /* Container width control */
|
||
margin-left: auto;
|
||
margin-right: auto;
|
||
}
|
||
|
||
.lora-card {
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
border-radius: var(--border-radius-base);
|
||
backdrop-filter: blur(16px);
|
||
transition: transform 160ms ease-out;
|
||
aspect-ratio: 896/1152;
|
||
max-width: 260px; /* Adjusted from 320px to fit 5 cards */
|
||
margin: 0 auto;
|
||
}
|
||
|
||
.lora-card:hover {
|
||
transform: translateY(-2px);
|
||
background: oklch(100% 0 0 / 0.6);
|
||
}
|
||
|
||
.lora-card:focus-visible {
|
||
outline: 2px solid var(--lora-accent);
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
/* Responsive adjustments */
|
||
@media (max-width: 1400px) {
|
||
.card-grid {
|
||
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
||
}
|
||
|
||
.lora-card {
|
||
max-width: 240px;
|
||
}
|
||
}
|
||
|
||
/* Card Preview and Footer Overlay */
|
||
.card-preview {
|
||
position: relative;
|
||
width: 100%;
|
||
height: 100%;
|
||
border-radius: var(--border-radius-base);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.card-preview img,
|
||
.card-preview video {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.card-footer {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
background: linear-gradient(transparent 15%, oklch(0% 0 0 / 0.75));
|
||
backdrop-filter: blur(8px);
|
||
color: white;
|
||
padding: var(--space-1);
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: flex-start; /* Changed from flex-end to allow for text wrapping */
|
||
min-height: 32px;
|
||
gap: var(--space-1); /* Add gap between model info and actions */
|
||
}
|
||
|
||
.model-name {
|
||
font-weight: bold;
|
||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
|
||
font-size: 0.95em;
|
||
word-break: break-word; /* Allow long words to break */
|
||
display: block; /* Ensure the text wraps */
|
||
max-height: 2.8em; /* Limit to roughly 2 lines */
|
||
overflow: hidden;
|
||
}
|
||
|
||
.model-meta {
|
||
font-size: 0.9em;
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.card-header {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
background: linear-gradient(oklch(0% 0 0 / 0.75), transparent 85%);
|
||
backdrop-filter: blur(8px);
|
||
color: white;
|
||
padding: var(--space-1);
|
||
display: flex;
|
||
justify-content: space-between;
|
||
align-items: center;
|
||
z-index: 1;
|
||
min-height: 20px;
|
||
}
|
||
|
||
.card-actions i {
|
||
margin-left: var(--space-1);
|
||
cursor: pointer;
|
||
color: white;
|
||
transition: opacity 0.2s;
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
.card-actions i:hover {
|
||
opacity: 0.8;
|
||
}
|
||
|
||
/* 响应式设计 */
|
||
@media (max-width: 768px) {
|
||
.card-grid {
|
||
grid-template-columns: minmax(260px, 1fr); /* Adjusted minimum size for mobile */
|
||
}
|
||
|
||
.controls {
|
||
flex-direction: column;
|
||
gap: 15px;
|
||
}
|
||
|
||
.lora-card {
|
||
max-width: 100%; /* Allow cards to fill available space on mobile */
|
||
}
|
||
}
|
||
|
||
/* 新增元数据相关样式 */
|
||
.model-info {
|
||
flex: 1;
|
||
min-width: 0; /* Allow flex item to shrink below content size */
|
||
overflow: hidden; /* Prevent content from spilling out */
|
||
padding-bottom: 4px; /* 为了与底部对齐的图标留出一些空间 */
|
||
}
|
||
|
||
.model-meta {
|
||
font-size: 0.8em;
|
||
color: #666;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.base-model {
|
||
display: inline-block;
|
||
background: #f0f0f0;
|
||
padding: 2px 6px;
|
||
border-radius: var(--border-radius-xs);
|
||
margin-right: 6px;
|
||
}
|
||
|
||
.file-size,
|
||
.modified {
|
||
display: block;
|
||
margin-top: 2px;
|
||
}
|
||
|
||
.tooltip {
|
||
position: relative;
|
||
cursor: help;
|
||
}
|
||
|
||
.tooltip::after {
|
||
content: attr(data-tooltip);
|
||
position: absolute;
|
||
bottom: 120%;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
background: rgba(0, 0, 0, 0.8);
|
||
color: white;
|
||
padding: 4px 8px;
|
||
border-radius: 4px;
|
||
font-size: 0.8em;
|
||
white-space: nowrap;
|
||
opacity: 0;
|
||
transition: opacity 0.2s;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.tooltip:hover::after {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* 模态窗口样式 */
|
||
.modal {
|
||
display: none;
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: rgba(0, 0, 0, 0.8);
|
||
z-index: var(--z-modal);
|
||
overflow-y: auto; /* 允许模态窗口内容滚动 */
|
||
}
|
||
|
||
/* 当模态窗口打开时,禁止body滚动 */
|
||
body.modal-open {
|
||
overflow: hidden;
|
||
}
|
||
|
||
.modal-content {
|
||
position: relative;
|
||
max-width: 800px;
|
||
margin: 2rem auto;
|
||
background: var(--lora-surface);
|
||
border-radius: var(--border-radius-base);
|
||
padding: var(--space-3);
|
||
border: 1px solid var(--lora-border);
|
||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
||
}
|
||
|
||
/* Delete Modal specific styles */
|
||
.delete-modal-content {
|
||
max-width: 500px;
|
||
text-align: center;
|
||
}
|
||
|
||
.delete-message {
|
||
color: var(--text-color);
|
||
margin: var(--space-2) 0;
|
||
}
|
||
|
||
.delete-model-info {
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
border-radius: var(--border-radius-sm);
|
||
padding: var(--space-2);
|
||
margin: var(--space-2) 0;
|
||
color: var(--text-color);
|
||
word-break: break-all;
|
||
}
|
||
|
||
/* Update delete modal styles */
|
||
.delete-modal {
|
||
display: none; /* Set initial display to none */
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: rgba(0, 0, 0, 0.8);
|
||
z-index: var(--z-overlay);
|
||
}
|
||
|
||
/* Add new style for when modal is shown */
|
||
.delete-modal.show {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.delete-modal-content {
|
||
max-width: 500px;
|
||
width: 90%;
|
||
text-align: center;
|
||
margin: 0 auto;
|
||
position: relative;
|
||
animation: modalFadeIn 0.2s ease-out;
|
||
}
|
||
|
||
.delete-model-info {
|
||
/* Update info display styling */
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
border-radius: var(--border-radius-sm);
|
||
padding: var(--space-2);
|
||
margin: var(--space-2) 0;
|
||
color: var(--text-color);
|
||
word-break: break-all;
|
||
text-align: left;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
@keyframes modalFadeIn {
|
||
from {
|
||
opacity: 0;
|
||
transform: translateY(-20px);
|
||
}
|
||
to {
|
||
opacity: 1;
|
||
transform: translateY(0);
|
||
}
|
||
}
|
||
|
||
.modal-actions {
|
||
display: flex;
|
||
gap: var(--space-2);
|
||
justify-content: center;
|
||
margin-top: var(--space-3);
|
||
}
|
||
|
||
.cancel-btn, .delete-btn {
|
||
padding: 8px var(--space-2);
|
||
border-radius: 6px;
|
||
border: none;
|
||
cursor: pointer;
|
||
font-weight: 500;
|
||
min-width: 100px;
|
||
}
|
||
|
||
.cancel-btn {
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
color: var(--text-color);
|
||
}
|
||
|
||
.delete-btn {
|
||
background: var(--lora-error);
|
||
color: white;
|
||
}
|
||
|
||
.cancel-btn:hover {
|
||
background: var(--lora-border);
|
||
}
|
||
|
||
.delete-btn:hover {
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.carousel {
|
||
display: grid;
|
||
grid-auto-flow: column;
|
||
gap: 1rem;
|
||
overflow-x: auto;
|
||
scroll-snap-type: x mandatory;
|
||
}
|
||
|
||
.carousel img {
|
||
scroll-snap-align: start;
|
||
max-height: 60vh;
|
||
object-fit: contain;
|
||
}
|
||
|
||
.carousel video {
|
||
scroll-snap-align: start;
|
||
max-height: 60vh;
|
||
object-fit: contain;
|
||
}
|
||
|
||
.theme-toggle img {
|
||
width: 20px;
|
||
height: 20px;
|
||
}
|
||
|
||
.theme-toggle .theme-icon {
|
||
width: 20px;
|
||
height: 20px;
|
||
position: absolute;
|
||
transition: opacity 0.2s ease;
|
||
}
|
||
|
||
.theme-toggle .light-icon {
|
||
opacity: 0;
|
||
}
|
||
|
||
.theme-toggle .dark-icon {
|
||
opacity: 1;
|
||
}
|
||
|
||
[data-theme="light"] .theme-toggle .light-icon {
|
||
opacity: 1;
|
||
}
|
||
|
||
[data-theme="light"] .theme-toggle .dark-icon {
|
||
opacity: 0;
|
||
}
|
||
|
||
.base-model-label {
|
||
max-width: 120px;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
display: inline-block;
|
||
color: white;
|
||
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
|
||
background: rgba(255, 255, 255, 0.2);
|
||
padding: 2px var(--space-1);
|
||
border-radius: var(--border-radius-xs);
|
||
backdrop-filter: blur(2px);
|
||
font-size: 0.85em;
|
||
}
|
||
|
||
.loading-overlay {
|
||
position: fixed;
|
||
top: 0;
|
||
left: 0;
|
||
width: 100%;
|
||
height: 100%;
|
||
background: oklch(0% 0 0 / 0.7);
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
z-index: var(--z-overlay);
|
||
}
|
||
|
||
.loading-content {
|
||
background: var(--lora-surface);
|
||
backdrop-filter: blur(24px);
|
||
padding: var(--space-3);
|
||
border-radius: var(--border-radius-base);
|
||
text-align: center;
|
||
border: 1px solid var(--lora-border);
|
||
width: min(400px, 90vw); /* 固定最大宽度,但保持响应式 */
|
||
}
|
||
|
||
.loading-spinner {
|
||
border: 4px solid #f3f3f3;
|
||
border-top: 4px solid #3498db;
|
||
border-radius: 50%;
|
||
width: 40px;
|
||
height: 40px;
|
||
animation: spin 1s linear infinite;
|
||
margin: 0 auto 1rem;
|
||
}
|
||
|
||
.loading-status {
|
||
margin-bottom: 1rem;
|
||
color: var(--text-color); /* 使用主题文本颜色 */
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
max-width: 100%;
|
||
padding: 0 var(--space-2);
|
||
}
|
||
|
||
.progress-container {
|
||
width: 280px; /* 固定进度条宽度 */
|
||
background-color: var(--lora-border); /* 使用主题边框颜色 */
|
||
border-radius: 4px;
|
||
overflow: hidden;
|
||
margin: 0 auto; /* 居中显示 */
|
||
}
|
||
|
||
.progress-bar {
|
||
width: 0%;
|
||
height: var(--space-2);
|
||
background-color: var(--lora-accent);
|
||
transition: width 200ms ease-out;
|
||
}
|
||
|
||
@keyframes spin {
|
||
0% { transform: rotate(0deg); }
|
||
100% { transform: rotate(360deg); }
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.lora-card,
|
||
.progress-bar {
|
||
transition: none;
|
||
}
|
||
}
|
||
|
||
.card-actions {
|
||
flex-shrink: 0; /* Prevent actions from shrinking */
|
||
display: flex;
|
||
gap: var(--space-1);
|
||
align-items: flex-end; /* 将图标靠下对齐 */
|
||
align-self: flex-end; /* 将整个actions容器靠下对齐 */
|
||
}
|
||
|
||
.model-link {
|
||
margin-top: var(--space-1);
|
||
}
|
||
|
||
.model-link a {
|
||
color: var(--lora-accent);
|
||
text-decoration: none;
|
||
font-size: 1.1em;
|
||
transition: opacity 0.2s;
|
||
text-shadow: none;
|
||
}
|
||
|
||
.model-link a:hover {
|
||
opacity: 0.8;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.modal-content h2 {
|
||
color: var(--text-color);
|
||
margin-bottom: var(--space-2);
|
||
font-size: 1.5em;
|
||
}
|
||
|
||
.description {
|
||
color: var(--text-color);
|
||
margin: var(--space-2) 0;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.trigger-words {
|
||
display: flex;
|
||
gap: var(--space-2);
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
border-radius: var(--border-radius-sm);
|
||
padding: var(--space-2);
|
||
margin: var(--space-2) 0;
|
||
}
|
||
|
||
.trigger-words-list {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
overflow-y: auto;
|
||
max-height: 300px;
|
||
}
|
||
|
||
.trigger-word-content {
|
||
flex: 1;
|
||
word-break: break-word;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.trigger-word-copy {
|
||
opacity: 0.5;
|
||
color: var(--text-color);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
/* Update toast animation for trigger word copy */
|
||
.toast.toast-copy {
|
||
background: var(--lora-accent);
|
||
color: white;
|
||
border: none;
|
||
padding: 8px 16px;
|
||
font-size: 0.9em;
|
||
transform: translateX(-50%) translateY(20px);
|
||
}
|
||
|
||
.toast.toast-copy.show {
|
||
transform: translateX(-50%) translateY(0);
|
||
}
|
||
|
||
.copy-btn {
|
||
background: transparent;
|
||
border: none;
|
||
cursor: pointer;
|
||
padding: var(--space-1);
|
||
margin-left: var(--space-1);
|
||
color: var(--lora-accent);
|
||
opacity: 0.8;
|
||
transition: opacity 0.2s;
|
||
}
|
||
|
||
.copy-btn:hover {
|
||
opacity: 1;
|
||
}
|
||
|
||
.close {
|
||
position: absolute;
|
||
top: var(--space-2);
|
||
right: var(--space-2);
|
||
background: transparent;
|
||
border: none;
|
||
color: var(--text-color);
|
||
font-size: 1.5em;
|
||
cursor: pointer;
|
||
opacity: 0.7;
|
||
transition: opacity 0.2s;
|
||
}
|
||
|
||
.close:hover {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* Toast Notifications */
|
||
.toast {
|
||
position: fixed;
|
||
top: 20px; /* 改为从顶部显示 */
|
||
right: 20px; /* 改为右对齐 */
|
||
left: auto; /* 移除左对齐 */
|
||
transform: translateX(120%); /* 初始位置在屏幕右侧外 */
|
||
min-width: 300px; /* 设置最小宽度 */
|
||
max-width: 400px; /* 设置最大宽度 */
|
||
background: var(--lora-surface);
|
||
color: var(--text-color);
|
||
padding: 12px 16px;
|
||
border-radius: var(--border-radius-sm);
|
||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
|
||
z-index: calc(var(--z-overlay) + 10); /* 让toast显示在最上层 */
|
||
opacity: 0;
|
||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
|
||
opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
|
||
.toast.show {
|
||
transform: translateX(0); /* 显示时滑入到正确位置 */
|
||
opacity: 1;
|
||
}
|
||
|
||
/* 添加图标容器 */
|
||
.toast::before {
|
||
content: '';
|
||
width: 20px;
|
||
height: 20px;
|
||
flex-shrink: 0;
|
||
background-position: center;
|
||
background-repeat: no-repeat;
|
||
background-size: contain;
|
||
}
|
||
|
||
/* 不同类型的toast样式 */
|
||
.toast-success {
|
||
border-left: 4px solid oklch(65% 0.2 142);
|
||
}
|
||
|
||
.toast-success::before {
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234caf50'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
|
||
}
|
||
|
||
.toast-error {
|
||
border-left: 4px solid oklch(65% 0.2 29);
|
||
}
|
||
|
||
.toast-error::before {
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f44336'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E");
|
||
}
|
||
|
||
.toast-info {
|
||
border-left: 4px solid oklch(65% 0.2 256);
|
||
}
|
||
|
||
.toast-info::before {
|
||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232196f3'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
|
||
}
|
||
|
||
/* 多个toast堆叠显示 */
|
||
.toast + .toast {
|
||
margin-top: 10px;
|
||
}
|
||
|
||
/* 响应式调整 */
|
||
@media (max-width: 768px) {
|
||
.toast {
|
||
width: calc(100% - 40px); /* 左右各留20px间距 */
|
||
max-width: none;
|
||
right: 20px;
|
||
}
|
||
}
|
||
|
||
/* Ensure toasts are visible in both themes */
|
||
[data-theme="dark"] .toast {
|
||
background: var(--lora-surface);
|
||
color: var(--lora-text);
|
||
}
|
||
|
||
/* Updated Trigger Words Section */
|
||
.trigger-words-container {
|
||
display: grid;
|
||
grid-template-columns: 200px 1fr;
|
||
align-items: flex-start;
|
||
gap: var(--space-2);
|
||
margin: var(--space-2) 0;
|
||
padding: var(--space-2);
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
border-radius: var(--border-radius-sm);
|
||
}
|
||
|
||
.trigger-words-title {
|
||
font-size: 0.95em;
|
||
color: var(--text-color);
|
||
text-align: center;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
min-height: 100%;
|
||
}
|
||
|
||
.trigger-words-tags {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 8px;
|
||
align-items: flex-start;
|
||
}
|
||
|
||
.trigger-word-tag {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
border-radius: var(--border-radius-xs);
|
||
padding: 6px 10px;
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
gap: 8px;
|
||
max-width: 100%;
|
||
}
|
||
|
||
.trigger-word-content {
|
||
color: oklch(65% 0.2 256); /* Accent color for trigger words */
|
||
font-size: 0.85em;
|
||
line-height: 1.4;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.trigger-word-copy {
|
||
display: flex;
|
||
align-items: center;
|
||
color: var(--text-color);
|
||
opacity: 0.5;
|
||
flex-shrink: 0;
|
||
transition: opacity 0.2s;
|
||
}
|
||
|
||
.trigger-word-tag:hover {
|
||
background: oklch(var(--lora-accent) / 0.1);
|
||
border-color: var(--lora-accent);
|
||
}
|
||
|
||
.trigger-word-tag:hover .trigger-word-copy {
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.trigger-word-tag:active {
|
||
transform: scale(0.98);
|
||
}
|
||
|
||
.initialization-notice {
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
min-height: 200px;
|
||
margin: var(--space-3) 0;
|
||
padding: var(--space-3);
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
border-radius: var(--border-radius-base);
|
||
text-align: center;
|
||
}
|
||
|
||
/* 使用已有的loading-spinner样式 */
|
||
.initialization-notice .loading-spinner {
|
||
margin-bottom: var(--space-2);
|
||
}
|
||
|
||
/* Search Container Styles */
|
||
.controls {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
margin-bottom: var(--space-2);
|
||
}
|
||
|
||
.actions {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: var(--space-2);
|
||
flex-wrap: nowrap; /* 防止内容换行 */
|
||
width: 100%; /* 确保占满容器宽度 */
|
||
}
|
||
|
||
.search-container {
|
||
position: relative;
|
||
width: 250px;
|
||
margin-left: auto;
|
||
flex-shrink: 0; /* 防止搜索框被压缩 */
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
|
||
/* 调整搜索框样式以匹配其他控件 */
|
||
.search-container input {
|
||
width: 100%;
|
||
padding: 6px 32px 6px 12px;
|
||
border: 1px solid oklch(65% 0.02 256); /* 更深的边框颜色,提高对比度 */
|
||
border-radius: var(--border-radius-sm);
|
||
background: var(--lora-surface);
|
||
color: var(--text-color);
|
||
font-size: 0.9em;
|
||
height: 32px;
|
||
box-sizing: border-box; /* 确保padding不会增加总宽度 */
|
||
}
|
||
|
||
.search-container input:focus {
|
||
outline: none;
|
||
border-color: var(--lora-accent);
|
||
}
|
||
|
||
.search-icon {
|
||
position: absolute;
|
||
right: calc(32px + 8px); /* 调整位置,留出toggle按钮的空间 */
|
||
top: 50%;
|
||
transform: translateY(-50%);
|
||
color: oklch(var(--text-color) / 0.5);
|
||
pointer-events: none;
|
||
line-height: 1; /* 防止图标影响容器高度 */
|
||
}
|
||
|
||
.search-mode-toggle {
|
||
background: var(--lora-surface);
|
||
border: 1px solid oklch(65% 0.02 256);
|
||
border-radius: var(--border-radius-sm);
|
||
color: var(--text-color);
|
||
width: 32px;
|
||
height: 32px;
|
||
padding: 0;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
flex-shrink: 0;
|
||
}
|
||
|
||
.search-mode-toggle:hover {
|
||
background: var(--lora-accent);
|
||
color: white;
|
||
}
|
||
|
||
.search-mode-toggle.active {
|
||
background: var(--lora-accent);
|
||
color: white;
|
||
}
|
||
|
||
.search-mode-toggle i {
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
.corner-controls {
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
display: flex;
|
||
gap: 10px;
|
||
z-index: var(--z-overlay);
|
||
}
|
||
|
||
.theme-toggle {
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 50%;
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border-color);
|
||
color: var(--text-color);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.theme-toggle:hover {
|
||
background: var(--lora-accent);
|
||
color: white;
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
@media (max-width: 768px) {
|
||
.actions {
|
||
flex-wrap: wrap;
|
||
gap: var(--space-1);
|
||
}
|
||
|
||
.search-container {
|
||
width: 100%;
|
||
order: -1; /* 在移动端将搜索框移到顶部 */
|
||
margin-left: 0;
|
||
}
|
||
|
||
/* Remove the previous corner-controls mobile styles */
|
||
.corner-controls {
|
||
/* Keep the fixed positioning even on mobile */
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
}
|
||
}
|
||
|
||
/* Folder Tags Container */
|
||
.folder-tags-container {
|
||
position: relative;
|
||
width: 100%;
|
||
}
|
||
|
||
.folder-tags {
|
||
transition: max-height 0.3s ease, opacity 0.2s ease;
|
||
max-height: 200px;
|
||
opacity: 1;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.folder-tags.collapsed {
|
||
max-height: 0;
|
||
opacity: 0;
|
||
margin: 0;
|
||
padding-bottom: 0;
|
||
}
|
||
|
||
/* Toggle Folders Button */
|
||
.toggle-folders-btn {
|
||
position: absolute;
|
||
bottom: 0; /* 固定在容器底部 */
|
||
right: 0; /* 固定在容器右侧 */
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 50%;
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border-color);
|
||
color: var(--text-color);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.3s ease;
|
||
z-index: 2;
|
||
}
|
||
|
||
.toggle-folders-btn:hover {
|
||
background: var(--lora-accent);
|
||
color: white;
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
.toggle-folders-btn i {
|
||
transition: transform 0.3s ease;
|
||
}
|
||
|
||
/* 折叠状态样式 */
|
||
.folder-tags.collapsed + .toggle-folders-btn {
|
||
position: static;
|
||
margin-right: auto; /* 确保按钮在左侧 */
|
||
transform: translateY(0);
|
||
}
|
||
|
||
.folder-tags.collapsed + .toggle-folders-btn i {
|
||
transform: rotate(180deg);
|
||
}
|
||
|
||
/* Update corner controls */
|
||
.corner-controls {
|
||
position: fixed;
|
||
top: 20px;
|
||
right: 20px;
|
||
display: flex;
|
||
gap: 10px;
|
||
z-index: var(--z-overlay);
|
||
}
|
||
|
||
/* Responsive adjustments */
|
||
@media (max-width: 768px) {
|
||
.folder-tags-container {
|
||
order: -1;
|
||
}
|
||
|
||
.toggle-folders-btn {
|
||
position: absolute;
|
||
bottom: 0;
|
||
right: 0;
|
||
transform: none; /* 移除transform,防止hover时的位移 */
|
||
}
|
||
|
||
.toggle-folders-btn:hover {
|
||
transform: none; /* 移动端下禁用hover效果 */
|
||
}
|
||
|
||
.folder-tags.collapsed + .toggle-folders-btn {
|
||
position: relative;
|
||
transform: none;
|
||
}
|
||
}
|
||
|
||
/* Back to Top Button */
|
||
.back-to-top {
|
||
position: fixed;
|
||
bottom: 20px;
|
||
right: 20px;
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 50%;
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border-color);
|
||
color: var (--text-color);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
opacity: 0;
|
||
visibility: hidden;
|
||
transform: translateY(10px);
|
||
transition: all 0.3s ease;
|
||
z-index: var(--z-overlay);
|
||
}
|
||
|
||
.back-to-top.visible {
|
||
opacity: 1;
|
||
visibility: visible;
|
||
transform: translateY(0);
|
||
}
|
||
|
||
.back-to-top:hover {
|
||
background: var (--lora-accent);
|
||
color: white;
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
/* Ensure the button doesn't overlap with other corner controls on mobile */
|
||
@media (max-width: 768px) {
|
||
.back-to-top {
|
||
bottom: 60px; /* Give some extra space from bottom on mobile */
|
||
}
|
||
}
|
||
|
||
/* Download Modal Styles */
|
||
.download-step {
|
||
margin: var(--space-2) 0;
|
||
}
|
||
|
||
.input-group {
|
||
margin-bottom: var(--space-2);
|
||
}
|
||
|
||
.input-group label {
|
||
display: block;
|
||
margin-bottom: 8px;
|
||
color: var(--text-color);
|
||
}
|
||
|
||
.input-group input,
|
||
.input-group select {
|
||
width: 100%;
|
||
padding: 8px;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius-xs);
|
||
background: var(--bg-color);
|
||
color: var(--text-color);
|
||
}
|
||
|
||
.error-message {
|
||
color: var(--lora-error);
|
||
font-size: 0.9em;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.version-list {
|
||
max-height: 400px;
|
||
overflow-y: auto;
|
||
margin: var(--space-2) 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
padding: 1px; /* Add padding to prevent border clipping */
|
||
}
|
||
|
||
.version-item {
|
||
display: flex;
|
||
gap: var(--space-2);
|
||
padding: var(--space-2);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius-sm);
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
background: var(--bg-color); /* Add background color */
|
||
margin: 1px; /* Add margin to ensure hover effect visibility */
|
||
position: relative; /* Add position context */
|
||
}
|
||
|
||
.version-item:hover {
|
||
border-color: var(--lora-accent);
|
||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Replace transform with shadow */
|
||
z-index: 1; /* Ensure hover state appears above other items */
|
||
}
|
||
|
||
.version-item.selected {
|
||
border-color: var(--lora-accent);
|
||
background: oklch(var(--lora-accent) / 0.1);
|
||
}
|
||
|
||
.version-thumbnail {
|
||
width: 80px;
|
||
height: 80px;
|
||
flex-shrink: 0;
|
||
border-radius: var(--border-radius-xs);
|
||
overflow: hidden;
|
||
background: var(--bg-color);
|
||
}
|
||
|
||
.version-thumbnail img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.version-content {
|
||
flex: 1;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
}
|
||
|
||
.version-content h3 {
|
||
margin: 0;
|
||
font-size: 1.1em;
|
||
color: var(--text-color);
|
||
}
|
||
|
||
.version-info {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 8px;
|
||
align-items: center;
|
||
font-size: 0.9em;
|
||
color: var(--text-color);
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.version-info .base-model {
|
||
background: oklch(var(--lora-accent) / 0.1);
|
||
color: var(--lora-accent);
|
||
padding: 2px 8px;
|
||
border-radius: var(--border-radius-xs);
|
||
}
|
||
|
||
.version-meta {
|
||
display: flex;
|
||
gap: 12px;
|
||
font-size: 0.85em;
|
||
color: var(--text-color);
|
||
opacity: 0.7;
|
||
}
|
||
|
||
.version-meta span {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
}
|
||
|
||
.folder-browser {
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius-xs);
|
||
padding: var(--space-1);
|
||
max-height: 200px;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
/* Settings styles */
|
||
.settings-toggle {
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 50%;
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border-color);
|
||
color: var(--text-color);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
}
|
||
|
||
.settings-toggle:hover {
|
||
background: var(--lora-accent);
|
||
color: white;
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
.settings-modal {
|
||
max-width: 500px;
|
||
}
|
||
|
||
/* Settings Links */
|
||
.settings-links {
|
||
margin-top: var(--space-3);
|
||
padding-top: var(--space-2);
|
||
border-top: 1px solid var(--lora-border);
|
||
display: flex;
|
||
gap: var(--space-2);
|
||
justify-content: center;
|
||
}
|
||
|
||
.settings-link {
|
||
width: 36px;
|
||
height: 36px;
|
||
border-radius: 50%;
|
||
background: var(--card-bg);
|
||
border: 1px solid var(--border-color);
|
||
color: var(--text-color);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
cursor: pointer;
|
||
transition: all 0.2s ease;
|
||
text-decoration: none;
|
||
position: relative;
|
||
}
|
||
|
||
.settings-link:hover {
|
||
background: var(--lora-accent);
|
||
color: white;
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
.settings-link i {
|
||
font-size: 1.1em;
|
||
}
|
||
|
||
/* Tooltip styles */
|
||
.settings-link::after {
|
||
content: attr(title);
|
||
position: absolute;
|
||
bottom: calc(100% + 8px);
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
background: rgba(0, 0, 0, 0.8);
|
||
color: white;
|
||
padding: 4px 8px;
|
||
border-radius: 4px;
|
||
font-size: 0.8em;
|
||
white-space: nowrap;
|
||
opacity: 0;
|
||
visibility: hidden;
|
||
transition: opacity 0.2s, visibility 0.2s;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.settings-link:hover::after {
|
||
opacity: 1;
|
||
visibility: visible;
|
||
}
|
||
|
||
/* Responsive adjustment */
|
||
@media (max-width: 480px) {
|
||
.settings-links {
|
||
flex-wrap: wrap;
|
||
}
|
||
}
|
||
|
||
.api-key-input {
|
||
position: relative;
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.api-key-input input {
|
||
padding-right: 40px;
|
||
}
|
||
|
||
.api-key-input .toggle-visibility {
|
||
position: absolute;
|
||
right: 8px;
|
||
background: none;
|
||
border: none;
|
||
color: var(--text-color);
|
||
opacity: 0.6;
|
||
cursor: pointer;
|
||
padding: 4px 8px;
|
||
}
|
||
|
||
.api-key-input .toggle-visibility:hover {
|
||
opacity: 1;
|
||
}
|
||
|
||
.input-help {
|
||
font-size: 0.85em;
|
||
color: var(--text-color);
|
||
opacity: 0.8;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.folder-item {
|
||
padding: 8px;
|
||
cursor: pointer;
|
||
border-radius: var(--border-radius-xs);
|
||
transition: background-color 0.2s;
|
||
}
|
||
|
||
.folder-item:hover {
|
||
background: var(--lora-surface);
|
||
}
|
||
|
||
.folder-item.selected {
|
||
background: oklch(var(--lora-accent) / 0.1);
|
||
border: 1px solid var(--lora-accent);
|
||
} |