toggle fullscreen visualizer on left controls image (#1857)

This commit is contained in:
jeffvli
2026-03-29 21:05:53 -07:00
parent 3db801f2de
commit 5d206bbb1f
@@ -34,7 +34,10 @@ import { LibraryItem } from '/@/shared/types/domain-types';
export const LeftControls = () => {
const { t } = useTranslation();
const { setSideBar } = useAppStoreActions();
const { expanded: isFullScreenPlayerExpanded } = useFullScreenPlayerStore();
const {
expanded: isFullScreenPlayerExpanded,
visualizerExpanded: isFullScreenVisualizerExpanded,
} = useFullScreenPlayerStore();
const setFullScreenPlayerStore = useSetFullScreenPlayerStore();
const { collapsed, image } = useAppStore(
@@ -62,7 +65,14 @@ export const LeftControls = () => {
}
e?.stopPropagation();
setFullScreenPlayerStore({ expanded: !isFullScreenPlayerExpanded });
const shouldClose = isFullScreenPlayerExpanded || isFullScreenVisualizerExpanded;
if (shouldClose) {
setFullScreenPlayerStore({ expanded: false, visualizerExpanded: false });
} else {
setFullScreenPlayerStore({ expanded: true });
}
};
const handleToggleSidebarImage = (e?: MouseEvent<HTMLButtonElement>) => {