feat: pill toggle for Library Only — globe ↔ hard-drive icons
Replaced the text button with a sliding pill toggle: - Left: globe icon (online/explore mode) - Right: hard-drive icon (library-only mode) - Thumb slides left↔right with CSS transition - Inactive: dark background, white thumb on left (globe side) - Active: accent yellow background, thumb on right (local side) - Icons dim/brighten based on active state
This commit is contained in:
+48
-18
@@ -40,35 +40,65 @@ p {
|
||||
flex: 0 1 320px;
|
||||
}
|
||||
|
||||
.library-only-toggle {
|
||||
.mode-toggle {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
border: 1px solid var(--yj-border-subtle, rgba(255, 255, 255, 0.12));
|
||||
border-radius: 6px;
|
||||
background: transparent;
|
||||
color: var(--yj-text-secondary, #b3b3b3);
|
||||
font-size: 12px;
|
||||
width: 56px;
|
||||
height: 28px;
|
||||
border-radius: 14px;
|
||||
background: var(--yj-bg-overlay, rgba(255, 255, 255, 0.1));
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
padding: 0 4px;
|
||||
justify-content: space-between;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.library-only-toggle:hover {
|
||||
background: var(--yj-bg-overlay, rgba(255, 255, 255, 0.06));
|
||||
.mode-toggle:hover {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
|
||||
.mode-toggle-thumb {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 50%;
|
||||
background: var(--yj-text-primary, #fff);
|
||||
transition: left 0.2s ease;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.mode-toggle.active .mode-toggle-thumb {
|
||||
left: 31px;
|
||||
}
|
||||
|
||||
.mode-toggle.active {
|
||||
background: var(--yj-accent, #ffd43b);
|
||||
}
|
||||
|
||||
.mode-icon {
|
||||
font-size: 13px;
|
||||
z-index: 2;
|
||||
transition: color 0.2s ease;
|
||||
}
|
||||
|
||||
.mode-icon-globe {
|
||||
color: var(--yj-text-primary, #fff);
|
||||
}
|
||||
|
||||
.library-only-toggle.active {
|
||||
background: var(--yj-accent, #ffd43b);
|
||||
color: #000;
|
||||
border-color: var(--yj-accent, #ffd43b);
|
||||
.mode-icon-local {
|
||||
color: var(--yj-text-secondary, #b3b3b3);
|
||||
}
|
||||
|
||||
.library-only-toggle wa-icon {
|
||||
font-size: 14px;
|
||||
.mode-toggle.active .mode-icon-globe {
|
||||
color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.mode-toggle.active .mode-icon-local {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
ul {
|
||||
|
||||
Reference in New Issue
Block a user