mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 05:32:12 -03:00
- Introduced a simple markdown parser to convert markdown syntax in changelog items to HTML. - Updated modal CSS to style markdown elements, enhancing the presentation of changelog items. - Improved user experience by allowing formatted text in changelog, including bold, italic, code, and links.
557 lines
11 KiB
CSS
557 lines
11 KiB
CSS
/* 修改 modal 基础样式 */
|
||
.modal {
|
||
display: none;
|
||
position: fixed;
|
||
top: 48px; /* Start below the header */
|
||
left: 0;
|
||
width: 100%;
|
||
height: calc(100% - 48px); /* Adjust height to exclude header */
|
||
background: rgba(0, 0, 0, 0.2); /* 调整为更淡的半透明黑色 */
|
||
z-index: var(--z-modal);
|
||
overflow: auto; /* Change from hidden to auto to allow scrolling */
|
||
}
|
||
|
||
/* 当模态窗口打开时,禁止body滚动 */
|
||
body.modal-open {
|
||
position: fixed;
|
||
width: 100%;
|
||
padding-right: var(--scrollbar-width, 0px); /* 补偿滚动条消失导致的页面偏移 */
|
||
}
|
||
|
||
/* 修改 modal-content 样式 */
|
||
.modal-content {
|
||
position: relative;
|
||
max-width: 800px;
|
||
height: auto;
|
||
max-height: calc(90vh - 48px); /* Adjust to account for header height */
|
||
margin: 1rem auto; /* Keep reduced top margin */
|
||
background: var(--lora-surface);
|
||
border-radius: var(--border-radius-base);
|
||
padding: var(--space-3);
|
||
border: 1px solid var(--lora-border);
|
||
box-shadow:
|
||
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
||
0 2px 4px -1px rgba(0, 0, 0, 0.06),
|
||
0 10px 15px -3px rgba(0, 0, 0, 0.05);
|
||
overflow-y: auto;
|
||
overflow-x: hidden; /* 防止水平滚动条 */
|
||
}
|
||
|
||
/* 当 modal 打开时锁定 body */
|
||
body.modal-open {
|
||
overflow: hidden !important; /* 覆盖 base.css 中的 scroll */
|
||
padding-right: var(--scrollbar-width, 8px); /* 使用滚动条宽度作为补偿 */
|
||
}
|
||
|
||
/* 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;
|
||
}
|
||
|
||
.modal-content h2 {
|
||
color: var(--text-color);
|
||
margin-bottom: var(--space-2);
|
||
font-size: 1.5em;
|
||
}
|
||
|
||
.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;
|
||
}
|
||
|
||
/* 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;
|
||
}
|
||
|
||
/* 统一各个 section 的样式 */
|
||
.support-section,
|
||
.changelog-section,
|
||
.update-info,
|
||
.info-item,
|
||
.path-preview {
|
||
background: rgba(0, 0, 0, 0.03);
|
||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||
border-radius: var(--border-radius-sm);
|
||
padding: var(--space-2);
|
||
}
|
||
|
||
/* 深色主题统一样式 */
|
||
[data-theme="dark"] .modal-content {
|
||
background: var(--lora-surface);
|
||
border: 1px solid var(--lora-border);
|
||
}
|
||
|
||
[data-theme="dark"] .support-section,
|
||
[data-theme="dark"] .changelog-section,
|
||
[data-theme="dark"] .update-info,
|
||
[data-theme="dark"] .info-item,
|
||
[data-theme="dark"] .path-preview {
|
||
background: rgba(255, 255, 255, 0.03);
|
||
border: 1px solid var(--lora-border);
|
||
}
|
||
|
||
/* Settings Styles */
|
||
.settings-section {
|
||
margin-top: var(--space-3);
|
||
border-top: 1px solid var(--lora-border);
|
||
padding-top: var(--space-2);
|
||
}
|
||
|
||
.settings-section h3 {
|
||
font-size: 1.1em;
|
||
margin-bottom: var(--space-2);
|
||
color: var(--text-color);
|
||
opacity: 0.9;
|
||
}
|
||
|
||
.setting-item {
|
||
display: flex;
|
||
flex-direction: column;
|
||
margin-bottom: var(--space-2);
|
||
padding: var(--space-1);
|
||
border-radius: var(--border-radius-xs);
|
||
}
|
||
|
||
.setting-item:hover {
|
||
background: rgba(0, 0, 0, 0.02);
|
||
}
|
||
|
||
[data-theme="dark"] .setting-item:hover {
|
||
background: rgba(255, 255, 255, 0.05);
|
||
}
|
||
|
||
.setting-info {
|
||
margin-bottom: var(--space-1);
|
||
width: 100%;
|
||
}
|
||
|
||
.setting-info label {
|
||
display: block;
|
||
margin-bottom: 4px;
|
||
font-weight: 500;
|
||
}
|
||
|
||
.setting-control {
|
||
width: 100%;
|
||
margin-bottom: var(--space-1);
|
||
}
|
||
|
||
/* Select Control Styles */
|
||
.select-control {
|
||
width: 100%;
|
||
}
|
||
|
||
.select-control select {
|
||
width: 100%;
|
||
padding: 6px 10px;
|
||
border-radius: var(--border-radius-xs);
|
||
border: 1px solid var(--border-color);
|
||
background-color: var(--lora-surface);
|
||
color: var(--text-color);
|
||
font-size: 0.95em;
|
||
}
|
||
|
||
/* Fix dark theme select dropdown text color */
|
||
[data-theme="dark"] .select-control select {
|
||
background-color: rgba(30, 30, 30, 0.9);
|
||
color: var(--text-color);
|
||
}
|
||
|
||
[data-theme="dark"] .select-control select option {
|
||
background-color: #2d2d2d;
|
||
color: var(--text-color);
|
||
}
|
||
|
||
.select-control select:focus {
|
||
border-color: var(--lora-accent);
|
||
outline: none;
|
||
}
|
||
|
||
/* Toggle Switch */
|
||
.toggle-switch {
|
||
position: relative;
|
||
display: inline-block;
|
||
width: 50px;
|
||
height: 24px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.toggle-switch input {
|
||
opacity: 0;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
|
||
.toggle-slider {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
right: 0;
|
||
bottom: 0;
|
||
background-color: var(--border-color);
|
||
transition: .3s;
|
||
border-radius: 24px;
|
||
}
|
||
|
||
.toggle-slider:before {
|
||
position: absolute;
|
||
content: "";
|
||
height: 18px;
|
||
width: 18px;
|
||
left: 3px;
|
||
bottom: 3px;
|
||
background-color: white;
|
||
transition: .3s;
|
||
border-radius: 50%;
|
||
}
|
||
|
||
input:checked + .toggle-slider {
|
||
background-color: var(--lora-accent);
|
||
}
|
||
|
||
input:checked + .toggle-slider:before {
|
||
transform: translateX(26px);
|
||
}
|
||
|
||
.toggle-label {
|
||
margin-left: 60px;
|
||
line-height: 24px;
|
||
}
|
||
|
||
/* Add small animation for the toggle */
|
||
.toggle-slider:active:before {
|
||
width: 22px;
|
||
}
|
||
|
||
/* Update input help styles */
|
||
.input-help {
|
||
font-size: 0.85em;
|
||
color: var(--text-color);
|
||
opacity: 0.7;
|
||
margin-top: 4px;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
/* Blur effect for NSFW content */
|
||
.nsfw-blur {
|
||
filter: blur(12px);
|
||
transition: filter 0.3s ease;
|
||
}
|
||
|
||
.nsfw-blur:hover {
|
||
filter: blur(8px);
|
||
}
|
||
|
||
/* Add styles for delete preview image */
|
||
.delete-preview {
|
||
max-width: 150px;
|
||
margin: 0 auto var(--space-2);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.delete-preview img {
|
||
width: 100%;
|
||
height: auto;
|
||
max-height: 150px;
|
||
object-fit: contain;
|
||
border-radius: var(--border-radius-sm);
|
||
}
|
||
|
||
.delete-info {
|
||
text-align: center;
|
||
}
|
||
|
||
.delete-info h3 {
|
||
margin-bottom: var(--space-1);
|
||
word-break: break-word;
|
||
}
|
||
|
||
.delete-info p {
|
||
margin: var(--space-1) 0;
|
||
font-size: 0.9em;
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.delete-note {
|
||
font-size: 0.85em;
|
||
color: var(--text-color);
|
||
opacity: 0.7;
|
||
font-style: italic;
|
||
margin-top: var(--space-1);
|
||
text-align: center;
|
||
}
|
||
|
||
/* Add styles for markdown elements in changelog */
|
||
.changelog-item ul {
|
||
padding-left: 20px;
|
||
margin-top: 8px;
|
||
}
|
||
|
||
.changelog-item li {
|
||
margin-bottom: 6px;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.changelog-item strong {
|
||
font-weight: 600;
|
||
}
|
||
|
||
.changelog-item em {
|
||
font-style: italic;
|
||
}
|
||
|
||
.changelog-item code {
|
||
background: rgba(0, 0, 0, 0.05);
|
||
padding: 2px 4px;
|
||
border-radius: 3px;
|
||
font-family: monospace;
|
||
font-size: 0.9em;
|
||
}
|
||
|
||
[data-theme="dark"] .changelog-item code {
|
||
background: rgba(255, 255, 255, 0.1);
|
||
}
|
||
|
||
.changelog-item a {
|
||
color: var(--lora-accent);
|
||
text-decoration: none;
|
||
}
|
||
|
||
.changelog-item a:hover {
|
||
text-decoration: underline;
|
||
} |