mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-01 00:06:38 +00:00
fix some errors
This commit is contained in:
@@ -45,7 +45,7 @@ export function verifyValidSubscription(tiers: Tier[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { tier, active } = await getOrgTierData(orgId);
|
const { tier, active } = await getOrgTierData(orgId);
|
||||||
const isTier = tiers.includes(tier || "");
|
const isTier = tiers.includes(tier as Tier);
|
||||||
if (!active) {
|
if (!active) {
|
||||||
return next(
|
return next(
|
||||||
createHttpError(
|
createHttpError(
|
||||||
|
|||||||
@@ -37,10 +37,6 @@ import { cn } from "@app/lib/cn";
|
|||||||
import {
|
import {
|
||||||
CreditCard,
|
CreditCard,
|
||||||
ExternalLink,
|
ExternalLink,
|
||||||
Users,
|
|
||||||
Globe,
|
|
||||||
Server,
|
|
||||||
Layout,
|
|
||||||
Check
|
Check
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import {
|
import {
|
||||||
@@ -50,7 +46,6 @@ import {
|
|||||||
import { useTranslations } from "use-intl";
|
import { useTranslations } from "use-intl";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { Tier } from "@server/types/Tiers";
|
import { Tier } from "@server/types/Tiers";
|
||||||
import { w } from "@faker-js/faker/dist/airline-DF6RqYmq";
|
|
||||||
|
|
||||||
// Plan tier definitions matching the mockup
|
// Plan tier definitions matching the mockup
|
||||||
type PlanId = "free" | "homelab" | "team" | "business" | "enterprise";
|
type PlanId = "free" | "homelab" | "team" | "business" | "enterprise";
|
||||||
@@ -63,35 +58,6 @@ interface PlanOption {
|
|||||||
tierType: Tier | null;
|
tierType: Tier | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tier limits for display in confirmation dialog
|
|
||||||
interface TierLimits {
|
|
||||||
sites: number;
|
|
||||||
users: number;
|
|
||||||
domains: number;
|
|
||||||
remoteNodes: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
const tierLimits: Record<Tier, TierLimits> = {
|
|
||||||
tier1: {
|
|
||||||
sites: 3,
|
|
||||||
users: 3,
|
|
||||||
domains: 3,
|
|
||||||
remoteNodes: 1
|
|
||||||
},
|
|
||||||
tier2: {
|
|
||||||
sites: 10,
|
|
||||||
users: 150,
|
|
||||||
domains: 250,
|
|
||||||
remoteNodes: 5
|
|
||||||
},
|
|
||||||
tier3: {
|
|
||||||
sites: 10,
|
|
||||||
users: 150,
|
|
||||||
domains: 250,
|
|
||||||
remoteNodes: 5
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const planOptions: PlanOption[] = [
|
const planOptions: PlanOption[] = [
|
||||||
{
|
{
|
||||||
id: "free",
|
id: "free",
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ export default function GeneralPage() {
|
|||||||
{t("diskEncrypted")}
|
{t("diskEncrypted")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.diskEncrypted
|
.diskEncrypted
|
||||||
@@ -634,7 +634,7 @@ export default function GeneralPage() {
|
|||||||
{t("firewallEnabled")}
|
{t("firewallEnabled")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.firewallEnabled
|
.firewallEnabled
|
||||||
@@ -653,7 +653,7 @@ export default function GeneralPage() {
|
|||||||
{t("autoUpdatesEnabled")}
|
{t("autoUpdatesEnabled")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.autoUpdatesEnabled
|
.autoUpdatesEnabled
|
||||||
@@ -671,7 +671,7 @@ export default function GeneralPage() {
|
|||||||
{t("tpmAvailable")}
|
{t("tpmAvailable")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.tpmAvailable
|
.tpmAvailable
|
||||||
@@ -693,7 +693,7 @@ export default function GeneralPage() {
|
|||||||
)}
|
)}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.windowsAntivirusEnabled
|
.windowsAntivirusEnabled
|
||||||
@@ -711,7 +711,7 @@ export default function GeneralPage() {
|
|||||||
{t("macosSipEnabled")}
|
{t("macosSipEnabled")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.macosSipEnabled
|
.macosSipEnabled
|
||||||
@@ -733,7 +733,7 @@ export default function GeneralPage() {
|
|||||||
)}
|
)}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.macosGatekeeperEnabled
|
.macosGatekeeperEnabled
|
||||||
@@ -755,7 +755,7 @@ export default function GeneralPage() {
|
|||||||
)}
|
)}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.macosFirewallStealthMode
|
.macosFirewallStealthMode
|
||||||
@@ -774,7 +774,7 @@ export default function GeneralPage() {
|
|||||||
{t("linuxAppArmorEnabled")}
|
{t("linuxAppArmorEnabled")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.linuxAppArmorEnabled
|
.linuxAppArmorEnabled
|
||||||
@@ -793,7 +793,7 @@ export default function GeneralPage() {
|
|||||||
{t("linuxSELinuxEnabled")}
|
{t("linuxSELinuxEnabled")}
|
||||||
</InfoSectionTitle>
|
</InfoSectionTitle>
|
||||||
<InfoSectionContent>
|
<InfoSectionContent>
|
||||||
{isPaidUser
|
{isPaidUser(tierMatrix.devicePosture)
|
||||||
? formatPostureValue(
|
? formatPostureValue(
|
||||||
client.posture
|
client.posture
|
||||||
.linuxSELinuxEnabled
|
.linuxSELinuxEnabled
|
||||||
|
|||||||
Reference in New Issue
Block a user