ARES - authorized red-team engagement automation with dashboard, campaign scope, module orchestration, OPSEC controls, encrypted vault, and reporting.
Python active-directorycloud-securitydefensive-validationfastapigood-first-issuemitre-attackopsecreactred-teamreportingsecurity
feat(ui): add ARES signature crimson plasma shockwave interaction on Sign In button
Mafifrizi4e95e7de45e4
diff --git a/frontend/src/features/auth/AresIgniteButton.tsx b/frontend/src/features/auth/AresIgniteButton.tsxnew file mode 100644index 0000000..8e72c73--- /dev/null+++ b/frontend/src/features/auth/AresIgniteButton.tsx@@ -0,0 +1,91 @@+import { Loader2 } from "lucide-react";+import { ButtonHTMLAttributes, ReactNode, useRef } from "react";++interface AresIgniteButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {+ isLoading?: boolean;+ children: ReactNode;+}++/**+ * ARES Signature Interaction: Crimson Plasma Shockwave on click.+ * On mousedown: spawns an expanding radial shockwave ring (crimson) that erupts+ * outward from the exact click origin and dissolves in 500ms.+ * On hover: laser-border sweep via CSS class.+ * On loading: perimeter crimson pulse + dark inversion.+ * Pure imperative DOM + CSS - no animation library dependency.+ */+export function AresIgniteButton({+ isLoading,+ children,+ onClick,+ disabled,+ className: _className,+ ...props+}: AresIgniteButtonProps) {+ const buttonRef = useRef<HTMLButtonElement>(null);++ function spawnShockwave(e: React.MouseEvent<HTMLButtonElement>) {+ const btn = buttonRef.current;+ if (!btn || disabled || isLoading) return;++ const rect = btn.getBoundingClientRect();++ // Calculate click origin relative to button+ const x = e.clientX - rect.left;+ const y = e.clientY - rect.top;++ // Diameter must cover entire button diagonally+ const diameter = Math.max(rect.width, rect.height) * 2.6;+ const radius = diameter / 2;++ // Spawn the shockwave ring element+ const ring = document.createElement("span");+ ring.style.cssText = `+ position: absolute;+ left: ${x - radius}px;+ top: ${y - radius}px;+ width: ${diameter}px;+ height: ${diameter}px;+ border-radius: 50%;+ pointer-events: none;+ animation: aresShockwave 520ms cubic-bezier(0.22, 1, 0.36, 1) forwards;+ `;++ btn.style.position = "relative";+ btn.style.overflow = "hidden";+ btn.appendChild(ring);++ ring.addEventListener("animationend", () => {+ ring.remove();+ });++ if (onClick) onClick(e);+ }++ return (+ <button+ ref={buttonRef}+ {...props}+ disabled={disabled || isLoading}+ onMouseDown={spawnShockwave}+ className={[+ "w-full mt-2 flex items-center justify-center gap-2 rounded-md px-4 py-2.5 text-sm font-semibold",+ "transition-all duration-200",+ "focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-950",+ "disabled:cursor-not-allowed",+ isLoading+ ? "bg-zinc-950 text-red-400 border border-red-800/60 ares-ignite-loading disabled:opacity-100 focus:ring-red-800/60"+ : "bg-zinc-100 hover:bg-white text-zinc-950 shadow-sm active:scale-[0.98] ares-ignite-idle focus:ring-zinc-400 disabled:opacity-50",+ ].join(" ")}+ >+ {isLoading ? (+ <>+ <Loader2 size={15} className="animate-spin text-red-500 shrink-0" />+ <span>Authenticating...</span>+ </>+ ) : (+ children+ )}+ </button>+ );+}diff --git a/frontend/src/features/auth/LoginPage.tsx b/frontend/src/features/auth/LoginPage.tsxindex 00c02cf..75d679e 100644--- a/frontend/src/features/auth/LoginPage.tsx+++ b/frontend/src/features/auth/LoginPage.tsx@@ -1,6 +1,7 @@-import { AlertCircle, Eye, EyeOff, Loader2 } from "lucide-react";+import { AlertCircle, Eye, EyeOff } from "lucide-react";import { FormEvent, useState } from "react";import { Navigate, useNavigate } from "react-router-dom";+import { AresIgniteButton } from "./AresIgniteButton";import { BackgroundAnimationCanvas } from "./BackgroundAnimationCanvas";import { useAuth } from "./authContext";@@ -112,20 +113,9 @@ export function LoginPage() {</div>)}- <button- className="w-full mt-2 flex items-center justify-center gap-2 rounded-md bg-zinc-100 hover:bg-white active:scale-[0.98] px-4 py-2.5 text-sm font-semibold text-zinc-950 transition-all duration-150 shadow-sm focus:outline-none focus:ring-2 focus:ring-zinc-400 focus:ring-offset-2 focus:ring-offset-zinc-950 disabled:opacity-50 disabled:cursor-not-allowed"- type="submit"- disabled={isSubmitting}- >- {isSubmitting ? (- <>- <Loader2 size={16} className="animate-spin text-zinc-950" />- <span>Signing in...</span>- </>- ) : (- <span>Sign in</span>- )}- </button>+ <AresIgniteButton type="submit" isLoading={isSubmitting} disabled={isSubmitting}>+ Sign in+ </AresIgniteButton></form></div>diff --git a/frontend/src/styles.css b/frontend/src/styles.cssindex a1b0127..679cb2d 100644--- a/frontend/src/styles.css+++ b/frontend/src/styles.css@@ -2278,4 +2278,106 @@ textarea.field {animation: spotlightDrift 14s ease-in-out infinite alternate;}+/* ─────────────────────────────────────────────────────────────────────────────+ ARES SIGNATURE INTERACTION — Crimson Plasma Shockwave+ Triggered imperatively from AresIgniteButton on mousedown.+ The spawned <span> reads this keyframe by name via inline style.+────────────────────────────────────────────────────────────────────────────── */++@keyframes aresShockwave {+ 0% {+ transform: scale(0);+ opacity: 1;+ box-shadow:+ 0 0 0 2px rgba(220, 38, 38, 0.9),+ 0 0 0 4px rgba(220, 38, 38, 0.5),+ 0 0 24px 8px rgba(220, 38, 38, 0.35);+ background: radial-gradient(+ circle,+ rgba(239, 68, 68, 0.25) 0%,+ rgba(220, 38, 38, 0.08) 40%,+ transparent 70%+ );+ }+ 60% {+ opacity: 0.6;+ }+ 100% {+ transform: scale(1);+ opacity: 0;+ box-shadow:+ 0 0 0 1.5px rgba(220, 38, 38, 0.15),+ 0 0 32px 12px rgba(220, 38, 38, 0.04);+ background: transparent;+ }+}++/* Hover: laser-sweep border — crimson line travels the full perimeter once */+.ares-ignite-idle {+ position: relative;+}++.ares-ignite-idle::after {+ content: "";+ position: absolute;+ inset: 0;+ border-radius: inherit;+ /* Conic sweep mask starting from top, rotating clockwise, crimson */+ background: conic-gradient(+ from 0deg,+ transparent 0deg,+ rgba(220, 38, 38, 0.9) 40deg,+ rgba(239, 68, 68, 0.5) 70deg,+ transparent 110deg,+ transparent 360deg+ );+ /* Clip so only the border perimeter is visible */+ -webkit-mask:+ linear-gradient(#fff 0 0) content-box,+ linear-gradient(#fff 0 0);+ -webkit-mask-composite: xor;+ mask-composite: exclude;+ padding: 1.5px;+ opacity: 0;+ transform: rotate(0deg);+ transition: opacity 80ms ease;+ pointer-events: none;+}++.ares-ignite-idle:hover::after {+ opacity: 1;+ animation: aresLaserSweep 750ms cubic-bezier(0.4, 0, 0.2, 1) forwards;+}++@keyframes aresLaserSweep {+ 0% { transform: rotate(0deg); opacity: 1; }+ 85% { transform: rotate(360deg); opacity: 1; }+ 100% { transform: rotate(360deg); opacity: 0; }+}++/* Loading state: slow crimson perimeter pulse — system is active */+.ares-ignite-loading {+ position: relative;+ animation: aresLoadingPulse 1.6s ease-in-out infinite;+}++@keyframes aresLoadingPulse {+ 0%, 100% {+ box-shadow:+ 0 0 0 0 rgba(220, 38, 38, 0),+ inset 0 0 0 0 rgba(220, 38, 38, 0);+ }+ 50% {+ box-shadow:+ 0 0 14px 2px rgba(220, 38, 38, 0.25),+ inset 0 0 8px 0 rgba(220, 38, 38, 0.08);+ }+}++/* Respect reduced-motion: remove all shockwave & sweep animations */+@media (prefers-reduced-motion: reduce) {+ .ares-ignite-idle::after { display: none; }+ .ares-ignite-loading { animation: none; }+}+