mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-21 19:21:27 -03:00
- Replace timestamp comparison (help_last_viewed vs a hardcoded date) with a content-version marker (data-help-content-version) read from the rendered modal markup, so badge state always reflects the content actually served - Only mark content as viewed when the modal is opened while it contains new content; opening a stale pre-upgrade page no longer suppresses the badge after a refresh - Flag the Replay Tutorial button itself with a 'New' chip (hidden by default, one-time glow animation) and scroll it into view when revealed; tab-level dots now mark getting-started and shortcuts instead of documentation - Translate help.newContentBadge into all 9 locales, reusing the established help.documentation.newBadge renderings - Add HelpManager content-version unit tests (12 cases)
414 lines
7.7 KiB
CSS
414 lines
7.7 KiB
CSS
/* Help Modal styles */
|
|
.help-modal {
|
|
max-width: 850px;
|
|
}
|
|
|
|
.help-header {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: var(--space-2);
|
|
}
|
|
|
|
.modal-help-icon {
|
|
font-size: 24px;
|
|
color: var(--lora-accent);
|
|
margin-right: var(--space-2);
|
|
vertical-align: text-bottom;
|
|
}
|
|
|
|
/* Tab navigation styles */
|
|
.help-tabs {
|
|
display: flex;
|
|
border-bottom: 1px solid var(--lora-border);
|
|
margin-bottom: var(--space-2);
|
|
gap: 8px;
|
|
}
|
|
|
|
.tab-btn {
|
|
padding: 8px 16px;
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 2px solid transparent;
|
|
color: var(--text-color);
|
|
cursor: pointer;
|
|
font-weight: 500;
|
|
transition: var(--transition-base);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.tab-btn:hover {
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.tab-btn.active {
|
|
color: var(--lora-accent);
|
|
border-bottom: 2px solid var(--lora-accent);
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Add styles for tab with new content indicator */
|
|
.tab-btn.has-new-content {
|
|
position: relative;
|
|
}
|
|
|
|
.tab-btn.has-new-content::after {
|
|
content: "";
|
|
position: absolute;
|
|
top: 4px;
|
|
right: 4px;
|
|
width: 8px;
|
|
height: 8px;
|
|
background-color: var(--lora-accent);
|
|
border-radius: 50%;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0% { opacity: 1; transform: scale(1); }
|
|
50% { opacity: 0.7; transform: scale(1.1); }
|
|
100% { opacity: 1; transform: scale(1); }
|
|
}
|
|
|
|
/* Tab content styles */
|
|
.help-content {
|
|
padding: var(--space-1) 0;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.tab-pane {
|
|
display: none;
|
|
}
|
|
|
|
.tab-pane.active {
|
|
display: block;
|
|
}
|
|
|
|
.help-text {
|
|
margin: var(--space-2) 0;
|
|
}
|
|
|
|
.help-text ul {
|
|
padding-left: 20px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.help-text li {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* Documentation link styles */
|
|
.docs-section {
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.docs-section h4 {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.docs-links {
|
|
list-style-type: none;
|
|
padding-left: var(--space-3);
|
|
}
|
|
|
|
.docs-links li {
|
|
margin-bottom: var(--space-1);
|
|
position: relative;
|
|
}
|
|
|
|
.docs-links li:before {
|
|
content: "•";
|
|
position: absolute;
|
|
left: -15px;
|
|
color: var(--lora-accent);
|
|
}
|
|
|
|
.docs-links a {
|
|
color: var(--lora-accent);
|
|
text-decoration: none;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.docs-links a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* New content badge styles */
|
|
.new-content-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 0.7em;
|
|
font-weight: 600;
|
|
background-color: var(--lora-accent);
|
|
color: var(--lora-text);
|
|
padding: 2px 6px;
|
|
border-radius: 10px;
|
|
margin-left: 8px;
|
|
vertical-align: middle;
|
|
animation: fadeIn 0.5s ease-in-out;
|
|
box-shadow: var(--shadow-sm);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.new-content-badge.inline {
|
|
font-size: 0.65em;
|
|
padding: 1px 4px;
|
|
margin-left: 6px;
|
|
border-radius: 8px;
|
|
}
|
|
|
|
/* Dark theme adjustments for new content badge */
|
|
[data-theme="dark"] .new-content-badge {
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
/* Replay Tutorial button: badge hidden until the button is flagged as new content */
|
|
.replay-tutorial-btn .new-content-badge {
|
|
display: none;
|
|
background-color: rgba(255, 255, 255, 0.22);
|
|
color: #fff;
|
|
box-shadow: none;
|
|
margin-left: 2px;
|
|
}
|
|
|
|
.replay-tutorial-btn.has-new-content .new-content-badge {
|
|
display: inline-flex;
|
|
}
|
|
|
|
/* One-time attention pulse when the button is flagged as new content */
|
|
@keyframes new-content-glow {
|
|
0% { box-shadow: 0 0 0 0 oklch(from var(--lora-accent) l c h / 55%); }
|
|
100% { box-shadow: 0 0 0 16px transparent; }
|
|
}
|
|
|
|
.replay-tutorial-btn.has-new-content {
|
|
animation: new-content-glow 1.2s ease-out 3;
|
|
}
|
|
|
|
/* Update video list styles */
|
|
.video-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
.video-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.video-info {
|
|
padding: var(--space-1);
|
|
}
|
|
|
|
.video-info h4 {
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.video-info p {
|
|
font-size: 0.9em;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* Dark theme adjustments */
|
|
[data-theme="dark"] .tab-btn:hover {
|
|
background-color: rgba(255, 255, 255, 0.05);
|
|
}
|
|
|
|
/* Update date badge styles */
|
|
.update-date-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
font-size: 0.75em;
|
|
font-weight: 500;
|
|
background-color: var(--lora-accent);
|
|
color: var(--lora-text);
|
|
padding: 4px 8px;
|
|
border-radius: 12px;
|
|
margin-left: 10px;
|
|
vertical-align: middle;
|
|
animation: fadeIn 0.5s ease-in-out;
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.update-date-badge i {
|
|
margin-right: 5px;
|
|
font-size: 0.9em;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(-5px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
/* Dark theme adjustments */
|
|
[data-theme="dark"] .update-date-badge {
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
/* Privacy-friendly video embed styles */
|
|
.video-container {
|
|
position: relative;
|
|
width: 100%;
|
|
padding-bottom: 56.25%; /* 16:9 aspect ratio */
|
|
height: 0;
|
|
margin-bottom: var(--space-2);
|
|
border-radius: var(--border-radius-sm);
|
|
overflow: hidden;
|
|
background-color: rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.video-thumbnail {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.video-thumbnail img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: filter 0.2s ease;
|
|
}
|
|
|
|
.video-play-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
/* External link button styles */
|
|
.external-link-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 20px;
|
|
border-radius: var(--border-radius-sm);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: var(--transition-base);
|
|
background-color: var(--lora-accent);
|
|
color: white;
|
|
text-decoration: none;
|
|
border: none;
|
|
}
|
|
|
|
.external-link-btn:hover {
|
|
background-color: oklch(from var(--lora-accent) l c h / 85%);
|
|
}
|
|
|
|
.video-thumbnail i {
|
|
font-size: 1.2em;
|
|
}
|
|
|
|
/* Smaller video container for the updates tab */
|
|
.video-item .video-container {
|
|
padding-bottom: 40%; /* Shorter height for the playlist */
|
|
}
|
|
|
|
/* Dark theme adjustments */
|
|
[data-theme="dark"] .video-container {
|
|
background-color: var(--surface-hover);
|
|
}
|
|
/* Replay tutorial button styles */
|
|
.help-actions {
|
|
margin-top: var(--space-3);
|
|
}
|
|
|
|
.replay-tutorial-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 10px 20px;
|
|
border-radius: var(--border-radius-sm);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: var(--transition-base);
|
|
background-color: var(--lora-accent);
|
|
color: white;
|
|
border: none;
|
|
}
|
|
|
|
.replay-tutorial-btn:hover {
|
|
background-color: oklch(from var(--lora-accent) l c h / 85%);
|
|
}
|
|
|
|
/* Shortcuts tab styles */
|
|
.shortcuts-section {
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
|
|
.shortcuts-section h4 {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.shortcuts-list {
|
|
list-style-type: none;
|
|
padding-left: var(--space-3);
|
|
}
|
|
|
|
.shortcuts-list li {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.shortcut-keys {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
flex-shrink: 0;
|
|
min-width: 150px;
|
|
}
|
|
|
|
.shortcut-sep {
|
|
color: var(--text-muted);
|
|
font-size: 0.75rem;
|
|
margin: 0 1px;
|
|
}
|
|
|
|
.shortcuts-list kbd {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
padding: 0 4px;
|
|
font-family: inherit;
|
|
font-size: 0.68rem;
|
|
font-weight: 500;
|
|
color: var(--shortcut-text);
|
|
background: var(--shortcut-bg);
|
|
border: 1px solid var(--shortcut-border);
|
|
box-shadow: var(--shortcut-shadow);
|
|
border-radius: var(--border-radius-xs, 3px);
|
|
line-height: 1;
|
|
}
|
|
|
|
.shortcut-description {
|
|
font-size: 0.9em;
|
|
opacity: 0.85;
|
|
}
|