feat: support image lightbox viewer and file download (#151)

* feat: add lightbox overlay with nice mechanics

* ui tweak for top bar in stream view

* support locally downloading attachments
This commit was merged in pull request #151.
This commit is contained in:
Arjun Patel
2026-04-12 14:14:23 -07:00
committed by GitHub
parent dbe61e447a
commit 5b6924f7ca
10 changed files with 602 additions and 146 deletions
+18
View File
@@ -0,0 +1,18 @@
import { create } from "zustand";
/**
* Overlays that should pause stream playback (e.g. attachment lightbox) call
* `suspend()` on mount and `release()` on unmount. Stream playback is suspended
* whenever `suspendCount > 0`.
*/
interface PlaybackState {
suspendCount: number;
suspend: () => void;
release: () => void;
}
export const usePlaybackStore = create<PlaybackState>((set) => ({
suspendCount: 0,
suspend: () => set((s) => ({ suspendCount: s.suspendCount + 1 })),
release: () => set((s) => ({ suspendCount: Math.max(0, s.suspendCount - 1) })),
}));