diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/add-hostname-modal.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/add-hostname-modal.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/add-hostname-modal.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/add-hostname-modal.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/base-script-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/base-script-section.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/base-script-section.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/base-script-section.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/complete-step-button.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/complete-step-button.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/complete-step-button.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/complete-step-button.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/connection-instructions.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/connection-instructions.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/connection-instructions.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/connection-instructions.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/conversion-tracking-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-section.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/conversion-tracking-section.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-section.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/conversion-tracking-toggle.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-toggle.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/conversion-tracking-toggle.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-toggle.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/guide.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/guide.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/guide.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/guide.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/hostname-menu.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-menu.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/hostname-menu.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-menu.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/hostname-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-section.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/hostname-section.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-section.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/outbound-domain-tracking-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/outbound-domain-tracking-section.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/outbound-domain-tracking-section.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/outbound-domain-tracking-section.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/publishable-key-form.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-form.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/publishable-key-form.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-form.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/publishable-key-menu.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-menu.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/publishable-key-menu.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-menu.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/site-visit-tracking-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/site-visit-tracking-section.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/site-visit-tracking-section.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/site-visit-tracking-section.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/step.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/step.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/step.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/step.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/track-lead-guides-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-lead-guides-section.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/track-lead-guides-section.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-lead-guides-section.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/track-sales-guides-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-sales-guides-section.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/track-sales-guides-section.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-sales-guides-section.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/use-dynamic-guide.ts b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-dynamic-guide.ts similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/use-dynamic-guide.ts rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-dynamic-guide.ts diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/use-selected-guide.ts b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-selected-guide.ts similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/use-selected-guide.ts rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-selected-guide.ts diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/verify-install.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/verify-install.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/analytics/verify-install.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/verify-install.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/layout.tsx new file mode 100644 index 00000000000..72053141f13 --- /dev/null +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/layout.tsx @@ -0,0 +1,11 @@ +import { PageContent } from "@/ui/layout/page-content"; +import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper"; +import { ReactNode } from "react"; + +export default function BillingLayout({ children }: { children: ReactNode }) { + return ( + + {children} + + ); +} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsx index 5e817fd9671..0c143f2fc80 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/payment-methods.tsx @@ -45,7 +45,7 @@ export default function PaymentMethods() { } return ( -
+

Payment methods

