mirror of
https://github.com/fosrl/pangolin.git
synced 2026-10-12 15:49:09 +02:00
Merge branch 'site-exit-node' into dev
This commit is contained in:
@@ -93,7 +93,8 @@ export function PrivateResourceInfoSections({
|
||||
cidr: t("editInternalResourceDialogModeCidr"),
|
||||
http: t("editInternalResourceDialogModeHttp"),
|
||||
ssh: t("editInternalResourceDialogModeSsh"),
|
||||
inference: t("editInternalResourceDialogModeInference")
|
||||
inference: t("editInternalResourceDialogModeInference"),
|
||||
gateway: t("editInternalResourceDialogModeGateway")
|
||||
};
|
||||
|
||||
const destination = formatSiteResourceDestinationDisplay({
|
||||
@@ -107,15 +108,19 @@ export function PrivateResourceInfoSections({
|
||||
tcpPortRangeString: siteResource.tcpPortRangeString ?? "*",
|
||||
udpPortRangeString: siteResource.udpPortRangeString ?? "*"
|
||||
});
|
||||
const showAccess = siteResource.mode !== "gateway";
|
||||
const showAlias =
|
||||
siteResource.mode !== "cidr" &&
|
||||
siteResource.mode !== "http" &&
|
||||
siteResource.mode !== "inference";
|
||||
siteResource.mode !== "inference" &&
|
||||
siteResource.mode !== "gateway";
|
||||
const showDestination =
|
||||
!(
|
||||
siteResource.mode === "ssh" &&
|
||||
siteResource.authDaemonMode === "native"
|
||||
) && siteResource.mode !== "inference";
|
||||
) &&
|
||||
siteResource.mode !== "inference" &&
|
||||
siteResource.mode !== "gateway";
|
||||
const showCertificate = !!(
|
||||
(siteResource.mode === "http" || siteResource.mode === "inference") &&
|
||||
siteResource.ssl &&
|
||||
@@ -128,7 +133,8 @@ export function PrivateResourceInfoSections({
|
||||
siteResource.mode !== "inference";
|
||||
|
||||
const numSections =
|
||||
2 +
|
||||
1 +
|
||||
(showAccess ? 1 : 0) +
|
||||
(showDestination ? 1 : 0) +
|
||||
(showAlias ? 1 : 0) +
|
||||
(showCertificate ? 1 : 0) +
|
||||
@@ -143,17 +149,19 @@ export function PrivateResourceInfoSections({
|
||||
</InfoSectionContent>
|
||||
</InfoSection>
|
||||
|
||||
<InfoSection>
|
||||
<InfoSectionTitle>{t("access")}</InfoSectionTitle>
|
||||
<InfoSectionContent>
|
||||
<AccessMethodContent
|
||||
accessDisplay={access.accessDisplay}
|
||||
accessCopyValue={access.accessCopyValue}
|
||||
accessUrl={access.accessUrl}
|
||||
className={accessClassName}
|
||||
/>
|
||||
</InfoSectionContent>
|
||||
</InfoSection>
|
||||
{showAccess ? (
|
||||
<InfoSection>
|
||||
<InfoSectionTitle>{t("access")}</InfoSectionTitle>
|
||||
<InfoSectionContent>
|
||||
<AccessMethodContent
|
||||
accessDisplay={access.accessDisplay}
|
||||
accessCopyValue={access.accessCopyValue}
|
||||
accessUrl={access.accessUrl}
|
||||
className={accessClassName}
|
||||
/>
|
||||
</InfoSectionContent>
|
||||
</InfoSection>
|
||||
) : null}
|
||||
|
||||
{showDestination ? (
|
||||
<InfoSection>
|
||||
|
||||
@@ -376,7 +376,8 @@ export default function PrivateResourcesTable({
|
||||
cidr: t("editInternalResourceDialogModeCidr"),
|
||||
http: t("editInternalResourceDialogModeHttp"),
|
||||
ssh: t("editInternalResourceDialogModeSsh"),
|
||||
inference: t("editInternalResourceDialogModeInference")
|
||||
inference: t("editInternalResourceDialogModeInference"),
|
||||
gateway: t("editInternalResourceDialogModeGateway")
|
||||
};
|
||||
return <span>{modeLabels[resourceRow.mode]}</span>;
|
||||
}
|
||||
@@ -392,7 +393,11 @@ export default function PrivateResourcesTable({
|
||||
cell: ({ row }) => {
|
||||
const resourceRow = row.original;
|
||||
const display = formatDestinationDisplay(resourceRow);
|
||||
if (resourceRow.destination) {
|
||||
if (
|
||||
resourceRow.destination &&
|
||||
resourceRow.mode !== "gateway"
|
||||
) {
|
||||
// don't show the gateway resource destination which is 0.0.0.0/0 to not confuse people
|
||||
return (
|
||||
<CopyToClipboard
|
||||
text={display}
|
||||
|
||||
@@ -71,7 +71,8 @@ function PrivateResourceMeta({ row }: { row: SiteResourceRow }) {
|
||||
cidr: t("editInternalResourceDialogModeCidr"),
|
||||
http: t("editInternalResourceDialogModeHttp"),
|
||||
ssh: t("editInternalResourceDialogModeSsh"),
|
||||
inference: t("editInternalResourceDialogModeInference")
|
||||
inference: t("editInternalResourceDialogModeInference"),
|
||||
gateway: t("editInternalResourceDialogModeGateway")
|
||||
};
|
||||
const dest = formatSiteResourceDestinationDisplay({
|
||||
mode: row.mode,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import React from "react";
|
||||
import { Button } from "@app/components/ui/button";
|
||||
import { ClockIcon, ArrowRight } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
@@ -8,9 +7,13 @@ import DismissableBanner from "./DismissableBanner";
|
||||
|
||||
type TrialBillingBannerProps = {
|
||||
onUpgrade: () => void;
|
||||
tierName: string;
|
||||
};
|
||||
|
||||
export const TrialBillingBanner = ({ onUpgrade }: TrialBillingBannerProps) => {
|
||||
export const TrialBillingBanner = ({
|
||||
onUpgrade,
|
||||
tierName
|
||||
}: TrialBillingBannerProps) => {
|
||||
const t = useTranslations();
|
||||
|
||||
return (
|
||||
@@ -19,7 +22,9 @@ export const TrialBillingBanner = ({ onUpgrade }: TrialBillingBannerProps) => {
|
||||
version={1}
|
||||
title={t("billingTrialBannerTitle")}
|
||||
titleIcon={<ClockIcon className="w-5 h-5 text-primary" />}
|
||||
description={t("billingTrialBannerDescription")}
|
||||
description={t("billingTrialBannerDescription", {
|
||||
tier: tierName
|
||||
})}
|
||||
dismissable={false}
|
||||
>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user