mirror of
https://github.com/Vomitblood/stort.git
synced 2024-11-26 13:55:27 +08:00
added blur for footer
This commit is contained in:
parent
d3c0919473
commit
150bafb7bf
|
@ -4,16 +4,14 @@ import { useRouter } from "next/router";
|
||||||
import { WindowButtons } from "./HeaderBar/WindowButtons";
|
import { WindowButtons } from "./HeaderBar/WindowButtons";
|
||||||
|
|
||||||
export const FooterBar = () => {
|
export const FooterBar = () => {
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
className="titlebar"
|
className="titlebar"
|
||||||
data-tauri-drag-region="true"
|
data-tauri-drag-region="true"
|
||||||
sx={{
|
sx={{
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
// TODO: remove when done
|
backdropFilter: "blur(10px)",
|
||||||
borderTop: "1px solid red",
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
height: "48px",
|
height: "48px",
|
||||||
|
|
|
@ -9,8 +9,10 @@ export const HeaderBar = () => {
|
||||||
data-tauri-drag-region="true"
|
data-tauri-drag-region="true"
|
||||||
sx={{
|
sx={{
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
|
// backdropFilter: "blur(10px)",
|
||||||
|
// backgroundColor: "rgba(0, 0, 0, 0.5)",
|
||||||
// TODO: remove when done
|
// TODO: remove when done
|
||||||
borderBottom: "1px solid red",
|
// borderBottom: "1px solid red",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
height: "48px",
|
height: "48px",
|
||||||
|
|
|
@ -27,8 +27,6 @@ export const Settings = () => {
|
||||||
const [saveLoading, setSaveLoading] = useState<boolean>(false);
|
const [saveLoading, setSaveLoading] = useState<boolean>(false);
|
||||||
|
|
||||||
const toggleSettings = () => {
|
const toggleSettings = () => {
|
||||||
// reset the settings maximised state
|
|
||||||
setSettingsMaximisedState(false);
|
|
||||||
setSettingsOpenState((prevState) => !prevState);
|
setSettingsOpenState((prevState) => !prevState);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
import { Box, Switch } from "@mui/material";
|
||||||
|
import { useAtom } from "jotai";
|
||||||
|
import { FC } from "react";
|
||||||
|
import { stagedSettingsAtom } from "../../../../lib/store/jotai/settings";
|
||||||
|
import { CategoryTitle } from "../CategoryTitle";
|
||||||
|
import { SettingsItem } from "../SettingsItem";
|
||||||
|
|
||||||
|
interface SettingsTabWindowProps {
|
||||||
|
sx?: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const SettingsTabWindow: FC<SettingsTabWindowProps> = ({ sx }) => {
|
||||||
|
// atoms
|
||||||
|
const [stagedSettings, setStagedSettings] = useAtom(stagedSettingsAtom);
|
||||||
|
|
||||||
|
const handleSettingsWindowValueChange = (settingKey: string, settingValue: boolean | number | string | number[]) => {
|
||||||
|
const newSettings = {
|
||||||
|
...stagedSettings,
|
||||||
|
window: {
|
||||||
|
...stagedSettings.window,
|
||||||
|
[settingKey]: settingValue,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
setStagedSettings(newSettings);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Box sx={{ sx }}>
|
||||||
|
<CategoryTitle title="Fullscreen" />
|
||||||
|
<SettingsItem
|
||||||
|
defaultText="On"
|
||||||
|
description="Fullscreen on startup"
|
||||||
|
input={
|
||||||
|
<Switch
|
||||||
|
checked={stagedSettings.window.start_fullscreen}
|
||||||
|
name="start_fullscreen"
|
||||||
|
onChange={(e) => {
|
||||||
|
handleSettingsWindowValueChange(e.target.name, e.target.checked);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<CategoryTitle title="Titlebar Buttons" />
|
||||||
|
<SettingsItem
|
||||||
|
defaultText="Off"
|
||||||
|
description="Minimize button"
|
||||||
|
input={
|
||||||
|
<Switch
|
||||||
|
checked={stagedSettings.window.minimize_button}
|
||||||
|
name="minimize_button"
|
||||||
|
onChange={(e) => {
|
||||||
|
handleSettingsWindowValueChange(e.target.name, e.target.checked);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<SettingsItem
|
||||||
|
defaultText="Off"
|
||||||
|
description="Maximize button"
|
||||||
|
input={
|
||||||
|
<Switch
|
||||||
|
checked={stagedSettings.window.maximize_button}
|
||||||
|
name="maximize_button"
|
||||||
|
onChange={(e) => {
|
||||||
|
handleSettingsWindowValueChange(e.target.name, e.target.checked);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
};
|
|
@ -1,4 +1,4 @@
|
||||||
import { Box, Chip, InputAdornment, MenuItem, Slider, Switch, TextField, Typography } from "@mui/material";
|
import { Box, Switch } from "@mui/material";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { stagedSettingsAtom } from "../../../../lib/store/jotai/settings";
|
import { stagedSettingsAtom } from "../../../../lib/store/jotai/settings";
|
||||||
|
|
Loading…
Reference in a new issue