From 2fb7a6a52d5ee5b1a05fe4e2905a99747cf74d50 Mon Sep 17 00:00:00 2001 From: Priyanshu Bartwal <110045644+git-init-priyanshu@users.noreply.github.com> Date: Sat, 7 Oct 2023 18:38:12 +0530 Subject: [PATCH] feat: Opening of corresponding apps upon clicking. (#805) * feat: Opening of corresponding apps upon clicking. * fix: Closing of window when app is opened. --- src/components/start/index.jsx | 28 ++++++++++++++++++++++++---- src/utils/general.jsx | 4 ++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/components/start/index.jsx b/src/components/start/index.jsx index 4ab4e1ad7..d332f922a 100644 --- a/src/components/start/index.jsx +++ b/src/components/start/index.jsx @@ -80,9 +80,29 @@ export const BandPane = () => { style={{ "--prefix": "BAND" }} >
- - - + + +
); @@ -128,7 +148,7 @@ export const SidePane = () => { function sliderBackground(elem, e) { elem.style.setProperty( "--track-color", - `linear-gradient(90deg, var(--clrPrm) ${e - 3}%, #888888 ${e}%)`, + `linear-gradient(90deg, var(--clrPrm) ${e - 3}%, #888888 ${e}%)` ); } diff --git a/src/utils/general.jsx b/src/utils/general.jsx index 856a1b776..3d0817a35 100644 --- a/src/utils/general.jsx +++ b/src/utils/general.jsx @@ -24,6 +24,8 @@ String.prototype.count = function (c) { }; export const Icon = (props) => { + const sidepane = useSelector((state) => state.sidepane); + const dispatch = useDispatch(); var src = `img/icon/${props.ui != null ? "ui/" : ""}${props.src}.png`; if (props.ext != null || (props.src && props.src.includes("http"))) { @@ -38,6 +40,8 @@ export const Icon = (props) => { } const clickDispatch = (event) => { + if (!sidepane.banhide) dispatch({ type: "BANDHIDE" }); + var action = { type: event.currentTarget.dataset.action, payload: event.currentTarget.dataset.payload,