mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
toggle fullscreen visualizer on left controls image (#1857)
This commit is contained in:
@@ -34,7 +34,10 @@ import { LibraryItem } from '/@/shared/types/domain-types';
|
|||||||
export const LeftControls = () => {
|
export const LeftControls = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { setSideBar } = useAppStoreActions();
|
const { setSideBar } = useAppStoreActions();
|
||||||
const { expanded: isFullScreenPlayerExpanded } = useFullScreenPlayerStore();
|
const {
|
||||||
|
expanded: isFullScreenPlayerExpanded,
|
||||||
|
visualizerExpanded: isFullScreenVisualizerExpanded,
|
||||||
|
} = useFullScreenPlayerStore();
|
||||||
const setFullScreenPlayerStore = useSetFullScreenPlayerStore();
|
const setFullScreenPlayerStore = useSetFullScreenPlayerStore();
|
||||||
|
|
||||||
const { collapsed, image } = useAppStore(
|
const { collapsed, image } = useAppStore(
|
||||||
@@ -62,7 +65,14 @@ export const LeftControls = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
e?.stopPropagation();
|
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>) => {
|
const handleToggleSidebarImage = (e?: MouseEvent<HTMLButtonElement>) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user