diff --git a/messages/en.json b/messages/en.json
index 12902d9..9ea47d6 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -378,8 +378,7 @@
"newsletter": {
"title": "Newsletter Subscription",
"description": "Manage your newsletter subscription preferences",
- "checkboxLabel": "Subscribe to newsletter",
- "checkboxDescription": "Receive updates, news, and special offers via email",
+ "label": "Subscribe to newsletter",
"hint": "You can change your subscription preferences at any time",
"emailRequired": "Email is required to subscribe to the newsletter",
"subscribeSuccess": "Successfully subscribed to the newsletter",
@@ -395,7 +394,7 @@
},
"Mail": {
"common": {
- "team": "MkSaaS Team",
+ "team": "{name} Team",
"copyright": "©️ {year} All Rights Reserved."
},
"verifyEmail": {
diff --git a/messages/zh.json b/messages/zh.json
index 8caf74f..3a7e910 100644
--- a/messages/zh.json
+++ b/messages/zh.json
@@ -373,8 +373,7 @@
"newsletter": {
"title": "订阅",
"description": "管理您的邮件列表订阅偏好",
- "checkboxLabel": "订阅邮件列表",
- "checkboxDescription": "通过邮件接收更新、新闻和特别优惠",
+ "label": "订阅邮件列表",
"hint": "您可以随时更改订阅偏好",
"emailRequired": "订阅邮件列表需要邮箱",
"subscribeSuccess": "成功订阅邮件列表",
@@ -390,7 +389,7 @@
},
"Mail": {
"common": {
- "team": "MkSaaS 团队",
+ "team": "{name} 团队",
"copyright": "©️ {year} 版权所有。"
},
"verifyEmail": {
diff --git a/src/app/[locale]/(dashborad)/dashboard/page.tsx b/src/app/[locale]/(dashborad)/dashboard/page.tsx
index 58585e9..3fed3e4 100644
--- a/src/app/[locale]/(dashborad)/dashboard/page.tsx
+++ b/src/app/[locale]/(dashborad)/dashboard/page.tsx
@@ -14,13 +14,8 @@ export default function DashboardPage() {
return (
<>
-
-
-
+
+
>
);
diff --git a/src/app/[locale]/(dashborad)/settings/account/page.tsx b/src/app/[locale]/(dashborad)/settings/account/page.tsx
index eb985ef..f8d7bb0 100644
--- a/src/app/[locale]/(dashborad)/settings/account/page.tsx
+++ b/src/app/[locale]/(dashborad)/settings/account/page.tsx
@@ -1,8 +1,8 @@
import { DashboardHeader } from '@/components/dashboard/dashboard-header';
-import { UpdateAvatarCard } from '@/components/settings/account/update-avatar-card';
-import { UpdateNameCard } from '@/components/settings/account/update-name-card';
import { ConditionalUpdatePasswordCard } from '@/components/settings/account/conditional-update-password-card';
import { DeleteAccountCard } from '@/components/settings/account/delete-account-card';
+import { UpdateAvatarCard } from '@/components/settings/account/update-avatar-card';
+import { UpdateNameCard } from '@/components/settings/account/update-name-card';
import { useTranslations } from 'next-intl';
export default function SettingsAccountPage() {
@@ -19,20 +19,16 @@ export default function SettingsAccountPage() {
},
];
-
-
return (
<>
-
-
-
-
-
-
-
-
-
+
+
>
diff --git a/src/app/[locale]/(dashborad)/settings/billing/page.tsx b/src/app/[locale]/(dashborad)/settings/billing/page.tsx
index 21651dc..8efc7f5 100644
--- a/src/app/[locale]/(dashborad)/settings/billing/page.tsx
+++ b/src/app/[locale]/(dashborad)/settings/billing/page.tsx
@@ -18,13 +18,8 @@ export default function SettingsBillingPage() {
return (
<>
-
-
-
+
+
>
);
diff --git a/src/app/[locale]/(dashborad)/settings/notification/page.tsx b/src/app/[locale]/(dashborad)/settings/notifications/page.tsx
similarity index 77%
rename from src/app/[locale]/(dashborad)/settings/notification/page.tsx
rename to src/app/[locale]/(dashborad)/settings/notifications/page.tsx
index f702d37..6218bf2 100644
--- a/src/app/[locale]/(dashborad)/settings/notification/page.tsx
+++ b/src/app/[locale]/(dashborad)/settings/notifications/page.tsx
@@ -20,11 +20,9 @@ export default function SettingsNotificationPage() {
<>
-
-
-
-
-
+
>
diff --git a/src/components/dashboard/sidebar-main.tsx b/src/components/dashboard/sidebar-main.tsx
index 089af13..1722a55 100644
--- a/src/components/dashboard/sidebar-main.tsx
+++ b/src/components/dashboard/sidebar-main.tsx
@@ -49,7 +49,9 @@ export function SidebarMain() {
{item.items?.length ? (
diff --git a/src/components/settings/account/conditional-update-password-card.tsx b/src/components/settings/account/conditional-update-password-card.tsx
index bbcecf4..bd0a48d 100644
--- a/src/components/settings/account/conditional-update-password-card.tsx
+++ b/src/components/settings/account/conditional-update-password-card.tsx
@@ -4,6 +4,11 @@ import { UpdatePasswordCard } from '@/components/settings/account/update-passwor
import { ResetPasswordCard } from '@/components/settings/account/reset-password-card';
import { authClient } from '@/lib/auth-client';
import { useEffect, useState } from 'react';
+import { cn } from '@/lib/utils';
+
+interface ConditionalUpdatePasswordCardProps {
+ className?: string;
+}
/**
* Conditionally renders either:
@@ -11,7 +16,7 @@ import { useEffect, useState } from 'react';
* - ResetPasswordCard: if the user only has social login providers and has an email
* - Nothing: if the user has no credential provider and no email
*/
-export function ConditionalUpdatePasswordCard() {
+export function ConditionalUpdatePasswordCard({ className }: ConditionalUpdatePasswordCardProps) {
const { data: session } = authClient.useSession();
const [hasCredentialProvider, setHasCredentialProvider] = useState(false);
const [isLoading, setIsLoading] = useState(true);
@@ -53,13 +58,13 @@ export function ConditionalUpdatePasswordCard() {
// If user has credential provider, show UpdatePasswordCard
if (hasCredentialProvider) {
- return ;
+ return ;
}
// If user doesn't have credential provider but has an email, show ResetPasswordCard
// The forgot password flow requires an email address
if (session?.user?.email) {
- return ;
+ return ;
}
// If user has no credential provider and no email, don't show anything
diff --git a/src/components/settings/account/delete-account-card.tsx b/src/components/settings/account/delete-account-card.tsx
index 3d67ba8..3f1f4bf 100644
--- a/src/components/settings/account/delete-account-card.tsx
+++ b/src/components/settings/account/delete-account-card.tsx
@@ -20,17 +20,22 @@ import {
} from '@/components/ui/alert-dialog';
import { useLocaleRouter } from '@/i18n/navigation';
import { authClient } from '@/lib/auth-client';
+import { cn } from '@/lib/utils';
import { useTranslations } from 'next-intl';
import { useState } from 'react';
import { toast } from 'sonner';
+interface DeleteAccountCardProps {
+ className?: string;
+}
+
/**
* Delete user account
*
* This component allows users to permanently delete their account.
* It includes a confirmation dialog to prevent accidental deletions.
*/
-export function DeleteAccountCard() {
+export function DeleteAccountCard({ className }: DeleteAccountCardProps) {
const t = useTranslations('Dashboard.sidebar.settings.items.account');
const [isDeleting, setIsDeleting] = useState(false);
const [showConfirmation, setShowConfirmation] = useState(false);
@@ -76,7 +81,7 @@ export function DeleteAccountCard() {
};
return (
-
+
{t('deleteAccount.title')}
diff --git a/src/components/settings/account/reset-password-card.tsx b/src/components/settings/account/reset-password-card.tsx
index ae696d3..9e21a7e 100644
--- a/src/components/settings/account/reset-password-card.tsx
+++ b/src/components/settings/account/reset-password-card.tsx
@@ -11,8 +11,13 @@ import {
} from '@/components/ui/card';
import { useLocaleRouter } from '@/i18n/navigation';
import { authClient } from '@/lib/auth-client';
+import { cn } from '@/lib/utils';
import { useTranslations } from 'next-intl';
+interface ResetPasswordCardProps {
+ className?: string;
+}
+
/**
* Reset Password Card
*
@@ -31,7 +36,7 @@ import { useTranslations } from 'next-intl';
*
* This effectively adds a credential provider to their account, enabling email/password login.
*/
-export function ResetPasswordCard() {
+export function ResetPasswordCard({ className }: ResetPasswordCardProps) {
const router = useLocaleRouter();
const t = useTranslations('Dashboard.sidebar.settings.items.account');
const { data: session } = authClient.useSession();
@@ -46,7 +51,7 @@ export function ResetPasswordCard() {
};
return (
-
+
{t('setupPassword.title')}
diff --git a/src/components/settings/account/update-avatar-card.tsx b/src/components/settings/account/update-avatar-card.tsx
index e2960e9..a52d112 100644
--- a/src/components/settings/account/update-avatar-card.tsx
+++ b/src/components/settings/account/update-avatar-card.tsx
@@ -12,16 +12,21 @@ import {
CardTitle
} from '@/components/ui/card';
import { authClient } from '@/lib/auth-client';
+import { cn } from '@/lib/utils';
import { uploadFileFromBrowser } from '@/storage';
import { User2Icon } from 'lucide-react';
import { useTranslations } from 'next-intl';
import { useEffect, useState } from 'react';
import { toast } from 'sonner';
+interface UpdateAvatarCardProps {
+ className?: string;
+}
+
/**
* Update the user's avatar
*/
-export function UpdateAvatarCard() {
+export function UpdateAvatarCard({ className }: UpdateAvatarCardProps) {
const t = useTranslations('Dashboard.sidebar.settings.items.account');
const [isUploading, setIsUploading] = useState(false);
const [error, setError] = useState('');
@@ -123,7 +128,7 @@ export function UpdateAvatarCard() {
};
return (
-
+
{t('avatar.title')}
@@ -133,7 +138,7 @@ export function UpdateAvatarCard() {
-
+
{/* avatar */}
@@ -144,7 +149,7 @@ export function UpdateAvatarCard() {
{/* upload button */}