mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-01 10:11:51 +00:00
Merge branch 'dev' into alerting-rules
This commit is contained in:
@@ -477,7 +477,7 @@ export default function BillingPage() {
|
||||
};
|
||||
|
||||
const handleContactUs = () => {
|
||||
window.open("https://pangolin.net/talk-to-us", "_blank");
|
||||
window.open("https://pangolin.net/contact", "_blank");
|
||||
};
|
||||
|
||||
// Get current plan ID from tier
|
||||
@@ -558,6 +558,14 @@ export default function BillingPage() {
|
||||
// Get button label and action for each plan
|
||||
const getPlanAction = (plan: PlanOption) => {
|
||||
if (plan.id === "enterprise") {
|
||||
if (plan.id === currentPlanId) {
|
||||
return {
|
||||
label: "Manage Current Plan",
|
||||
action: handleModifySubscription,
|
||||
variant: "default" as const,
|
||||
disabled: false
|
||||
};
|
||||
}
|
||||
return {
|
||||
label: "Contact Us",
|
||||
action: handleContactUs,
|
||||
|
||||
@@ -161,16 +161,13 @@ export default function Page() {
|
||||
description: t("siteNewtTunnelDescription"),
|
||||
disabled: true
|
||||
},
|
||||
...(env.flags.disableBasicWireguardSites
|
||||
...(env.flags.disableBasicWireguardSites || build == "saas"
|
||||
? []
|
||||
: [
|
||||
{
|
||||
id: "wireguard" as SiteType,
|
||||
title: t("siteWg"),
|
||||
description:
|
||||
build == "saas"
|
||||
? t("siteWgDescriptionSaas")
|
||||
: t("siteWgDescription"),
|
||||
description: t("siteWgDescription"),
|
||||
disabled: true
|
||||
}
|
||||
]),
|
||||
@@ -426,9 +423,22 @@ export default function Page() {
|
||||
}));
|
||||
|
||||
setRemoteExitNodeOptions(exitNodeOptions);
|
||||
|
||||
if (exitNodeOptions.length === 0) {
|
||||
// No remote exit nodes available — remove local option and default to newt
|
||||
setTunnelTypes((prev: any) =>
|
||||
prev.filter((item: any) => item.id !== "local")
|
||||
);
|
||||
form.setValue("method", "newt");
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to fetch remote exit nodes:", error);
|
||||
// If fetch fails, no remote exit nodes available — remove local option and default to newt
|
||||
setTunnelTypes((prev: any) =>
|
||||
prev.filter((item: any) => item.id !== "local")
|
||||
);
|
||||
form.setValue("method", "newt");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user