A modern, self-hosted backup solution for secure, encrypted backups across local and cloud storage.
fix: update UI elements and improve layout for Plan Creation.
towfiqi40ea0b003acc
diff --git a/frontend/src/components/Plan/PlanForm/PlanForm.module.scss b/frontend/src/components/Plan/PlanForm/PlanForm.module.scssindex 0749339..95a5606 100644--- a/frontend/src/components/Plan/PlanForm/PlanForm.module.scss+++ b/frontend/src/components/Plan/PlanForm/PlanForm.module.scss@@ -3,6 +3,15 @@.steps {@extend %modalSteps;+ display: flex;+ flex-direction: row;+ justify-content: center;++ ul {+ width: 100%;+ max-width: 700px;+ }+&.stepsEdit {& > ul {position: relative;@@ -35,12 +44,29 @@}}+.planFormFooter {+ width: 100%;+ display: flex;+ flex-direction: row;+ justify-content: center;+ .footerContainer {+ width: 100%;+ max-width: 700px;+ display: flex;+ flex-direction: row;+ justify-content: space-between;+ }+}+.formContent {padding: 30px;display: flex;- flex-direction: column;+ flex-direction: row;+ justify-content: center;padding: 30px;- height: calc(100vh - 265px);+ box-sizing: border-box;+ width: 100%;+ height: calc(100vh - 210px);overflow: auto;hr {@@ -48,6 +74,11 @@border: 0;border-top: 1px solid var(--line-color);}++ .planStep {+ width: 100%;+ max-width: 700px;+ }}.backButton {diff --git a/frontend/src/components/Plan/PlanForm/PlanForm.tsx b/frontend/src/components/Plan/PlanForm/PlanForm.tsxindex e1f2a20..9ec9e1f 100644--- a/frontend/src/components/Plan/PlanForm/PlanForm.tsx+++ b/frontend/src/components/Plan/PlanForm/PlanForm.tsx@@ -14,6 +14,7 @@ import { isPlanSettingsValid } from '../../../utils/plans';import IntervalField from '../../common/form/IntervalField/IntervalField';import PlanFormNav from './PlanFormNav';import { useGetDevice } from '../../../services/devices';+import PlanPruneSettings from '../PlanSettings/PlanPruneSettings';type PlanFormProps = {title: string;@@ -39,11 +40,11 @@ const PlanForm = ({ title, planSettings, type, onPlanSettingsChange, onSubmit, iconst buttonTexts: Record<number, { title: string; onClick: () => void }> = {1: {- title: 'Next: Configure Source/Destination',+ title: 'Next: Configure Source & Destination',onClick: () => isPlanSettingsValid(planSettings, step) && setStep(step + 1),},2: {- title: 'Next: Setup Schedule',+ title: 'Next: Setup Schedule & Retention',onClick: () => isPlanSettingsValid(planSettings, step) && setStep(step + 1),},3: { title: 'Next: Advanced Settings', onClick: () => isPlanSettingsValid(planSettings, step) && setStep(step + 1) },@@ -68,31 +69,34 @@ const PlanForm = ({ title, planSettings, type, onPlanSettingsChange, onSubmit, i<SidePaneltitle={title}icon={<Icon type={'backup'} size={20} />}+ width="100%"close={close}withTabs={true}footer={- <>- <div className={classes.footerLeft}>- <div className={classes.summary}>- {type === 'add' && step > 1 && (- <button className={PFClasses.backButton} onClick={() => step > 0 && setStep(step - 1)} disabled={isSubmitting}>- <Icon type="arrow-left" size={14} /> Back+ <div className={PFClasses.planFormFooter}>+ <div className={PFClasses.footerContainer}>+ <div className={classes.footerLeft}>+ <div className={classes.summary}>+ {type === 'add' && step > 1 && (+ <button className={PFClasses.backButton} onClick={() => step > 0 && setStep(step - 1)} disabled={isSubmitting}>+ <Icon type="arrow-left" size={14} /> Back+ </button>+ )}+ </div>+ </div>+ <div className={classes.footerRight}>+ {type === 'add' ? (+ <button className={classes.createButton} onClick={buttonTexts[step].onClick}>+ <Icon type="check" size={12} /> {buttonTexts[step].title}+ </button>+ ) : (+ <button className={classes.createButton} onClick={() => isPlanSettingsValid(planSettings, false) && onSubmit()}>+ <Icon type="check" size={12} /> {'Update Plan'}</button>)}</div></div>- <div className={classes.footerRight}>- {type === 'add' ? (- <button className={classes.createButton} onClick={buttonTexts[step].onClick}>- <Icon type="check" size={12} /> {buttonTexts[step].title}- </button>- ) : (- <button className={classes.createButton} onClick={() => isPlanSettingsValid(planSettings, false) && onSubmit()}>- <Icon type="check" size={12} /> {'Update Plan'}- </button>- )}- </div>- </>+ </div>}><PlanFormNav step={step} type={type} gotoStep={gotoStep} />@@ -236,6 +240,15 @@ const PlanForm = ({ title, planSettings, type, onPlanSettingsChange, onSubmit, ihint="Number of Active Restorable Snapshots to Keep"/></div>+ <PlanPruneSettings+ plan={planSettings}+ onUpdate={(pruneSettings) =>+ onPlanSettingsChange({+ ...planSettings,+ settings: { ...planSettings.settings, prune: pruneSettings },+ })+ }+ /></div>)}{step === 4 && (diff --git a/frontend/src/components/Plan/PlanForm/PlanFormNav.tsx b/frontend/src/components/Plan/PlanForm/PlanFormNav.tsxindex 31ff8c5..e509c19 100644--- a/frontend/src/components/Plan/PlanForm/PlanFormNav.tsx+++ b/frontend/src/components/Plan/PlanForm/PlanFormNav.tsx@@ -32,7 +32,7 @@ const PlanFormNav = ({ step, type, gotoStep }: PlanFProps) => {{step === 2 ? '●' : ''}</span><i>- <Icon type="folders" size={12} /> Source/Destination+ <Icon type="folders" size={12} /> Source & Destination</i></li><li@@ -44,7 +44,7 @@ const PlanFormNav = ({ step, type, gotoStep }: PlanFProps) => {{step === 3 ? '●' : ''}</span><i>- <Icon type="clock" size={12} /> Schedule+ <Icon type="clock" size={12} /> Schedule & Retention</i></li><li className={` ${step === 4 ? PFClasses.stepCurrent : ''}`} onClick={() => gotoStep(4)}>diff --git a/frontend/src/components/Plan/PlanSettings/PlanAdvancedSettings.tsx b/frontend/src/components/Plan/PlanSettings/PlanAdvancedSettings.tsxindex 9008e7f..50fd6fd 100644--- a/frontend/src/components/Plan/PlanSettings/PlanAdvancedSettings.tsx+++ b/frontend/src/components/Plan/PlanSettings/PlanAdvancedSettings.tsx@@ -56,9 +56,9 @@ const PlanAdvancedSettings = ({ plan, appSettings, device, onUpdate }: PlanAdvan<li onClick={() => setAdvancedTab('General')} className={advancedTab === 'General' ? classes.advancedTabActive : ''}><Icon size={13} type="folders" /> General</li>- <li onClick={() => setAdvancedTab('Prune')} className={advancedTab === 'Prune' ? classes.advancedTabActive : ''}>+ {/* <li onClick={() => setAdvancedTab('Prune')} className={advancedTab === 'Prune' ? classes.advancedTabActive : ''}><Icon size={13} type="prune" /> Prune- </li>+ </li> */}<li onClick={() => setAdvancedTab('Performance')} className={advancedTab === 'Performance' ? classes.advancedTabActive : ''}><Icon size={13} type="performance" /> Performance</li>@@ -88,9 +88,9 @@ const PlanAdvancedSettings = ({ plan, appSettings, device, onUpdate }: PlanAdvan}/>)}- {advancedTab === 'Prune' && (+ {/* {advancedTab === 'Prune' && (<PlanPruneSettings plan={plan} onUpdate={(prune) => onUpdate({ ...plan, settings: { ...settings, prune } })} />- )}+ )} */}{advancedTab === 'Performance' && (<PlanPerformanceSettings plan={plan} onUpdate={(performance) => onUpdate({ ...plan, settings: { ...settings, performance } })} />)}