Skip to content

Commit

Permalink
Light mode not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
MP3Martin committed Oct 31, 2022
1 parent aebefd3 commit 36c1290
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion NextJS_web_GUI/components/NavBarRightIcons.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ function NavBarRightIcons(props) {
};

const handleThemeChange = () => {
setGlobalState("darkMode", !darkMode)
// setGlobalState("darkMode", !darkMode)
setGlobalState("notSupportedOpen", true);
}

function iconButtonSize(width) {
Expand Down
11 changes: 5 additions & 6 deletions NextJS_web_GUI/components/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,18 @@ function MyAppTwo({ prp, prp2, setRootLoading }) {
body {
overflow: revert !important;
}
:root {
/*:root {
transition: filter 0.5s ease-out;
}
}*/
`}</style>
{
darkMode ? <></> : <style>{`
:root {
background-color: #fefefe;
darkMode ? <></> : <style id={"dsdhenfjsbkguzfgu"}>{`
:not(.MuiDialog-paper *) {
filter: invert(100%);
}
*:not(.f42d4f1d14f5d1d45 *) {
background-color: inherit;
}
img:not([src*=".svg"]), video {
Expand Down
7 changes: 7 additions & 0 deletions NextJS_web_GUI/components/input/outputOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const OutputOptions = (props) => {
}
const [answer] = useGlobalState("answer")
const [copiedOpen, setCopiedOpen] = useState(false)
const [notSupportedOpen] = useGlobalState("notSupportedOpen")
const [outputTextSize] = useGlobalState("outputTextSize")
const [enableSnowBG] = useGlobalState("enableSnowBG")
const [enableAnimations] = useGlobalState("enableAnimations")
Expand Down Expand Up @@ -134,6 +135,12 @@ const OutputOptions = (props) => {
Successfully copied the result!
</MuiAlert>
</Snackbar>

<Snackbar open={notSupportedOpen} autoHideDuration={1500} onClose={() => { setGlobalState("notSupportedOpen", false) }}>
<MuiAlert elevation={10} variant="filled" severity="error" onClose={() => { setGlobalState("notSupportedOpen", false) }}>
Not supported!
</MuiAlert>
</Snackbar>
</>)
};

Expand Down
1 change: 1 addition & 0 deletions NextJS_web_GUI/hooks/globalState.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ const { setGlobalState, useGlobalState } = createGlobalState({
enableSnowBG: true,
darkMode: true,
enableAnimations: true,
notSupportedOpen: false,
});
export { useGlobalState, setGlobalState };

0 comments on commit 36c1290

Please sign in to comment.