Fix lightbox Escape navigating away, sidebar profile hidden at large font

This commit is contained in:
Jure
2026-03-24 15:14:12 +01:00
parent 6b77765e1c
commit 9a09e464b5
3 changed files with 11 additions and 4 deletions

View File

@@ -12,7 +12,10 @@ export function ImageLightbox({ images, index, onClose, onNavigate }: ImageLight
const hasNext = index < images.length - 1;
const handleKeyDown = useCallback((e: KeyboardEvent) => {
if (e.key === "Escape") onClose();
if (e.key === "Escape") {
e.stopImmediatePropagation();
onClose();
}
if (e.key === "ArrowLeft" && hasPrev) onNavigate(index - 1);
if (e.key === "ArrowRight" && hasNext) onNavigate(index + 1);
}, [onClose, onNavigate, index, hasPrev, hasNext]);

View File

@@ -120,8 +120,12 @@ export function Sidebar() {
})}
</nav>
{/* Account switcher (full) — expanded only */}
{!c && <AccountSwitcher />}
{/* Account switcher (full) — expanded only, always visible at bottom */}
{!c && (
<div className="shrink-0">
<AccountSwitcher />
</div>
)}
</aside>
);

View File

@@ -43,7 +43,7 @@ export async function notifyMention(authorName: string, preview: string): Promis
if (!(await ensurePermission())) return;
sendNotification({
title: `${authorName} mentioned you`,
body: preview.slice(0, 120),
body: preview.slice(0, 120) || "New mention",
});
}