Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update settings layout

Tim Wilsonc7ae7494c0d6
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx
index 12f837faac..6bbcdb702f 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/billing/page-client.tsx
@@ -81,6 +81,9 @@ export default function WorkspaceBillingClient() {
return (
<>
+ <h1 className="text-2xl font-semibold tracking-tight text-black">
+ Billing
+ </h1>
<Confetti active={confetti} config={{ elementCount: 200, spread: 90 }} />
<div className="rounded-lg border border-gray-200 bg-white">
<div className="flex flex-col items-start justify-between space-y-4 p-10 xl:flex-row xl:space-y-0">
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsx
index 40af67a0ab..6045eb8e99 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout.tsx
@@ -1,5 +1,5 @@
import SettingsLayout from "@/ui/layout/settings-layout";
-import { Gear2, Globe, Key, Receipt2, ShieldCheck, Users6 } from "@dub/ui";
+import { Gear2, Key, Receipt2, ShieldCheck, Users6 } from "@dub/ui";
import { ReactNode } from "react";
export default function WorkspaceSettingsLayout({
@@ -13,11 +13,11 @@ export default function WorkspaceSettingsLayout({
icon: Gear2,
segment: null,
},
- {
- name: "Domains",
- icon: Globe,
- segment: "domains",
- },
+ // {
+ // name: "Domains",
+ // icon: Globe,
+ // segment: "domains",
+ // },
{
name: "Billing",
icon: Receipt2,
@@ -40,5 +40,9 @@ export default function WorkspaceSettingsLayout({
},
];
- return <SettingsLayout tabs={tabs}>{children}</SettingsLayout>;
+ return (
+ <SettingsLayout tabs={tabs} tabContainerClassName="top-[150px]">
+ {children}
+ </SettingsLayout>
+ );
}
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/page-client.tsx
index 991014af94..d7a2fdca4d 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/page-client.tsx
@@ -19,6 +19,9 @@ export default function WorkspaceSettingsClient() {
return (
<>
+ <h1 className="mb-5 text-2xl font-semibold tracking-tight text-black">
+ Workspace Settings
+ </h1>
<Form
title="Workspace Name"
description={`This is the name of your workspace on ${process.env.NEXT_PUBLIC_APP_NAME}.`}
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsx
index 80d3b157cf..154b99445b 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/people/page-client.tsx
@@ -39,6 +39,9 @@ export default function WorkspacePeopleClient() {
<>
<InviteTeammateModal />
<InviteCodeModal />
+ <h1 className="mb-5 text-2xl font-semibold tracking-tight text-black">
+ People
+ </h1>
<div className="rounded-lg border border-gray-200 bg-white">
<div className="flex flex-col items-center justify-between space-y-3 p-5 sm:flex-row sm:space-y-0 sm:p-10">
<div className="flex flex-col space-y-3">
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsx
index 44c1d6143a..e34384ef8d 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/security/page-client.tsx
@@ -65,6 +65,9 @@ const SAMLSection = () => {
return (
<>
{configured ? <RemoveSAMLModal /> : <SAMLModal />}
+ <h1 className="mb-5 text-2xl font-semibold tracking-tight text-black">
+ Security
+ </h1>
<div className="rounded-lg border border-gray-200 bg-white">
<div className="relative flex flex-col space-y-6 p-5 sm:p-10">
<div className="flex flex-col space-y-3">
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx
index 2f213201d7..8983b5ffdd 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/tokens/page-client.tsx
@@ -40,6 +40,9 @@ export default function TokensPageClient() {
<>
<TokenCreatedModal />
<AddEditTokenModal />
+ <h1 className="mb-5 text-2xl font-semibold tracking-tight text-black">
+ API Keys
+ </h1>
<div className="rounded-lg border border-gray-200 bg-white">
<div className="flex flex-col items-center justify-between gap-4 space-y-3 border-b border-gray-200 p-5 sm:flex-row sm:space-y-0 sm:p-10">
<div className="flex max-w-screen-sm flex-col space-y-3">
diff --git a/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsx b/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsx
index 4e9b215193..05c6cb234a 100644
--- a/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/settings/layout.tsx
@@ -20,5 +20,9 @@ export default function PersonalSettingsLayout({
},
];
- return <SettingsLayout tabs={tabs}>{children}</SettingsLayout>;
+ return (
+ <SettingsLayout tabs={tabs} tabContainerClassName="top-[105px]">
+ {children}
+ </SettingsLayout>
+ );
}
diff --git a/apps/web/app/app.dub.co/(dashboard)/settings/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/settings/page-client.tsx
index edcde616ef..d252635d69 100644
--- a/apps/web/app/app.dub.co/(dashboard)/settings/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/settings/page-client.tsx
@@ -14,6 +14,9 @@ export default function SettingsPageClient() {
return (
<>
+ <h1 className="mb-5 text-2xl font-semibold tracking-tight text-black">
+ User Settings
+ </h1>
<Form
title="Your Name"
description={`This will be your display name on ${APP_NAME}.`}
diff --git a/apps/web/app/app.dub.co/(dashboard)/settings/tokens/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/settings/tokens/page-client.tsx
index 3f9ffea24f..b72ee546fe 100644
--- a/apps/web/app/app.dub.co/(dashboard)/settings/tokens/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/settings/tokens/page-client.tsx
@@ -24,6 +24,9 @@ export default function TokensPageClient() {
return (
<>
+ <h1 className="mb-5 text-2xl font-semibold tracking-tight text-black">
+ API Keys
+ </h1>
<Alert>
<Info className="mt-2 h-5 w-5 text-yellow-500" />
<AlertTitle>
diff --git a/apps/web/ui/layout/settings-layout.tsx b/apps/web/ui/layout/settings-layout.tsx
index a75b2c5f5b..06338d85c7 100644
--- a/apps/web/ui/layout/settings-layout.tsx
+++ b/apps/web/ui/layout/settings-layout.tsx
@@ -1,9 +1,11 @@
import NavLink from "@/ui/layout/settings-nav-link";
import { Icon, MaxWidthWrapper } from "@dub/ui";
+import { cn } from "@dub/utils";
import { ReactNode } from "react";
export default function SettingsLayout({
tabs,
+ tabContainerClassName,
children,
}: {
tabs: {
@@ -11,21 +13,15 @@ export default function SettingsLayout({
icon: Icon;
segment: string | null;
}[];
+ tabContainerClassName?: string;
children: ReactNode;
}) {
return (
- <div className="min-h-[calc(100vh-16px)] bg-white">
- <div className="flex h-36 items-center border-b border-gray-200">
- <MaxWidthWrapper>
- <div className="flex items-center justify-between">
- <h1 className="text-2xl font-semibold tracking-tight text-black">
- Settings
- </h1>
- </div>
- </MaxWidthWrapper>
- </div>
- <MaxWidthWrapper className="grid items-start gap-5 py-10 lg:grid-cols-5">
- <div className="top-36 flex gap-1 lg:sticky lg:grid">
+ <div className="relative min-h-[calc(100vh-16px)] bg-white">
+ <MaxWidthWrapper className="grid items-start gap-8 py-10 lg:grid-cols-5">
+ <div
+ className={cn("flex gap-1 lg:sticky lg:grid", tabContainerClassName)}
+ >
{tabs.map(({ name, segment, icon }) => (
<NavLink segment={segment} icon={icon}>
{name}