Fully autonomous AI Agents system capable of performing complex penetration testing tasks
Go ai-agentsai-security-toolanthropicautonomous-agentsgolanggptgraphqlmulti-agent-systemoffensive-securityopen-sourceopenaipenetration-testingpenetration-testing-toolsreactsecurity-automationsecurity-testingsecurity-toolsself-hosted
refactor(webui): drop redundant isModal/showSkip flags from account forms
Sergey Kozyrenko6000bc83104f
diff --git a/frontend/src/features/authentication/email-change-form.tsx b/frontend/src/features/authentication/email-change-form.tsxindex 4eadb637..cbca2709 100644--- a/frontend/src/features/authentication/email-change-form.tsx+++ b/frontend/src/features/authentication/email-change-form.tsx@@ -31,14 +31,13 @@ const ERROR_BY_CODE: Record<string, string> = {};interface EmailChangeFormProps {- isModal?: boolean;onCancel?: () => void;onSuccess?: () => void;}type EmailChangeFormValues = z.infer<typeof emailChangeSchema>;-export function EmailChangeForm({ isModal = true, onCancel, onSuccess }: EmailChangeFormProps) {+export function EmailChangeForm({ onCancel, onSuccess }: EmailChangeFormProps) {const [error, setError] = useState<null | string>(null);const { patchUser, refreshAuthInfo } = useUser();@@ -115,7 +114,7 @@ export function EmailChangeForm({ isModal = true, onCancel, onSuccess }: EmailCh{error && <div className="text-destructive text-sm">{error}</div>}<div className="flex justify-end gap-2 pt-2">- {isModal && (+ {onCancel && (<ButtononClick={onCancel}size="sm"diff --git a/frontend/src/features/authentication/login-form.tsx b/frontend/src/features/authentication/login-form.tsxindex 1e20a8b8..6069454d 100644--- a/frontend/src/features/authentication/login-form.tsx+++ b/frontend/src/features/authentication/login-form.tsx@@ -162,10 +162,8 @@ function LoginForm({ providers, returnUrl = routes.newFlow }: LoginFormProps) {You need to change your password before continuing.</p><PasswordChangeForm- isModal={false}onSkip={handleSkipPasswordChange}onSuccess={handlePasswordChangeSuccess}- showSkip={true}/></div>);diff --git a/frontend/src/features/authentication/name-change-form.tsx b/frontend/src/features/authentication/name-change-form.tsxindex 4b46434a..cccc4b5f 100644--- a/frontend/src/features/authentication/name-change-form.tsx+++ b/frontend/src/features/authentication/name-change-form.tsx@@ -25,14 +25,13 @@ const ERROR_BY_CODE: Record<string, string> = {};interface NameChangeFormProps {- isModal?: boolean;onCancel?: () => void;onSuccess?: () => void;}type NameChangeFormValues = z.infer<typeof nameChangeSchema>;-export function NameChangeForm({ isModal = true, onCancel, onSuccess }: NameChangeFormProps) {+export function NameChangeForm({ onCancel, onSuccess }: NameChangeFormProps) {const [error, setError] = useState<null | string>(null);const { authInfo, patchUser, refreshAuthInfo } = useUser();@@ -86,7 +85,7 @@ export function NameChangeForm({ isModal = true, onCancel, onSuccess }: NameChan{error && <div className="text-destructive text-sm">{error}</div>}<div className="flex justify-end gap-2 pt-2">- {isModal && (+ {onCancel && (<ButtononClick={onCancel}size="sm"diff --git a/frontend/src/features/authentication/password-change-form.tsx b/frontend/src/features/authentication/password-change-form.tsxindex c81faabe..788b5077 100644--- a/frontend/src/features/authentication/password-change-form.tsx+++ b/frontend/src/features/authentication/password-change-form.tsx@@ -55,22 +55,14 @@ const ERROR_BY_CODE: Record<string, string> = {};interface PasswordChangeFormProps {- isModal?: boolean;onCancel?: () => void;onSkip?: () => void;onSuccess?: () => void;- showSkip?: boolean;}type PasswordChangeFormValues = z.infer<typeof passwordChangeSchema>;-export function PasswordChangeForm({- isModal = true,- onCancel,- onSkip,- onSuccess,- showSkip = false,-}: PasswordChangeFormProps) {+export function PasswordChangeForm({ onCancel, onSkip, onSuccess }: PasswordChangeFormProps) {const [error, setError] = useState<null | string>(null);const form = useForm<PasswordChangeFormValues>({@@ -165,7 +157,7 @@ export function PasswordChangeForm({{error && <div className="text-destructive text-sm">{error}</div>}<div className="flex justify-end gap-2 pt-2">- {showSkip && (+ {onSkip && (<ButtonclassName="text-muted-foreground"onClick={onSkip}@@ -176,7 +168,7 @@ export function PasswordChangeForm({Skip for now</Button>)}- {isModal && (+ {onCancel && (<ButtononClick={onCancel}size="sm"