diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/domains/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/domains/page-client.tsx index 2a6269bc2..de60fc93a 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/domains/page-client.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/domains/page-client.tsx @@ -113,7 +113,7 @@ function EditDialog(props: { addWww: props.type === 'create', domain: props.type === 'update' ? props.defaultDomain.replace(/^https?:\/\//, "") : undefined, handlerPath: props.type === 'update' ? props.defaultHandlerPath : "/handler", - insecureHttp: false, + insecureHttp: props.type === 'update' ? props.defaultDomain.startsWith('http://') : false, }} onOpenChange={props.onOpenChange} trigger={props.trigger} diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/settings/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/settings/page-client.tsx index 7ed6d1964..37554157f 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/settings/page-client.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/settings/page-client.tsx @@ -1,7 +1,9 @@ "use client"; -import { SettingSwitch } from "@/components/settings"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle, Switch, Typography } from "@/components/ui"; import { useUpdateConfig } from "@/lib/config-update"; +import { cn } from "@/lib/utils"; +import { ProhibitIcon } from "@phosphor-icons/react"; import { PageLayout } from "../../page-layout"; import { useAdminApp } from "../../use-admin-app"; import { PaymentMethods } from "./payment-methods"; @@ -14,6 +16,14 @@ export default function PageClient() { const paymentsConfig = project.useConfig().payments; const updateConfig = useUpdateConfig(); + const handleBlockNewPurchasesToggle = async (checked: boolean) => { + await updateConfig({ + adminApp, + configUpdate: { "payments.blockNewPurchases": checked }, + pushable: true, + }); + }; + return ( + + + Block New Purchases + + Stops new checkouts while keeping existing subscriptions active. + + + +
+
+
+ +
+ + Block new purchases + +
+ +
+
+
- void await updateConfig({ - adminApp, - configUpdate: { "payments.blockNewPurchases": checked }, - pushable: true, - })} - hint="Stops new checkouts while keeping existing subscriptions active." - />
); } diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/webhooks/[endpointId]/page-client.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/webhooks/[endpointId]/page-client.tsx index 438626bf9..daca97828 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/webhooks/[endpointId]/page-client.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/webhooks/[endpointId]/page-client.tsx @@ -4,7 +4,7 @@ import { DesignAlert, DesignBadge, DesignButton, DesignCard, DesignEditableGrid, import { CopyButton, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui"; import { getPublicEnvVar } from '@/lib/env'; import { CaretLeftIcon, CaretRightIcon, InfoIcon, KeyIcon, LinkIcon, TextAlignLeftIcon } from "@phosphor-icons/react"; -import { useMemo, useState } from "react"; +import { useMemo } from "react"; import { SvixProvider, useEndpoint, useEndpointMessageAttempts, useEndpointSecret } from "svix-react"; import { AppEnabledGuard } from "../../app-enabled-guard"; import { PageLayout } from "../../page-layout"; @@ -159,18 +159,11 @@ function MessageTable(props: { endpointId: string }) { export default function PageClient(props: { endpointId: string }) { const stackAdminApp = useAdminApp(); const svixToken = stackAdminApp.useSvixToken(); - const [updateCounter, setUpdateCounter] = useState(0); - - // This is a hack to make sure svix hooks update when content changes - const svixTokenUpdated = useMemo(() => { - return svixToken + ''; - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [svixToken, updateCounter]); return ( diff --git a/docker/dependencies/docker.compose.yaml b/docker/dependencies/docker.compose.yaml index c745fea72..9aafb788f 100644 --- a/docker/dependencies/docker.compose.yaml +++ b/docker/dependencies/docker.compose.yaml @@ -148,9 +148,11 @@ services: image: jaegertracing/all-in-one:latest environment: - COLLECTOR_OTLP_ENABLED=true + - MEMORY_MAX_TRACES=50000 ports: - "${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}07:16686" # Jaeger UI - "${NEXT_PUBLIC_STACK_PORT_PREFIX:-81}31:4318" # OTLP Endpoint + mem_limit: 1g restart: always # ================= svix =================