diff --git a/src/components/FooterBar/FooterBar.tsx b/src/components/FooterBar/FooterBar.tsx index c5e01d3..8965bb7 100644 --- a/src/components/FooterBar/FooterBar.tsx +++ b/src/components/FooterBar/FooterBar.tsx @@ -1,11 +1,15 @@ -import { Box, Stack } from "@mui/material"; +import { Box, Stack, useTheme } from "@mui/material"; import { useSettings } from "../../contexts/SettingsContext"; import { Settings } from "../HeaderBar/Settings/Settings"; import { WindowButtons } from "../HeaderBar/WindowButtons"; +import { hexToRgba } from "../../lib/utils/color"; export const FooterBar = () => { // contexts const { settings } = useSettings(); + const theme = useTheme(); + + const { r, g, b, a } = hexToRgba(theme.palette.background.paper); return ( { display: "flex", flexDirection: "row", height: "66px", - zIndex: 1000000, + // zIndex: 1000000, }} > { data-tauri-drag-region="true" sx={{ alignItems: "center", - backdropFilter: "blur(10px)", + backdropFilter: `blur(${settings.style.blur_radius}px)`, backgroundColor: "rgba(0, 0, 0, 0.5)", borderRadius: settings.style.radius + "px", display: "flex", diff --git a/src/components/Generic/Layout.tsx b/src/components/Generic/Layout.tsx index 744e810..a4ae6bc 100644 --- a/src/components/Generic/Layout.tsx +++ b/src/components/Generic/Layout.tsx @@ -24,7 +24,6 @@ export const Layout = () => { return ( { }} > - + testing + diff --git a/src/components/HeaderBar/Settings/Settings.tsx b/src/components/HeaderBar/Settings/Settings.tsx index 9375b31..19f402d 100644 --- a/src/components/HeaderBar/Settings/Settings.tsx +++ b/src/components/HeaderBar/Settings/Settings.tsx @@ -8,21 +8,19 @@ import { import { TabContext, TabList, TabPanel } from "@mui/lab"; import { Box, Button, IconButton, Tab, Tooltip, useTheme } from "@mui/material"; import { useAtom } from "jotai"; -import { useRouter } from "next/router"; import { useEffect, useState } from "react"; import { useSettings } from "../../../contexts/SettingsContext"; import { stagedSettingsAtom } from "../../../lib/store/jotai/settings"; import { FloatingDialog } from "../../Generic/FloatingDialog"; import { Background } from "./SettingsTabs/Background"; +import { Debug } from "./SettingsTabs/Debug"; import { Style } from "./SettingsTabs/Style"; import { Window } from "./SettingsTabs/Window"; -import { Debug } from "./SettingsTabs/Debug"; export const Settings = () => { // contexts const theme = useTheme(); - const { settings, updateSettings } = useSettings(); - const router = useRouter(); + const { fetchSettings, settings, updateSettings } = useSettings(); // atoms const [stagedSettings, setStagedSettings] = useAtom(stagedSettingsAtom); @@ -63,6 +61,7 @@ export const Settings = () => { // set staged settings back to current settings on close useEffect(() => { + if (settingsOpenState) fetchSettings(); if (!settingsOpenState) setStagedSettings(settings); // eslint-disable-next-line react-hooks/exhaustive-deps }, [settingsOpenState]); diff --git a/src/components/HeaderBar/Settings/SettingsTabs/Background.tsx b/src/components/HeaderBar/Settings/SettingsTabs/Background.tsx index 4aed6db..e2b1989 100644 --- a/src/components/HeaderBar/Settings/SettingsTabs/Background.tsx +++ b/src/components/HeaderBar/Settings/SettingsTabs/Background.tsx @@ -27,7 +27,6 @@ export const Background: FC = ({ sx }) => { const [oldWallpaperPath, setOldWallpaperPath] = useState(null); const [targetWallpaperPath, setTargetWallpaperPath] = useState(null); const [imageBlob, setImageBlob] = useState(null); - const [noImageSelectedIcon, setNoImageSelectedIcon] = useState(null); const handleSettingsBackgroundValueChange = ( settingKey: string, diff --git a/src/components/HeaderBar/Settings/SettingsTabs/Debug.tsx b/src/components/HeaderBar/Settings/SettingsTabs/Debug.tsx index f9108e9..b29c5ef 100644 --- a/src/components/HeaderBar/Settings/SettingsTabs/Debug.tsx +++ b/src/components/HeaderBar/Settings/SettingsTabs/Debug.tsx @@ -2,6 +2,9 @@ import { Box, Typography } from "@mui/material"; import { FC } from "react"; import { useSettings } from "../../../../contexts/SettingsContext"; import { CategoryTitle } from "../CategoryTitle"; +import { stagedSettingsAtom } from "../../../../lib/store/jotai/settings"; +import { useAtom } from "jotai"; +import { defaultSettings } from "../../../../lib/settings"; interface DebugProps { sx?: any; @@ -11,6 +14,9 @@ export const Debug: FC = ({ sx }) => { // contexts const { settings, resetSettings } = useSettings(); + // atoms + const [stagedSettings, setStagedSettings] = useAtom(stagedSettingsAtom); + return ( @@ -22,7 +28,7 @@ export const Debug: FC = ({ sx }) => {