import { KeyRound, ShieldCheck } from "lucide-react"; import { useState, type FormEvent } from "react"; import { useDeploymentProfile } from "../deployment/DeploymentProfileContext"; import { apiOrigin } from "../lib/api"; export function ActivationPage() { const { profile, refreshProfile } = useDeploymentProfile(); const [code, setCode] = useState(""); const [busy, setBusy] = useState(false); const [error, setError] = useState(""); async function submit(event: FormEvent) { event.preventDefault(); setBusy(true); setError(""); try { const response = await fetch(`${apiOrigin}/api/v1/deployment/activation`, { method: "POST", credentials: "include", headers: { Accept: "application/json", "Content-Type": "application/json" }, body: JSON.stringify({ activationCode: code.trim() }) }); if (!response.ok) { throw new Error("مشکلی پیش آمده است. لطفاً با پشتیبانی تماس بگیرید."); } await refreshProfile(); } catch { setError("مشکلی پیش آمده است. لطفاً با پشتیبانی تماس بگیرید."); } finally { setBusy(false); } } return

{profile.branding.applicationTitle}

{profile.company.displayName}

فعال‌سازی سامانه

این نسخه تا زمان ثبت کد معتبر قابل استفاده نیست.

شناسه ۶۴ کاراکتری سرور{profile.activation.fingerprintLength} / 64
{profile.activation.serverFingerprint}
{error &&
{error}
}