Lock down days

This commit is contained in:
Owen
2025-10-26 18:36:09 -07:00
parent f4a0f6a2e6
commit 592d085de6
3 changed files with 39 additions and 6 deletions

View File

@@ -48,7 +48,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger
} from "@app/components/ui/dropdown-menu";
import { ChevronDown } from "lucide-react";
import { ChevronDown, SubscriptIcon } from "lucide-react";
import { useLicenseStatusContext } from "@app/hooks/useLicenseStatusContext";
import { useSubscriptionStatusContext } from "@app/hooks/useSubscriptionStatusContext";
import { Alert, AlertDescription } from "@app/components/ui/alert";
@@ -70,7 +70,8 @@ const LOG_RETENTION_OPTIONS = [
{ label: "logRetention7Days", value: 7 },
{ label: "logRetention14Days", value: 14 },
{ label: "logRetention30Days", value: 30 },
{ label: "logRetentionForever", value: -1 }
{ label: "logRetention90Days", value: 90 },
...(build != "saas" ? [{ label: "logRetentionForever", value: -1 }] : [])
];
export default function GeneralPage() {
@@ -314,7 +315,12 @@ export default function GeneralPage() {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className="w-full">
{LOG_RETENTION_OPTIONS.map(
{LOG_RETENTION_OPTIONS.filter((option) => {
if (build == "saas" && !subscription?.subscribed && option.value > 30) {
return false
}
return true;
}).map(
(option) => (
<DropdownMenuItem
key={