Skip to content

Commit

Permalink
Disable profile changes for demo user
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunkomath committed Jan 21, 2025
1 parent ec8905f commit 58ab461
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 35 deletions.
34 changes: 20 additions & 14 deletions app/(dashboard)/[tenant]/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export default async function Settings() {
getTimezone(),
]);

const isDemoUser = claims.username === "demo";

return (
<>
<PageTitle title="Settings" />
Expand Down Expand Up @@ -70,26 +72,30 @@ export default async function Settings() {
<p className="font-semibold text-gray-900 dark:text-gray-200 sm:w-64 sm:flex-none sm:pr-6">
Name
</p>
<EditableValue
id={claims.sub}
name="name"
type="text"
value={userInfo.name ?? "-"}
action={updateUserData}
/>
{!isDemoUser ? (
<EditableValue
id={claims.sub}
name="name"
type="text"
value={userInfo.name ?? "-"}
action={updateUserData}
/>
) : null}
</div>

<div className="p-4 sm:flex items-center">
<p className="font-semibold text-gray-900 dark:text-gray-200 sm:w-64 sm:flex-none sm:pr-6">
Email address
</p>
<EditableValue
id={claims.sub}
name="primaryEmail"
type="text"
value={userInfo.email ?? "-"}
action={updateUserData}
/>
{!isDemoUser ? (
<EditableValue
id={claims.sub}
name="primaryEmail"
type="text"
value={userInfo.email ?? "-"}
action={updateUserData}
/>
) : null}
</div>

{timezone ? (
Expand Down
4 changes: 2 additions & 2 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ export default async function Home() {
</div>
<div className="mx-auto max-w-7xl py-32 sm:py-48 lg:py-56">
<div>
<h1 className="text-hero bg-gradient-to-r from-green-500 to-yellow-700 bg-clip-text text-4xl tracking-tighter text-gray-900 text-transparent sm:text-6xl">
<h1 className="text-hero bg-gradient-to-r from-green-500 to-yellow-700 bg-clip-text text-4xl tracking-tighter text-gray-900 text-transparent sm:text-6xl whitespace-pre-line">
{SITE_METADATA.TAGLINE}
</h1>
<p className="mt-6 text-lg leading-8 text-gray-600 dark:text-gray-400">
<p className="mt-6 text-lg leading-8 text-gray-600 dark:text-gray-400 whitespace-pre-line">
{SITE_METADATA.DESCRIPTION}
</p>
<div className="mt-10 flex flex-col items-center justify-center gap-y-6 md:flex-row md:gap-x-6 md:gap-y-0">
Expand Down
46 changes: 29 additions & 17 deletions components/landing-page/call-to-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,35 @@ import { buttonVariants } from "@/components/ui/button";
import Link from "next/link";

function CTA() {
return (
<div className="w-full py-20 lg:py-40">
<div className="mx-auto max-w-7xl px-6 py-24 sm:py-32 lg:px-8">
<h2 className="max-w-2xl text-balance text-4xl font-semibold tracking-tight text-gray-900 sm:text-5xl">
Boost your productivity. Start using 'Manage' today.
</h2>
<div className="mt-10 flex items-center gap-x-6">
<Link href="http://github.com/techulus/manage" className={buttonVariants({variant: "default", className: "flex items-center gap-2 p-8"})}>
Get Started
</Link>
<Link href="mailto:arjun@techulus.com" className={buttonVariants({variant: "ghost", className: "flex items-center gap-2 p-8"})}>
Request Access
</Link>
</div>
</div>
</div>
);
return (
<div className="w-full py-20 lg:py-40">
<div className="mx-auto max-w-7xl px-6 sm:py-24 lg:px-8">
<h2 className="max-w-2xl text-balance text-4xl font-semibold tracking-tight sm:text-5xl">
Boost your productivity. Start using 'Manage' today.
</h2>
<div className="mt-10 flex items-center gap-x-6">
<Link
href="http://github.com/techulus/manage"
className={buttonVariants({
variant: "default",
className: "flex items-center gap-2 p-8",
})}
>
Get Started
</Link>
<Link
href="mailto:arjun@techulus.com"
className={buttonVariants({
variant: "ghost",
className: "flex items-center gap-2 p-8",
})}
>
Request Access
</Link>
</div>
</div>
</div>
);
}

export { CTA };
4 changes: 2 additions & 2 deletions data/marketing.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const SITE_METADATA = {
TITLE: "Manage [beta]",
TAGLINE: "Manage Tasks, Documents, Files, and Events with Ease",
TAGLINE: "Manage Tasks, Documents,\nFiles, and Events with Ease",
DESCRIPTION:
"Manage is an open-source project management app inspired by Basecamp. With its intuitive interface, customizable features, and emphasis on collaboration, Manage empowers teams to enhance productivity and achieve project success. Enjoy the benefits of open-source flexibility, data security, and a thriving community while managing your projects efficiently with Manage.",
"Manage is an open-source project management app inspired by Basecamp.\nWith its intuitive interface, customizable features, and emphasis on collaboration, Manage empowers teams to enhance productivity and achieve project success.\nEnjoy the benefits of open-source flexibility, data security, and a thriving community while managing your projects efficiently with Manage.",
};

0 comments on commit 58ab461

Please sign in to comment.