mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-19 08:52:05 -03:00
fix(sidebar): align restore indicator with sidebar header and add first-use breathing animation (#990)
This commit is contained in:
@@ -114,8 +114,7 @@
|
|||||||
.sidebar-hidden-indicator {
|
.sidebar-hidden-indicator {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 50%;
|
top: 68px; /* Align with sidebar header */
|
||||||
transform: translateY(-50%);
|
|
||||||
z-index: var(--z-overlay);
|
z-index: var(--z-overlay);
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
@@ -144,6 +143,21 @@
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Subtle breathing animation for first-time discovery */
|
||||||
|
@keyframes sidebarBreathing {
|
||||||
|
0%, 100% { opacity: 0.3; }
|
||||||
|
50% { opacity: 0.65; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-hidden-indicator.breathing {
|
||||||
|
animation: sidebarBreathing 2.5s ease-in-out infinite;
|
||||||
|
animation-delay: 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar-hidden-indicator.breathing:hover {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar-hidden-indicator-tooltip {
|
.sidebar-hidden-indicator-tooltip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 100%;
|
left: 100%;
|
||||||
|
|||||||
@@ -1040,7 +1040,15 @@ export class SidebarManager {
|
|||||||
<span class="sidebar-hidden-indicator-tooltip">${translate('sidebar.showSidebar')}</span>
|
<span class="sidebar-hidden-indicator-tooltip">${translate('sidebar.showSidebar')}</span>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
// Subtle breathing animation on first sight to aid discoverability;
|
||||||
|
// stops permanently after user clicks the restore button once
|
||||||
|
const restoreKey = `${this.pageType}_restoreButtonUsed`;
|
||||||
|
if (!getStorageItem(restoreKey, false)) {
|
||||||
|
indicator.classList.add('breathing');
|
||||||
|
}
|
||||||
|
|
||||||
indicator.addEventListener('click', () => {
|
indicator.addEventListener('click', () => {
|
||||||
|
setStorageItem(restoreKey, true);
|
||||||
this.toggleHideOnThisPage();
|
this.toggleHideOnThisPage();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user