fix(setup): make SMTP optional and adjust setup check

This commit is contained in:
DanielS
2026-08-11 17:27:14 +02:00
parent 1478c61ea8
commit 866c5522f2
2 changed files with 24 additions and 24 deletions

View File

@@ -44,14 +44,13 @@ export function SetupWizard() {
adminForm.firstName.trim().length > 0 &&
adminForm.lastName.trim().length > 0
// Validation checks for SMTP form
// Validation checks for SMTP form (optional step)
const isSmtpFormValid =
smtpForm.host.trim().length > 0 &&
!isNaN(Number(smtpForm.port)) &&
smtpForm.user.trim().length > 0
smtpForm.host.trim().length === 0 ||
(!isNaN(Number(smtpForm.port)) && smtpForm.user.trim().length > 0)
const handleFinishSetup = async () => {
if (!isAdminFormValid || !isSmtpFormValid) return
if (!isAdminFormValid) return
setLoading(true)
setErrorMsg('')