mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
🏗️ Move account settings (#1814)
This commit is contained in:
parent
2889967726
commit
bfa3b0818e
34 changed files with 41 additions and 32 deletions
|
@ -84,7 +84,7 @@ const FAQ = async ({ t }: { t: TFunction<"pricing"> }) => {
|
||||||
a: (
|
a: (
|
||||||
<Link
|
<Link
|
||||||
className="text-link"
|
className="text-link"
|
||||||
href={linkToApp("/settings/billing")}
|
href={linkToApp("/account/billing")}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
b: <strong />,
|
b: <strong />,
|
||||||
|
@ -110,7 +110,7 @@ const FAQ = async ({ t }: { t: TFunction<"pricing"> }) => {
|
||||||
a: (
|
a: (
|
||||||
<Link
|
<Link
|
||||||
className="text-link"
|
className="text-link"
|
||||||
href={linkToApp("/settings/billing")}
|
href={linkToApp("/account/billing")}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
b: <strong />,
|
b: <strong />,
|
||||||
|
|
|
@ -157,7 +157,7 @@ export function PriceTables() {
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<hr />
|
<hr />
|
||||||
<Button asChild variant="primary" className="w-full">
|
<Button asChild variant="primary" className="w-full">
|
||||||
<Link href={linkToApp("/settings/billing")}>
|
<Link href={linkToApp("/account/billing")}>
|
||||||
<Trans
|
<Trans
|
||||||
t={t}
|
t={t}
|
||||||
ns="pricing"
|
ns="pricing"
|
||||||
|
|
|
@ -28,7 +28,7 @@ If you haven't jumped aboard yet, the launch price for Rallly Pro is still up fo
|
||||||
**As an early adopter, you will not be impacted by future price increases**, so you will be benefitting from significantly reduced rates once more features are added.
|
**As an early adopter, you will not be impacted by future price increases**, so you will be benefitting from significantly reduced rates once more features are added.
|
||||||
If you haven't already, you should check out the new [feedback portal](https://feedback.rallly.co) to see what features are coming next.
|
If you haven't already, you should check out the new [feedback portal](https://feedback.rallly.co) to see what features are coming next.
|
||||||
|
|
||||||
Ready to go Pro? You can upgrade from your [billing page](https://app.rallly.co/settings/billing).
|
Ready to go Pro? You can upgrade from your [billing page](https://app.rallly.co/account/billing).
|
||||||
|
|
||||||
### Pricing Updates
|
### Pricing Updates
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,21 @@ const nextConfig = {
|
||||||
destination: "/api/notifications/unsubscribe",
|
destination: "/api/notifications/unsubscribe",
|
||||||
permanent: true,
|
permanent: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
source: "/settings/profile",
|
||||||
|
destination: "/account/profile",
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/settings/preferences",
|
||||||
|
destination: "/account/preferences",
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: "/settings/billing",
|
||||||
|
destination: "/account/billing",
|
||||||
|
permanent: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
devIndicators: {
|
devIndicators: {
|
||||||
|
|
|
@ -13,19 +13,19 @@ export function SettingsLayout({ children }: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<Tabs value={pathname}>
|
<Tabs value={pathname}>
|
||||||
<TabsList>
|
<TabsList>
|
||||||
<TabsTrigger asChild value="/settings/profile">
|
<TabsTrigger asChild value="/account/profile">
|
||||||
<Link href="/settings/profile">
|
<Link href="/account/profile">
|
||||||
<Trans i18nKey="profile" defaults="Profile" />
|
<Trans i18nKey="profile" defaults="Profile" />
|
||||||
</Link>
|
</Link>
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
||||||
<TabsTrigger asChild value="/settings/preferences">
|
<TabsTrigger asChild value="/account/preferences">
|
||||||
<Link href="/settings/preferences">
|
<Link href="/account/preferences">
|
||||||
<Trans i18nKey="preferences" defaults="Preferences" />
|
<Trans i18nKey="preferences" defaults="Preferences" />
|
||||||
</Link>
|
</Link>
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
||||||
<IfCloudHosted>
|
<IfCloudHosted>
|
||||||
<TabsTrigger asChild value="/settings/billing">
|
<TabsTrigger asChild value="/account/billing">
|
||||||
<Link href="/settings/billing">
|
<Link href="/account/billing">
|
||||||
<Trans i18nKey="billing" defaults="Billing" />
|
<Trans i18nKey="billing" defaults="Billing" />
|
||||||
</Link>
|
</Link>
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
|
@ -17,8 +17,8 @@ export function NavUser({
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
href="/settings/profile"
|
href="/account/profile"
|
||||||
data-state={pathname.startsWith("/settings") ? "active" : "inactive"}
|
data-state={pathname.startsWith("/account") ? "active" : "inactive"}
|
||||||
className="group relative flex w-full items-center gap-3 rounded-md p-3 text-sm hover:bg-gray-200 data-[state=active]:bg-gray-200"
|
className="group relative flex w-full items-center gap-3 rounded-md p-3 text-sm hover:bg-gray-200 data-[state=active]:bg-gray-200"
|
||||||
>
|
>
|
||||||
<OptimizedAvatarImage size="md" src={image} name={name} />
|
<OptimizedAvatarImage size="md" src={image} name={name} />
|
||||||
|
|
|
@ -36,7 +36,7 @@ export default async function Layout({
|
||||||
className="rounded-full"
|
className="rounded-full"
|
||||||
size="icon"
|
size="icon"
|
||||||
>
|
>
|
||||||
<Link href="/settings/profile">
|
<Link href="/account/profile">
|
||||||
<OptimizedAvatarImage
|
<OptimizedAvatarImage
|
||||||
src={user.image}
|
src={user.image}
|
||||||
name={user.name}
|
name={user.name}
|
||||||
|
|
|
@ -125,7 +125,7 @@ export default async function Page() {
|
||||||
</h2>
|
</h2>
|
||||||
<TileGrid>
|
<TileGrid>
|
||||||
<Tile asChild>
|
<Tile asChild>
|
||||||
<Link href="/settings/profile">
|
<Link href="/account/profile">
|
||||||
<ProfilePageIcon />
|
<ProfilePageIcon />
|
||||||
<TileTitle>
|
<TileTitle>
|
||||||
<Trans i18nKey="profile" defaults="Profile" />
|
<Trans i18nKey="profile" defaults="Profile" />
|
||||||
|
@ -134,7 +134,7 @@ export default async function Page() {
|
||||||
</Tile>
|
</Tile>
|
||||||
|
|
||||||
<Tile asChild>
|
<Tile asChild>
|
||||||
<Link href="/settings/preferences">
|
<Link href="/account/preferences">
|
||||||
<PreferencesPageIcon />
|
<PreferencesPageIcon />
|
||||||
<TileTitle>
|
<TileTitle>
|
||||||
<Trans i18nKey="preferences" defaults="Preferences" />
|
<Trans i18nKey="preferences" defaults="Preferences" />
|
||||||
|
@ -143,7 +143,7 @@ export default async function Page() {
|
||||||
</Tile>
|
</Tile>
|
||||||
<IfCloudHosted>
|
<IfCloudHosted>
|
||||||
<Tile asChild>
|
<Tile asChild>
|
||||||
<Link href="/settings/billing">
|
<Link href="/account/billing">
|
||||||
<BillingPageIcon />
|
<BillingPageIcon />
|
||||||
<TileTitle>
|
<TileTitle>
|
||||||
<Trans i18nKey="billing" defaults="Billing" />
|
<Trans i18nKey="billing" defaults="Billing" />
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
import { ProfilePicture } from "@/app/[locale]/(space)/settings/profile/profile-picture";
|
import { ProfilePicture } from "@/app/[locale]/(space)/account/profile/profile-picture";
|
||||||
import { requireUser } from "@/auth/queries";
|
import { requireUser } from "@/auth/queries";
|
||||||
import { Logo } from "@/components/logo";
|
import { Logo } from "@/components/logo";
|
||||||
import { Trans } from "@/components/trans";
|
import { Trans } from "@/components/trans";
|
||||||
|
|
|
@ -11,7 +11,7 @@ export function createStripePortalSessionHandler(path = "") {
|
||||||
return async (request: NextRequest) => {
|
return async (request: NextRequest) => {
|
||||||
const sessionId = request.nextUrl.searchParams.get("session_id");
|
const sessionId = request.nextUrl.searchParams.get("session_id");
|
||||||
const returnPath =
|
const returnPath =
|
||||||
request.nextUrl.searchParams.get("return_path") ?? "/settings/billing";
|
request.nextUrl.searchParams.get("return_path") ?? "/account/billing";
|
||||||
|
|
||||||
let customerId: string | undefined;
|
let customerId: string | undefined;
|
||||||
|
|
||||||
|
|
|
@ -72,5 +72,5 @@ export const GET = async (request: NextRequest) => {
|
||||||
|
|
||||||
await handleEmailChange(token);
|
await handleEmailChange(token);
|
||||||
|
|
||||||
return NextResponse.redirect(new URL("/settings/profile", request.url));
|
return NextResponse.redirect(new URL("/account/profile", request.url));
|
||||||
};
|
};
|
||||||
|
|
|
@ -175,7 +175,7 @@ export function PayWallDialog({ children, ...forwardedProps }: DialogProps) {
|
||||||
<Link
|
<Link
|
||||||
onClick={() => dialog.dismiss()}
|
onClick={() => dialog.dismiss()}
|
||||||
className="text-link"
|
className="text-link"
|
||||||
href="/settings/billing"
|
href="/account/billing"
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -76,10 +76,7 @@ export const UserDropdown = ({ className }: { className?: string }) => {
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<IfAuthenticated>
|
<IfAuthenticated>
|
||||||
<DropdownMenuItem asChild={true}>
|
<DropdownMenuItem asChild={true}>
|
||||||
<Link
|
<Link href="/account/profile" className="flex items-center gap-x-2">
|
||||||
href="/settings/profile"
|
|
||||||
className="flex items-center gap-x-2"
|
|
||||||
>
|
|
||||||
<UserIcon className="size-4 text-muted-foreground" />
|
<UserIcon className="size-4 text-muted-foreground" />
|
||||||
<Trans i18nKey="profile" defaults="Profile" />
|
<Trans i18nKey="profile" defaults="Profile" />
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -87,7 +84,7 @@ export const UserDropdown = ({ className }: { className?: string }) => {
|
||||||
</IfAuthenticated>
|
</IfAuthenticated>
|
||||||
<DropdownMenuItem asChild={true}>
|
<DropdownMenuItem asChild={true}>
|
||||||
<Link
|
<Link
|
||||||
href="/settings/preferences"
|
href="/account/preferences"
|
||||||
className="flex items-center gap-x-2"
|
className="flex items-center gap-x-2"
|
||||||
>
|
>
|
||||||
<Settings2Icon className="size-4 text-muted-foreground" />
|
<Settings2Icon className="size-4 text-muted-foreground" />
|
||||||
|
@ -96,10 +93,7 @@ export const UserDropdown = ({ className }: { className?: string }) => {
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<IfCloudHosted>
|
<IfCloudHosted>
|
||||||
<DropdownMenuItem asChild={true}>
|
<DropdownMenuItem asChild={true}>
|
||||||
<Link
|
<Link href="/account/billing" className="flex items-center gap-x-2">
|
||||||
href="/settings/billing"
|
|
||||||
className="flex items-center gap-x-2"
|
|
||||||
>
|
|
||||||
<CreditCardIcon className="size-4 text-muted-foreground" />
|
<CreditCardIcon className="size-4 text-muted-foreground" />
|
||||||
<Trans i18nKey="Billing" defaults="Billing" />
|
<Trans i18nKey="Billing" defaults="Billing" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
|
@ -107,15 +107,15 @@ export function CommandMenu() {
|
||||||
<CommandGroup
|
<CommandGroup
|
||||||
heading={<Trans i18nKey="settings" defaults="Settings" />}
|
heading={<Trans i18nKey="settings" defaults="Settings" />}
|
||||||
>
|
>
|
||||||
<CommandItem onSelect={() => handleSelect("/settings/profile")}>
|
<CommandItem onSelect={() => handleSelect("/account/profile")}>
|
||||||
<ProfilePageIcon size="sm" />
|
<ProfilePageIcon size="sm" />
|
||||||
<NavigationCommandLabel label={t("profile")} />
|
<NavigationCommandLabel label={t("profile")} />
|
||||||
</CommandItem>
|
</CommandItem>
|
||||||
<CommandItem onSelect={() => handleSelect("/settings/preferences")}>
|
<CommandItem onSelect={() => handleSelect("/account/preferences")}>
|
||||||
<PreferencesPageIcon size="sm" />
|
<PreferencesPageIcon size="sm" />
|
||||||
<NavigationCommandLabel label={t("preferences")} />
|
<NavigationCommandLabel label={t("preferences")} />
|
||||||
</CommandItem>
|
</CommandItem>
|
||||||
<CommandItem onSelect={() => handleSelect("/settings/billing")}>
|
<CommandItem onSelect={() => handleSelect("/account/billing")}>
|
||||||
<BillingPageIcon size="sm" />
|
<BillingPageIcon size="sm" />
|
||||||
<NavigationCommandLabel label={t("billing")} />
|
<NavigationCommandLabel label={t("billing")} />
|
||||||
</CommandItem>
|
</CommandItem>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue