mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-26 19:23:41 +00:00
Merge branch 'dev' into feat/login-page-customization
This commit is contained in:
@@ -458,12 +458,15 @@ function AuthPageSettings({
|
||||
orgId={org?.org.orgId as string}
|
||||
cols={1}
|
||||
onDomainChange={(res) => {
|
||||
const selected = {
|
||||
domainId: res.domainId,
|
||||
subdomain: res.subdomain,
|
||||
fullDomain: res.fullDomain,
|
||||
baseDomain: res.baseDomain
|
||||
};
|
||||
const selected =
|
||||
res === null
|
||||
? null
|
||||
: {
|
||||
domainId: res.domainId,
|
||||
subdomain: res.subdomain,
|
||||
fullDomain: res.fullDomain,
|
||||
baseDomain: res.baseDomain
|
||||
};
|
||||
setSelectedDomain(selected);
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -29,14 +29,15 @@ export default function CertificateStatus({
|
||||
pollingInterval = 5000
|
||||
}: CertificateStatusProps) {
|
||||
const t = useTranslations();
|
||||
const { cert, certLoading, certError, refreshing, refreshCert } = useCertificate({
|
||||
orgId,
|
||||
domainId,
|
||||
fullDomain,
|
||||
autoFetch,
|
||||
polling,
|
||||
pollingInterval
|
||||
});
|
||||
const { cert, certLoading, certError, refreshing, refreshCert } =
|
||||
useCertificate({
|
||||
orgId,
|
||||
domainId,
|
||||
fullDomain,
|
||||
autoFetch,
|
||||
polling,
|
||||
pollingInterval
|
||||
});
|
||||
|
||||
const handleRefresh = async () => {
|
||||
await refreshCert();
|
||||
@@ -63,7 +64,8 @@ export default function CertificateStatus({
|
||||
status === "failed" ||
|
||||
status === "expired" ||
|
||||
(status === "requested" &&
|
||||
updatedAt && new Date(updatedAt).getTime() < Date.now() - 5 * 60 * 1000)
|
||||
updatedAt &&
|
||||
new Date(updatedAt).getTime() < Date.now() - 5 * 60 * 1000)
|
||||
);
|
||||
};
|
||||
|
||||
@@ -90,9 +92,7 @@ export default function CertificateStatus({
|
||||
{t("certificateStatus")}:
|
||||
</span>
|
||||
)}
|
||||
<span className="text-sm text-red-500">
|
||||
{certError}
|
||||
</span>
|
||||
<span className="text-sm text-red-500">{certError}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -129,7 +129,9 @@ export default function CertificateStatus({
|
||||
className="ml-2 p-0 h-auto align-middle"
|
||||
onClick={handleRefresh}
|
||||
disabled={refreshing}
|
||||
title={t("restartCertificate", { defaultValue: "Restart Certificate" })}
|
||||
title={t("restartCertificate", {
|
||||
defaultValue: "Restart Certificate"
|
||||
})}
|
||||
>
|
||||
<RotateCw
|
||||
className={`w-4 h-4 ${refreshing ? "animate-spin" : ""}`}
|
||||
|
||||
@@ -59,7 +59,6 @@ export default function IdpTable({ idps, orgId }: Props) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const columns: ExtendedColumnDef<IdpRow>[] = [
|
||||
{
|
||||
accessorKey: "idpId",
|
||||
@@ -114,14 +113,12 @@ export default function IdpTable({ idps, orgId }: Props) {
|
||||
cell: ({ row }) => {
|
||||
const type = row.original.type;
|
||||
const variant = row.original.variant;
|
||||
return (
|
||||
<IdpTypeBadge type={type} variant={variant} />
|
||||
);
|
||||
return <IdpTypeBadge type={type} variant={variant} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "actions",
|
||||
header: () => (<span className="p-3">{t("actions")}</span>),
|
||||
header: () => <span className="p-3">{t("actions")}</span>,
|
||||
cell: ({ row }) => {
|
||||
const siteRow = row.original;
|
||||
return (
|
||||
@@ -156,10 +153,10 @@ export default function IdpTable({ idps, orgId }: Props) {
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
<Link href={`/${orgId}/settings/idp/${siteRow.idpId}/general`}>
|
||||
<Button
|
||||
variant={"outline"}
|
||||
>
|
||||
<Link
|
||||
href={`/${orgId}/settings/idp/${siteRow.idpId}/general`}
|
||||
>
|
||||
<Button variant={"outline"}>
|
||||
{t("edit")}
|
||||
<ArrowRight className="ml-2 w-4 h-4" />
|
||||
</Button>
|
||||
@@ -180,13 +177,9 @@ export default function IdpTable({ idps, orgId }: Props) {
|
||||
setSelectedIdp(null);
|
||||
}}
|
||||
dialog={
|
||||
<div>
|
||||
<p>
|
||||
{t("idpQuestionRemove")}
|
||||
</p>
|
||||
<p>
|
||||
{t("idpMessageRemove")}
|
||||
</p>
|
||||
<div className="space-y-2">
|
||||
<p>{t("idpQuestionRemove")}</p>
|
||||
<p>{t("idpMessageRemove")}</p>
|
||||
</div>
|
||||
}
|
||||
buttonText={t("idpConfirmDelete")}
|
||||
|
||||
@@ -45,13 +45,13 @@ export default function RegionSelector() {
|
||||
return (
|
||||
<div className="flex flex-col items-center space-y-2">
|
||||
<label className="flex items-center gap-1 text-sm font-medium text-muted-foreground">
|
||||
{t('regionSelectorTitle')}
|
||||
<InfoPopup info={t('regionSelectorInfo')} />
|
||||
{t("regionSelectorTitle")}
|
||||
<InfoPopup info={t("regionSelectorInfo")} />
|
||||
</label>
|
||||
|
||||
<Select value={selectedRegion} onValueChange={handleRegionChange}>
|
||||
<SelectTrigger className="w-[200px]">
|
||||
<SelectValue placeholder={t('regionSelectorPlaceholder')} />
|
||||
<SelectValue placeholder={t("regionSelectorPlaceholder")} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{regions.map((region) => (
|
||||
@@ -74,7 +74,7 @@ export default function RegionSelector() {
|
||||
</span>
|
||||
{region.value === "eu" && (
|
||||
<span className="text-xs text-muted-foreground">
|
||||
{t('regionSelectorComingSoon')}
|
||||
{t("regionSelectorComingSoon")}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user