🏗️ Move account settings (#1814)

This commit is contained in:
Luke Vella 2025-07-11 18:02:38 +01:00 committed by GitHub
parent 2889967726
commit bfa3b0818e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 41 additions and 32 deletions

View file

@ -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 />,

View file

@ -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"

View file

@ -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

View file

@ -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: {

View file

@ -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>

View file

@ -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} />

View file

@ -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}

View file

@ -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" />

View file

@ -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";

View file

@ -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;

View file

@ -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));
}; };

View file

@ -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"
/> />
), ),
}} }}

View file

@ -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>

View file

@ -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>