@@ -63,7 +63,7 @@ export default function PaymentMethods() { /> )}
-
+
{regularPaymentMethods ? ( regularPaymentMethods.length > 0 ? ( regularPaymentMethods.map((paymentMethod) => ( diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/plan-usage.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/plan-usage.tsx index 0ba9ca824ec..cd3866e6d84 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/plan-usage.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/billing/plan-usage.tsx @@ -124,7 +124,7 @@ export default function PlanUsage() { }, [usage, usageLimit, linksUsage, linksLimit, totalLinks]); return ( -
+

@@ -206,7 +206,7 @@ export default function PlanUsage() { href={`/${slug}/settings/people`} />

-
+
- -
+ ); } diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/enabled-integrations.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/enabled-integrations.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/enabled-integrations.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/enabled-integrations.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/enabled/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/enabled/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/enabled/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/enabled/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/featured-integrations.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/featured-integrations.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/featured-integrations.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/featured-integrations.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/integrations-cards.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/integrations-cards.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/integrations-cards.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/integrations-cards.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/integrations-list.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/integrations-list.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/integrations-list.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/integrations-list.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/layout.tsx new file mode 100644 index 00000000000..d1b3e9e778d --- /dev/null +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/layout.tsx @@ -0,0 +1,24 @@ +import { PageContent } from "@/ui/layout/page-content"; +import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper"; +import { ReactNode } from "react"; + +export default function IntegrationsLayout({ + children, +}: { + children: ReactNode; +}) { + return ( + + + {children} + + + ); +} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/new/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/new/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/new/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/new/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/page.tsx new file mode 100644 index 00000000000..499efb10287 --- /dev/null +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/integrations/page.tsx @@ -0,0 +1,7 @@ +import { IntegrationsList } from "./integrations-list"; + +export const revalidate = 300; // 5 minutes + +export default function IntegrationsPage() { + return ; +} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/layout.tsx deleted file mode 100644 index 6ce9a1b6975..00000000000 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/layout.tsx +++ /dev/null @@ -1 +0,0 @@ -export { default } from "../../settings/(basic-layout)/layout"; diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/members/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/layout.tsx new file mode 100644 index 00000000000..c9226824064 --- /dev/null +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/layout.tsx @@ -0,0 +1,21 @@ +import { PageContent } from "@/ui/layout/page-content"; +import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper"; +import { ReactNode } from "react"; + +export default function NotificationsLayout({ + children, +}: { + children: ReactNode; +}) { + return ( + + {children} + + ); +} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/page-client.tsx new file mode 100644 index 00000000000..7cfcd07a12c --- /dev/null +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/page-client.tsx @@ -0,0 +1,223 @@ +"use client"; + +import { updateNotificationPreference } from "@/lib/actions/update-notification-preference"; +import useWorkspace from "@/lib/swr/use-workspace"; +import { notificationTypes } from "@/lib/zod/schemas/workspaces"; +import { Switch, useOptimisticUpdate } from "@dub/ui"; +import { Globe, Hyperlink, Msgs, UserPlus } from "@dub/ui/icons"; +import { isClickOnInteractiveChild } from "@dub/utils"; +import { DollarSign, Trophy } from "lucide-react"; +import { useAction } from "next-safe-action/hooks"; +import React from "react"; +import { z } from "zod"; + +type PreferenceType = z.infer; +type Preferences = Record; + +export default function NotificationsSettingsPageClient() { + const { id: workspaceId } = useWorkspace(); + const { executeAsync } = useAction(updateNotificationPreference); + + const workspaceNotifications = [ + { + type: "domainConfigurationUpdates", + icon: Globe, + title: "Domain configuration updates", + description: "Updates to your custom domain configuration.", + }, + { + type: "linkUsageSummary", + icon: Hyperlink, + title: "Monthly links usage summary", + description: + "Monthly summary email of your top 5 links by usage & total links created.", + }, + ]; + + const partnerProgramNotifications = [ + { + type: "newPartnerApplication", + icon: UserPlus, + title: "New partner application", + description: + "Alert when a new partner application is made in your partner program.", + }, + { + type: "newPartnerSale", + icon: DollarSign, + title: "New partner sale", + description: "Alert when a new sale is made in your partner program.", + }, + { + type: "newBountySubmitted", + icon: Trophy, + title: "New bounty submitted", + description: + "Alert when a new bounty is submitted in your partner program.", + }, + { + type: "newMessageFromPartner", + icon: Msgs, + title: "New message from partner", + description: + "Alert when a new message is received from a partner in your partner program.", + }, + // { + // type: "fraudEventsSummary", + // icon: ShieldAlert, + // title: "Daily Fraud events summary", + // description: + // "Daily summary email of unresolved fraud events detected in your partner program.", + // }, + ]; + + const { + data: preferences, + isLoading, + update, + } = useOptimisticUpdate( + `/api/workspaces/${workspaceId}/notification-preferences`, + { + loading: "Updating notification preference...", + success: "Notification preference updated.", + error: "Failed to update notification preference.", + }, + ); + + const handleUpdate = async ({ + type, + value, + currentPreferences, + }: { + type: string; + value: boolean; + currentPreferences: Preferences; + }) => { + await executeAsync({ + workspaceId: workspaceId!, + type: type as PreferenceType, + value, + }); + + return { + ...currentPreferences, + [type]: value, + }; + }; + + const renderNotificationItem = ({ + type, + icon: Icon, + title, + description, + isLast, + }: { + type: string; + icon: React.ComponentType<{ className?: string }>; + title: string; + description: string; + isLast?: boolean; + }) => { + const handleRowClick = (e: React.MouseEvent) => { + if (isClickOnInteractiveChild(e) || !preferences || isLoading) return; + + const newValue = !preferences[type]; + update( + () => + handleUpdate({ + type, + value: newValue, + currentPreferences: preferences, + }), + { + ...preferences, + [type]: newValue, + }, + ); + }; + + return ( +
+
+
+
+ +
+
+
+ {title} +
+
+ {description} +
+
+
+ { + if (!preferences) return; + + update( + () => + handleUpdate({ + type, + value: checked, + currentPreferences: preferences, + }), + { + ...preferences, + [type]: checked, + }, + ); + }} + /> +
+ {!isLast &&
} +
+ ); + }; + + const renderSection = ({ + title, + notifications, + }: { + title: string; + notifications: Array<{ + type: string; + icon: React.ComponentType<{ className?: string }>; + title: string; + description: string; + }>; + }) => ( +
+
+

{title}

+
+
+ {notifications.map((notification, index) => + renderNotificationItem({ + ...notification, + isLast: index === notifications.length - 1, + }), + )} +
+
+ ); + + return ( +
+ {renderSection({ + title: "Short links", + notifications: workspaceNotifications, + })} + {renderSection({ + title: "Partner program", + notifications: partnerProgramNotifications, + })} +
+ ); +} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/notifications/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/notifications/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/notifications/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/[appId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/[appId]/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/[appId]/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/[appId]/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/[appId]/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/[appId]/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/[appId]/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/[appId]/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/create-oauth-app-button.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/create-oauth-app-button.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/create-oauth-app-button.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/create-oauth-app-button.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/layout.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/layout.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/layout.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/new/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/new/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/new/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/new/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/new/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/new/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/new/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/new/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/oauth-apps/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/oauth-apps/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/page-client.tsx similarity index 98% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/page-client.tsx index 60b34eeaf6d..fbfb1902695 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/page-client.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/page-client.tsx @@ -22,7 +22,7 @@ export default function WorkspaceSettingsClient() { const { update } = useSession(); return ( - <> +
- +
); } diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/page.tsx new file mode 100644 index 00000000000..6692b7794f9 --- /dev/null +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/page.tsx @@ -0,0 +1,13 @@ +import { PageContent } from "@/ui/layout/page-content"; +import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper"; +import WorkspaceSettingsClient from "./page-client"; + +export default function WorkspaceSettings() { + return ( + + + + + + ); +} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/audit-logs.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/audit-logs.tsx index 70a8f2eaf2e..22febaef3af 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/audit-logs.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/audit-logs.tsx @@ -66,15 +66,15 @@ export function AuditLogs() { }; return ( -
-
-
-

Audit Logs

+
+
+
+

Audit Logs

Workspace partner and payout history

-
+
{!canExportAuditLogs && ( -
+
Audit logs are available on the{" "} + {children} + + ); +} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/page-client.tsx index e0f652eb154..d961a22893b 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/page-client.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/page-client.tsx @@ -6,10 +6,10 @@ import { SCIM } from "./scim"; export default function WorkspaceSecurityClient() { return ( - <> +
- +
); } diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/saml.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/saml.tsx index 9ab7dc6ba69..90424166a84 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/saml.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/saml.tsx @@ -110,19 +110,21 @@ export function SAML() { return ( <> {configured ? : } -
-
-
-

SAML Single Sign-On

+
+
+
+

+ SAML Single Sign-On +

Set up SAML Single Sign-On (SSO) to allow your team to sign in to{" "} {process.env.NEXT_PUBLIC_APP_NAME} with your identity provider.

-
-
-
+
+
+
{data.logo || (
)} @@ -197,40 +199,40 @@ export function SAML() { )}
-
-
-
- - {workspaceData?.ssoEnforcedAt && ( - - - {ssoEmailDomain} - - )} +
+
+ + {workspaceData?.ssoEnforcedAt && ( + + + {ssoEmailDomain} + + )} +
+
-
- diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/scim.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/scim.tsx index e0f0c402c00..8b85d34c3cb 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/scim.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/security/scim.tsx @@ -52,113 +52,118 @@ export function SCIM() { return ( <> - - {configured && } -
-
-
-

Directory Sync

+ {configured ? : } +
+
+
+

+ Directory Sync +

Automatically provision and deprovision users from your identity provider.

-
-
- {data.logo || ( -
- )} -
- {data.title ? ( -

{data.title}

- ) : ( -
+
+
+
+ {data.logo || ( +
)} - {data.description ? ( -

{data.description}

+
+ {data.title ? ( +

{data.title}

+ ) : ( +
+ )} + {data.description ? ( +

+ {data.description} +

+ ) : ( +
+ )} +
+
+
+ {loading ? ( +
+ ) : configured ? ( + + + +
+ } + align="end" + openPopover={openPopover} + setOpenPopover={setOpenPopover} + > + + ) : ( -
+
-
- {loading ? ( -
- ) : configured ? ( - - - -
- } - align="end" - openPopover={openPopover} - setOpenPopover={setOpenPopover} - > - - - ) : ( -
- diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tokens/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tokens/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/edit/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/edit/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/edit/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/edit/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/edit/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/edit/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/edit/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/edit/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/layout.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/layout.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/layout.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/[webhookId]/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/[webhookId]/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/create-webhook-button.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/create-webhook-button.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/create-webhook-button.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/create-webhook-button.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/layout.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/layout.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/layout.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/new/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/new/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/new/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/new/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/new/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/new/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/new/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/new/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/page-client.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/page-client.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/page-client.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/page.tsx similarity index 100% rename from apps/web/app/app.dub.co/(dashboard)/[slug]/settings/webhooks/page.tsx rename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/webhooks/page.tsx diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/default/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/default/page.tsx index 3bae35c2a30..2807875fc45 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/default/page.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/default/page.tsx @@ -1 +1 @@ -export { default } from "../../../settings/domains/default/page"; +export { default } from "../../../(ee)/settings/domains/default/page"; diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/email/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/email/page.tsx index da1e08d7133..2c59e410c2f 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/email/page.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/email/page.tsx @@ -1 +1 @@ -export { default } from "../../../settings/domains/email/page"; +export { default } from "../../../(ee)/settings/domains/email/page"; diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/layout.tsx index 09b9589b0c8..676fb14b450 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/layout.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/layout.tsx @@ -1,7 +1,7 @@ import { PageContent } from "@/ui/layout/page-content"; import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper"; import { ReactNode } from "react"; -import { DomainsHeader } from "../../settings/domains/header"; +import { DomainsHeader } from "../../(ee)/settings/domains/header"; export default function DomainsLayout({ children }: { children: ReactNode }) { return ( diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/page.tsx index d57a0e29557..6691e876989 100644 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/page.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/links/domains/page.tsx @@ -1 +1 @@ -export { default } from "../../settings/domains/page"; +export { default } from "../../(ee)/settings/domains/page"; diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/page.tsx deleted file mode 100644 index f10caab3f13..00000000000 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/integrations/page.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { IntegrationsList } from "./integrations-list"; - -export const revalidate = 300; // 5 minutes - -export default function IntegrationsPage() { - return ( -
-
-

- Integrations -

-

- Use Dub with your existing favorite tools with our seamless - integrations. -

-
- -
- ); -} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/layout.tsx deleted file mode 100644 index 8ee3029679e..00000000000 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/layout.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import SettingsLayout from "@/ui/layout/settings-layout"; -import { ReactNode } from "react"; - -// TODO: Move remaining (basic-layout) pages out and get them using PageContent instead -export default function WorkspaceSettingsLayout({ - children, -}: { - children: ReactNode; -}) { - return {children}; -} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/notifications/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/notifications/page-client.tsx deleted file mode 100644 index 1f99f15c64b..00000000000 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/notifications/page-client.tsx +++ /dev/null @@ -1,163 +0,0 @@ -"use client"; - -import { updateNotificationPreference } from "@/lib/actions/update-notification-preference"; -import useWorkspace from "@/lib/swr/use-workspace"; -import { notificationTypes } from "@/lib/zod/schemas/workspaces"; -import { Switch, useOptimisticUpdate } from "@dub/ui"; -import { Globe, Hyperlink, Msgs, UserPlus } from "@dub/ui/icons"; -import { DollarSign, ShieldAlert, Trophy } from "lucide-react"; -import { useAction } from "next-safe-action/hooks"; -import { z } from "zod"; - -type PreferenceType = z.infer; -type Preferences = Record; - -export default function NotificationsSettingsPageClient() { - const { id: workspaceId } = useWorkspace(); - const { executeAsync } = useAction(updateNotificationPreference); - - const notifications = [ - { - type: "domainConfigurationUpdates", - icon: Globe, - title: "Domain configuration updates", - description: "Updates to your custom domain configuration.", - }, - { - type: "linkUsageSummary", - icon: Hyperlink, - title: "Monthly links usage summary", - description: - "Monthly summary email of your top 5 links by usage & total links created.", - }, - { - type: "newPartnerApplication", - icon: UserPlus, - title: "New partner application", - description: - "Alert when a new partner application is made in your partner program.", - }, - { - type: "newPartnerSale", - icon: DollarSign, - title: "New partner sale", - description: "Alert when a new sale is made in your partner program.", - }, - { - type: "newBountySubmitted", - icon: Trophy, - title: "New bounty submitted", - description: - "Alert when a new bounty is submitted in your partner program.", - }, - { - type: "newMessageFromPartner", - icon: Msgs, - title: "New message from partner", - description: - "Alert when a new message is received from a partner in your partner program.", - }, - { - type: "fraudEventsSummary", - icon: ShieldAlert, - title: "Daily Fraud events summary", - description: - "Daily summary email of unresolved fraud events detected in your partner program.", - }, - ]; - - const { - data: preferences, - isLoading, - update, - } = useOptimisticUpdate( - `/api/workspaces/${workspaceId}/notification-preferences`, - { - loading: "Updating notification preference...", - success: "Notification preference updated.", - error: "Failed to update notification preference.", - }, - ); - - const handleUpdate = async ({ - type, - value, - currentPreferences, - }: { - type: string; - value: boolean; - currentPreferences: Preferences; - }) => { - await executeAsync({ - workspaceId: workspaceId!, - type: type as PreferenceType, - value, - }); - - return { - ...currentPreferences, - [type]: value, - }; - }; - - return ( -
-
-

- Workspace Notifications -

-

- Adjust your personal notification preferences and choose which updates - you want to receive. These settings will only be applied to your - personal account. -

-
-
- {notifications.map(({ type, icon: Icon, title, description }) => ( -
-
-
-
- -
-
-
-
-
{title}
-
-
- - {description} - -
-
-
- { - if (!preferences) return; - - update( - () => - handleUpdate({ - type, - value: checked, - currentPreferences: preferences, - }), - { - ...preferences, - [type]: checked, - }, - ); - }} - /> -
- ))} -
-
- ); -} diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/page.tsx deleted file mode 100644 index 290e38c0ddd..00000000000 --- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/(basic-layout)/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import WorkspaceSettingsClient from "./page-client"; - -export default function WorkspaceSettings() { - return ; -} diff --git a/apps/web/app/app.dub.co/(dashboard)/account/settings/security/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/account/settings/security/page-client.tsx index c5b4f976297..63a75e8dfdc 100644 --- a/apps/web/app/app.dub.co/(dashboard)/account/settings/security/page-client.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/account/settings/security/page-client.tsx @@ -11,12 +11,12 @@ export default function SecurityPageClient() { if (loading) { return ( -
-
-

Password

+
+
+

Password

-
+
diff --git a/apps/web/app/app.dub.co/(dashboard)/account/settings/security/request-set-password.tsx b/apps/web/app/app.dub.co/(dashboard)/account/settings/security/request-set-password.tsx index 5ea36275f7b..07e61c28828 100644 --- a/apps/web/app/app.dub.co/(dashboard)/account/settings/security/request-set-password.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/account/settings/security/request-set-password.tsx @@ -37,9 +37,9 @@ export const RequestSetPassword = () => { }; return ( -
-
-

Password

+
+
+

Password

{user?.provider && ( <> @@ -58,14 +58,16 @@ export const RequestSetPassword = () => { You can set a password to use with your Dub account.

-
-
); diff --git a/apps/web/app/app.dub.co/(dashboard)/account/settings/security/update-password.tsx b/apps/web/app/app.dub.co/(dashboard)/account/settings/security/update-password.tsx index 79c57150452..94654db7b12 100644 --- a/apps/web/app/app.dub.co/(dashboard)/account/settings/security/update-password.tsx +++ b/apps/web/app/app.dub.co/(dashboard)/account/settings/security/update-password.tsx @@ -1,20 +1,22 @@ "use client"; import { updatePasswordSchema } from "@/lib/zod/schemas/auth"; -import { Button, Input, Label, Tooltip } from "@dub/ui"; -import { useForm } from "react-hook-form"; +import { PasswordRequirements } from "@/ui/shared/password-requirements"; +import { Button, Input, Label } from "@dub/ui"; +import { FormProvider, useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; // Allow the user to update their existing password export const UpdatePassword = () => { + const form = useForm>(); const { register, handleSubmit, setError, formState: { isSubmitting, isDirty, errors }, reset, - } = useForm>(); + } = form; const onSubmit = handleSubmit(async (data) => { try { @@ -41,17 +43,18 @@ export const UpdatePassword = () => { return ( -
-
-

Password

-

- Manage your account password on {process.env.NEXT_PUBLIC_APP_NAME}. -

-
-
+
+
+
+

Password

+

+ Manage your account password on {process.env.NEXT_PUBLIC_APP_NAME} + . +

+
{ type="password" {...register("newPassword", { required: true })} /> - - {errors.newPassword?.message} - + + +
-
-
- -

- Password requirements -

-
-
-
diff --git a/apps/web/ui/account/delete-account.tsx b/apps/web/ui/account/delete-account.tsx index 0bf8a0dd5b3..c45779b7bde 100644 --- a/apps/web/ui/account/delete-account.tsx +++ b/apps/web/ui/account/delete-account.tsx @@ -7,19 +7,19 @@ export default function DeleteAccountSection() { useDeleteAccountModal(); return ( -
+
-
-

Delete Account

+
+

Delete Account

Permanently delete your {process.env.NEXT_PUBLIC_APP_NAME} account, all of your workspaces, links and their respective stats. This action cannot be undone - please proceed with caution.

-
+
-
+