mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 12:20:20 +01:00
This commit is contained in:
parent
c2cdf6c98a
commit
b4270dee73
|
|
@ -1,7 +1,9 @@
|
||||||
import { m as motion } from "motion/react";
|
import { m as motion } from "motion/react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
import StyledLoading from "components/system/Files/FileManager/StyledLoading";
|
||||||
|
|
||||||
type StyledWindowProps = {
|
type StyledWindowProps = {
|
||||||
|
$backgroundBlur?: string;
|
||||||
$backgroundColor?: string;
|
$backgroundColor?: string;
|
||||||
$isForeground: boolean;
|
$isForeground: boolean;
|
||||||
};
|
};
|
||||||
|
|
@ -28,6 +30,11 @@ const StyledWindow = styled(motion.section)<StyledWindowProps>`
|
||||||
header + * {
|
header + * {
|
||||||
height: ${({ theme }) => `calc(100% - ${theme.sizes.titleBar.height}px)`};
|
height: ${({ theme }) => `calc(100% - ${theme.sizes.titleBar.height}px)`};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${StyledLoading} {
|
||||||
|
backdrop-filter: ${({ $backgroundBlur }) =>
|
||||||
|
$backgroundBlur ? `blur(${$backgroundBlur})` : undefined};
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export default StyledWindow;
|
export default StyledWindow;
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,13 @@ const Window: FC<ComponentProcessProps> = ({ children, id }) => {
|
||||||
linkElement,
|
linkElement,
|
||||||
processes: { [id]: process },
|
processes: { [id]: process },
|
||||||
} = useProcesses();
|
} = useProcesses();
|
||||||
const { backgroundColor, Component, hideTitlebar, peekElement } =
|
const {
|
||||||
process || {};
|
backgroundBlur,
|
||||||
|
backgroundColor,
|
||||||
|
Component,
|
||||||
|
hideTitlebar,
|
||||||
|
peekElement,
|
||||||
|
} = process || {};
|
||||||
const { foregroundId } = useSession();
|
const { foregroundId } = useSession();
|
||||||
const isForeground = id === foregroundId;
|
const isForeground = id === foregroundId;
|
||||||
const { zIndex, ...focusableProps } = useFocusable(id);
|
const { zIndex, ...focusableProps } = useFocusable(id);
|
||||||
|
|
@ -32,6 +37,7 @@ const Window: FC<ComponentProcessProps> = ({ children, id }) => {
|
||||||
return (
|
return (
|
||||||
<RndWindow id={id} zIndex={zIndex}>
|
<RndWindow id={id} zIndex={zIndex}>
|
||||||
<StyledWindow
|
<StyledWindow
|
||||||
|
$backgroundBlur={backgroundBlur}
|
||||||
$backgroundColor={backgroundColor}
|
$backgroundColor={backgroundColor}
|
||||||
$isForeground={isForeground}
|
$isForeground={isForeground}
|
||||||
{...focusableProps}
|
{...focusableProps}
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,7 @@ const directory: Processes = {
|
||||||
},
|
},
|
||||||
Terminal: {
|
Terminal: {
|
||||||
Component: dynamic(() => import("components/apps/Terminal")),
|
Component: dynamic(() => import("components/apps/Terminal")),
|
||||||
|
backgroundBlur: "8px",
|
||||||
backgroundColor: "rgba(12, 12, 12, 0.5)",
|
backgroundColor: "rgba(12, 12, 12, 0.5)",
|
||||||
defaultSize: {
|
defaultSize: {
|
||||||
height: 374,
|
height: 374,
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ export type RelativePosition = {
|
||||||
type BaseProcessArguments = {
|
type BaseProcessArguments = {
|
||||||
allowResizing?: boolean;
|
allowResizing?: boolean;
|
||||||
autoSizing?: boolean;
|
autoSizing?: boolean;
|
||||||
|
backgroundBlur?: string;
|
||||||
backgroundColor?: string;
|
backgroundColor?: string;
|
||||||
dependantLibs?: string[];
|
dependantLibs?: string[];
|
||||||
hideMaximizeButton?: boolean;
|
hideMaximizeButton?: boolean;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user