diff --git a/messages/en-US.json b/messages/en-US.json index d80f27bb..6042fd66 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -1807,11 +1807,12 @@ "idpAzureDescription": "Microsoft Azure OAuth2/OIDC provider", "subnet": "Subnet", "subnetDescription": "The subnet for this organization's network configuration.", - "authPage": "Auth Page", - "authPageDescription": "Configure the auth page for the organization", + "customDomain": "Custom Domain", + "authPage": "Authentication Pages", + "authPageDescription": "Set a custom domain for the organization's authentication pages", "authPageDomain": "Auth Page Domain", - "authPageBranding": "Branding", - "authPageBrandingDescription": "Configure the branding for the auth page for your organization", + "authPageBranding": "Custom Branding", + "authPageBrandingDescription": "Configure the branding that appears on authentication pages for this organization", "authPageBrandingUpdated": "Auth page Branding updated successfully", "authPageBrandingRemoved": "Auth page Branding removed successfully", "authPageBrandingRemoveTitle": "Remove Auth Page Branding", @@ -1838,7 +1839,7 @@ "setAuthPageDomain": "Set Auth Page Domain", "failedToFetchCertificate": "Failed to fetch certificate", "failedToRestartCertificate": "Failed to restart certificate", - "addDomainToEnableCustomAuthPages": "Add a domain to enable custom authentication pages for the organization", + "addDomainToEnableCustomAuthPages": "Users will be able to access the organization's login page and complete resource authentication using this domain.", "selectDomainForOrgAuthPage": "Select a domain for the organization's authentication page", "domainPickerProvidedDomain": "Provided Domain", "domainPickerFreeProvidedDomain": "Free Provided Domain", @@ -2303,5 +2304,9 @@ "allPortsAllowed": "All Ports Allowed", "allPortsBlocked": "All Ports Blocked", "tcpPortsDescription": "Specify which TCP ports are allowed for this resource. Use '*' for all ports, leave empty to block all, or enter a comma-separated list of ports and ranges (e.g., 80,443,8000-9000).", - "udpPortsDescription": "Specify which UDP ports are allowed for this resource. Use '*' for all ports, leave empty to block all, or enter a comma-separated list of ports and ranges (e.g., 53,123,500-600)." + "udpPortsDescription": "Specify which UDP ports are allowed for this resource. Use '*' for all ports, leave empty to block all, or enter a comma-separated list of ports and ranges (e.g., 53,123,500-600).", + "organizationLoginPageTitle": "Organization Login Page", + "organizationLoginPageDescription": "Customize the login page for this organization", + "resourceLoginPageTitle": "Resource Login Page", + "resourceLoginPageDescription": "Customize the login page for individual resources" } diff --git a/src/app/[orgId]/settings/general/auth-page/page.tsx b/src/app/[orgId]/settings/general/auth-page/page.tsx index 139449bf..0944c9f7 100644 --- a/src/app/[orgId]/settings/general/auth-page/page.tsx +++ b/src/app/[orgId]/settings/general/auth-page/page.tsx @@ -1,19 +1,16 @@ import AuthPageBrandingForm from "@app/components/AuthPageBrandingForm"; import AuthPageSettings from "@app/components/private/AuthPageSettings"; import { SettingsContainer } from "@app/components/Settings"; -import { internal, priv } from "@app/lib/api"; +import { internal } from "@app/lib/api"; import { authCookieHeader } from "@app/lib/api/cookies"; import { getCachedSubscription } from "@app/lib/api/getCachedSubscription"; -import { pullEnv } from "@app/lib/pullEnv"; import { build } from "@server/build"; -import { TierId } from "@server/lib/billing/tiers"; import type { GetOrgTierResponse } from "@server/routers/billing/types"; import { GetLoginPageBrandingResponse, GetLoginPageResponse } from "@server/routers/loginPage/types"; import { AxiosResponse } from "axios"; -import { redirect } from "next/navigation"; export interface AuthPageProps { params: Promise<{ orgId: string }>; @@ -21,20 +18,11 @@ export interface AuthPageProps { export default async function AuthPage(props: AuthPageProps) { const orgId = (await props.params).orgId; - const env = pullEnv(); let subscriptionStatus: GetOrgTierResponse | null = null; try { const subRes = await getCachedSubscription(orgId); subscriptionStatus = subRes.data.data; } catch {} - const subscribed = - build === "enterprise" - ? true - : subscriptionStatus?.tier === TierId.STANDARD; - - if (!subscribed) { - redirect(env.app.dashboardUrl); - } let loginPage: GetLoginPageResponse | null = null; try { diff --git a/src/components/AuthPageBrandingForm.tsx b/src/components/AuthPageBrandingForm.tsx index 136e97f1..67e2232f 100644 --- a/src/components/AuthPageBrandingForm.tsx +++ b/src/components/AuthPageBrandingForm.tsx @@ -25,25 +25,16 @@ import { useTranslations } from "next-intl"; import type { GetLoginPageBrandingResponse } from "@server/routers/loginPage/types"; import { Input } from "./ui/input"; -import { Trash2, XIcon } from "lucide-react"; +import { ExternalLink, InfoIcon, XIcon } from "lucide-react"; import { Button } from "./ui/button"; -import { Separator } from "./ui/separator"; import { createApiClient, formatAxiosError } from "@app/lib/api"; import { useEnvContext } from "@app/hooks/useEnvContext"; import { useRouter } from "next/navigation"; import { toast } from "@app/hooks/useToast"; -import { - Credenza, - CredenzaBody, - CredenzaClose, - CredenzaContent, - CredenzaFooter, - CredenzaHeader, - CredenzaTitle -} from "./Credenza"; import { usePaidStatus } from "@app/hooks/usePaidStatus"; import { build } from "@server/build"; import { PaidFeaturesAlert } from "./PaidFeaturesAlert"; +import { Alert, AlertDescription, AlertTitle } from "./ui/alert"; export type AuthPageCustomizationProps = { orgId: string; @@ -99,7 +90,7 @@ export default function AuthPageBrandingForm({ deleteBranding, null ); - const [isDeleteModalOpen, setIsDeleteModalOpen] = useState(false); + const [setIsDeleteModalOpen] = useState(false); const t = useTranslations(); @@ -166,7 +157,6 @@ export default function AuthPageBrandingForm({ if (updateRes.status === 200) { router.refresh(); form.reset(); - setIsDeleteModalOpen(false); toast({ variant: "default", @@ -198,15 +188,15 @@ export default function AuthPageBrandingForm({ - - + +
- +
+ + {t( + "organizationLoginPageTitle" + )} + + + {t( + "organizationLoginPageDescription" + )} + +
- - {t( - "brandingOrgDescription", - { - orgName: - "{{orgName}}" - } - )} - )} @@ -345,15 +337,6 @@ export default function AuthPageBrandingForm({ - - {t( - "brandingOrgDescription", - { - orgName: - "{{orgName}}" - } - )} - )} @@ -362,7 +345,14 @@ export default function AuthPageBrandingForm({ )} - +
+ + {t("resourceLoginPageTitle")} + + + {t("resourceLoginPageDescription")} + +
- - {t( - "brandingResourceDescription", - { - resourceName: - "{{resourceName}}" - } - )} - )} @@ -403,15 +384,6 @@ export default function AuthPageBrandingForm({ - - {t( - "brandingResourceDescription", - { - resourceName: - "{{resourceName}}" - } - )} - )} @@ -422,44 +394,6 @@ export default function AuthPageBrandingForm({ - - - - - {t("authPageBrandingRemoveTitle")} - - - -

{t("authPageBrandingQuestionRemove")}

-
- {t("cannotbeUndone")} -
- -
- - - - - - -
-
-
{branding && ( )}