mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-20 03:46:38 +00:00
Merge branch 'dev' of https://github.com/fosrl/pangolin into dev
This commit is contained in:
@@ -352,7 +352,7 @@ export default function ReverseProxyTargets(props: {
|
||||
},
|
||||
{
|
||||
accessorKey: "ip",
|
||||
header: "IP Address",
|
||||
header: "IP / Hostname",
|
||||
cell: ({ row }) => (
|
||||
<Input
|
||||
defaultValue={row.original.ip}
|
||||
|
||||
@@ -14,7 +14,7 @@ import { XCircle } from "lucide-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
type InviteStatusCardProps = {
|
||||
type: "rejected" | "wrong_user" | "user_does_not_exist";
|
||||
type: "rejected" | "wrong_user" | "user_does_not_exist" | "not_logged_in";
|
||||
token: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ export default async function InvitePage(props: {
|
||||
)
|
||||
) {
|
||||
return "user_does_not_exist";
|
||||
} else if (error.includes("You must be logged in to accept an invite")) {
|
||||
return "not_logged_in";
|
||||
} else {
|
||||
return "rejected";
|
||||
}
|
||||
@@ -71,6 +73,10 @@ export default async function InvitePage(props: {
|
||||
redirect(`/auth/signup?redirect=/invite?token=${params.token}`);
|
||||
}
|
||||
|
||||
if (!user && type === "not_logged_in") {
|
||||
redirect(`/auth/login?redirect=/invite?token=${params.token}`);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<InviteStatusCard type={type} token={tokenParam} />
|
||||
|
||||
Reference in New Issue
Block a user