diff --git a/apps/web/src/components/SecurityWarningBanner.tsx b/apps/web/src/components/SecurityWarningBanner.tsx index 00149dc..fb2bab8 100644 --- a/apps/web/src/components/SecurityWarningBanner.tsx +++ b/apps/web/src/components/SecurityWarningBanner.tsx @@ -8,28 +8,40 @@ interface SecurityWarningBannerProps { } export function SecurityWarningBanner({status}: SecurityWarningBannerProps) { - // Don't show if no warnings or already disabled - if (status.warnings.length === 0 || status.shouldDisable) { + // Don't show if no warnings or violations + const hasCriticalViolations = status.violations.length > 0; + const hasWarnings = status.warnings.length > 0; + + if (!hasCriticalViolations && !hasWarnings) { return null; } + // Determine severity - critical violations take precedence + const variant = hasCriticalViolations ? 'destructive' : 'warning'; + const title = hasCriticalViolations + ? 'Critical Security Violations - Immediate Action Required' + : 'Security Warning - Action Required'; + const issues = hasCriticalViolations ? status.violations : status.warnings; + const messageColor = hasCriticalViolations ? 'text-red-800' : 'text-amber-800'; + return ( - + - Security Warning - Action Required + {title}

Your project has exceeded the following security thresholds:

-
    - {status.warnings.map((warning, idx) => ( -
  • {warning}
  • +
      + {issues.map((issue, idx) => ( +
    • {issue}
    • ))}
    -

    - High bounce or complaint rates can lead to project suspension. Review the detailed metrics - and take action to improve your email quality. +

    + {hasCriticalViolations + ? 'Your project may be suspended soon. Please review the detailed metrics immediately and take action to improve your email quality.' + : 'High bounce or complaint rates can lead to project suspension. Review the detailed metrics and take action to improve your email quality.'}

diff --git a/apps/web/src/pages/index.tsx b/apps/web/src/pages/index.tsx index 0d6aec9..4439884 100644 --- a/apps/web/src/pages/index.tsx +++ b/apps/web/src/pages/index.tsx @@ -86,11 +86,32 @@ export default function Index() { Project Disabled - Read-Only Mode - - This project has been disabled due to security violations (high bounce or complaint rates). All - scheduled campaigns and workflows have been cancelled. The project is now in read-only mode - you can - view your data but cannot create, update, or delete anything. Please contact support to resolve this - issue. + +
+

+ This project has been disabled due to security violations. All scheduled campaigns and workflows + have been cancelled. The project is now in read-only mode - you can view your data but cannot + create, update, or delete anything. +

+ {securityMetrics && securityMetrics.status.violations.length > 0 && ( + <> +

Security violations that caused suspension:

+
    + {securityMetrics.status.violations.map((violation, idx) => ( +
  • {violation}
  • + ))} +
+ + )} +

+ Please contact support to resolve this issue and get your project re-enabled. +

+
+ + +
)}