A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.
fix: enhance SidePanel full width style & responsiveness
towfiqi79bf889003d4
diff --git a/frontend/src/components/Plan/PlanForm/PlanForm.tsx b/frontend/src/components/Plan/PlanForm/PlanForm.tsxindex 2f7c40e..5ef686a 100644--- a/frontend/src/components/Plan/PlanForm/PlanForm.tsx+++ b/frontend/src/components/Plan/PlanForm/PlanForm.tsx@@ -69,7 +69,8 @@ const PlanForm = ({ title, planSettings, type, onPlanSettingsChange, onSubmit, i<SidePaneltitle={title}icon={<Icon type={'backup'} size={20} />}- width="100%"+ width={type === 'add' ? '100%' : undefined}+ headerWidth={type === 'add' ? '740px' : undefined}close={close}withTabs={true}footer={diff --git a/frontend/src/components/common/SidePanel/SidePanel.module.scss b/frontend/src/components/common/SidePanel/SidePanel.module.scssindex 87c04ea..fc8a2ef 100644--- a/frontend/src/components/common/SidePanel/SidePanel.module.scss+++ b/frontend/src/components/common/SidePanel/SidePanel.module.scss@@ -23,8 +23,9 @@top: 0;box-sizing: border-box;box-shadow: 0 0 20px var(--modal-shadow-color);+transform: translateX(100%);- transition: transform 0.2s ease-out;+ transition: all 0.2s ease-out;&.active {transform: translateX(0);@@ -34,6 +35,19 @@}}+.fullWidth {+ .wrapper {+ opacity: 0;+ transform: scale(0.9);+ filter: blur(10px);+ &.active {+ opacity: 1;+ filter: blur(0);+ transform: scale(1) translateX(0);+ }+ }+}+.header {display: flex;align-items: center;diff --git a/frontend/src/components/common/SidePanel/SidePanel.tsx b/frontend/src/components/common/SidePanel/SidePanel.tsxindex be7c996..712d779 100644--- a/frontend/src/components/common/SidePanel/SidePanel.tsx+++ b/frontend/src/components/common/SidePanel/SidePanel.tsx@@ -8,13 +8,15 @@ type SidePanelProps = {icon: React.ReactNode;children: React.ReactNode;width?: string;+ headerWidth?: string;withTabs?: boolean;footer?: React.ReactNode;close: () => void;};-const SidePanel = ({ close, children, title, icon, footer, width, withTabs }: SidePanelProps) => {+const SidePanel = ({ close, children, title, icon, footer, width, headerWidth, withTabs }: SidePanelProps) => {const [isActive, setIsActive] = useState(false);+ const isFullWidth = width === '100%' || width === '100vw';useEffect(() => {const body = document.querySelector('body');@@ -43,10 +45,10 @@ const SidePanel = ({ close, children, title, icon, footer, width, withTabs }: Si};return createPortal(- <div className={classes.sidePanel}>+ <div className={classes.sidePanel + (isFullWidth ? ` ${classes.fullWidth}` : '')}><div className={`${classes.wrapper} ${isActive ? classes.active : ''} ${withTabs ? classes.noPadding : ''}`} style={{ width: width }}><div className={classes.header}>- <div className={classes.headerContent}>+ <div className={classes.headerContent} style={{ maxWidth: headerWidth ? headerWidth : undefined }}><h3>{icon && icon} {title}</h3>