Update labels and refine hooks for teams and billing modules

This commit modifies several language labels and refines hooks related to 'teams' and 'billing' modules for better clarity and consistency. It also includes the deletion of unused locale files and package dependencies transfered to 'peerDependencies'. Lastly, it introduces minor enhancements in server command, error logging functionality, and scripts to interact with Stripe.
This commit is contained in:
giancarlo
2024-03-26 23:32:28 +08:00
parent 4032aed827
commit e402caff30
52 changed files with 1227 additions and 1049 deletions

View File

@@ -9,7 +9,7 @@ const features = {
};
const paths = {
callback: pathsConfig.auth.callback,
callback: pathsConfig.auth.callback + `?next=${pathsConfig.app.accountHome}`,
};
function PersonalAccountSettingsPage() {

View File

@@ -22,10 +22,12 @@ export function SiteHeaderAccountSection(
session: Session | null;
}>,
) {
if (!props.session) {
return <AuthButtons />;
}
return (
<Suspense fallback={<AuthButtons />}>
<SuspendedPersonalAccountDropdown session={props.session} />
</Suspense>
<SuspendedPersonalAccountDropdown session={props.session} />
);
}

View File

@@ -4,7 +4,7 @@ import { SiteHeaderAccountSection } from '~/(marketing)/_components/site-header-
import { SiteNavigation } from '~/(marketing)/_components/site-navigation';
import { AppLogo } from '~/components/app-logo';
export async function SiteHeader(props: { session?: Session | null }) {
export function SiteHeader(props: { session?: Session | null }) {
return (
<div className={'container mx-auto'}>
<div className="flex h-16 items-center justify-between">

View File

@@ -1,3 +1,5 @@
import { GlobalLoader } from '@kit/ui/global-loader';
export default GlobalLoader;
import { withI18n } from '~/lib/i18n/with-i18n';
export default withI18n(GlobalLoader);

View File

@@ -30,9 +30,8 @@ export default async function RootLayout({
<html lang={lang} className={getClassName()}>
<body>
<RootProviders lang={lang}>{children}</RootProviders>
<Toaster richColors={false} />
</body>
<Toaster richColors={false} />
</html>
);
}

View File

@@ -21,16 +21,23 @@
"updatePasswordError": "Encountered an error. Please try again",
"updatePasswordLoading": "Updating password...",
"updateProfileLoading": "Updating profile...",
"displayNameLabel": "Your Name",
"name": "Your Name",
"nameDescription": "Update your name to be displayed on your profile",
"emailLabel": "Email Address",
"profilePictureHeading": "Upload your avatar picture",
"profilePictureSubheading": "Please choose a photo to upload as your profile picture.",
"accountImage": "Your Profile Picture",
"accountImageDescription": "Please choose a photo to upload as your profile picture.",
"profilePictureHeading": "Upload a Profile Picture",
"profilePictureSubheading": "Choose a photo to upload as your profile picture.",
"updateProfileSubmitLabel": "Update Profile",
"updatePasswordCardTitle": "Update your Password",
"updatePasswordCardDescription": "Update your password to keep your account secure.",
"currentPassword": "Current Password",
"newPassword": "New Password",
"repeatPassword": "Repeat New Password",
"yourPassword": "Your Password",
"updatePasswordSubmitLabel": "Update Password",
"updateEmailCardTitle": "Update your Email",
"updateEmailCardDescription": "Update your email address you use to login to your account",
"newEmail": "Your New Email",
"repeatEmail": "Repeat Email",
"updateEmailSubmitLabel": "Update Email Address",
@@ -39,6 +46,7 @@
"updateEmailLoading": "Updating your email...",
"updateEmailError": "Email not updated. Please try again",
"passwordNotMatching": "Passwords do not match. Make sure you're using the correct password",
"emailNotMatching": "Emails do not match. Make sure you're using the correct email",
"passwordNotChanged": "Your password has not changed",
"emailsNotMatching": "Emails do not match. Make sure you're using the correct email",
"updatingSameEmail": "The email chosen is the same as your current one",
@@ -119,7 +127,7 @@
"loadingUser": "Loading user details. Please wait...",
"linkPhoneNumber": "Link Phone Number",
"dangerZone": "Danger Zone",
"dangerZoneSubheading": "Some actions cannot be undone. Please be careful.",
"dangerZoneDescription": "Some actions cannot be undone. Please be careful.",
"deleteAccount": "Delete your Account",
"deleteAccountDescription": "This will delete your account and the organizations you own. Furthermore, we will immediately cancel any active subscriptions. This action cannot be undone. You will be asked to confirm this action in the next step.",
"deleteProfileConfirmationInputLabel": "Type DELETE to confirm",

View File

@@ -0,0 +1 @@
{}

View File

@@ -0,0 +1 @@
{}

View File

@@ -1,15 +0,0 @@
{
"setupOrganization": "Setup Organization",
"setupOrganizationDescription": "Welcome! First, let's setup your organization.",
"organizationNameLabel": "Organization name",
"errorAlertHeading": "There was an error completing your onboarding.",
"inviteMembers": "Invite members",
"inviteMembersDescription": "Invite your team members to join your organization.",
"info": "Details",
"invites": "Invites",
"complete": "Complete",
"successStepHeading": "You're all set! You can now start using the app.",
"continue": "Continue to your Dashboard",
"settingAccount": "We're setting up your account. Please wait...",
"organizationNamePlaceholder": "Ex. Acme Inc."
}

View File

@@ -1,70 +0,0 @@
{
"subscriptionTabSubheading": "Manage your Subscription and Billing",
"checkout": "Checkout",
"manageBillingDescription": "Visit your Customer Portal to manage your subscription and billing.",
"manageBilling": "Go to Customer Portal",
"notSubscribedToAnyPlan": "You are not currently subscribed to any plan",
"choosePlan": "Select a plan below",
"currentPlan": "Your Plan",
"subscriptionWillEndOn": "The subscription will end on {{- endDate }}",
"unknownErrorAlertHeading": "Sorry, something went wrong",
"unknownErrorAlert": "We encountered an unknown error while processing your payment. Please try again or contact support.",
"checkOutCanceledAlertHeading": "The checkout was canceled",
"checkOutCanceledAlert": "The checkout was canceled. Please contact us if you're experiencing any issues.",
"checkOutCompletedAlertHeading": "Checkout successfully completed",
"checkOutCompletedAlert": "Yay, your payment went through!",
"cancelAtPeriodEndDescription": "Your subscription is scheduled to be canceled on {{- endDate }}.",
"renewAtPeriodEndDescription": "Your subscription is scheduled to be renewed on {{- endDate }}",
"noPermissionsAlertHeading": "You don't have permissions to change the billing settings",
"noPermissionsAlertBody": "Please contact your organization owner to change the billing settings for your organization.",
"checkoutSuccessTitle": "Done! You're all set.",
"checkoutSuccessDescription": "Thank you for subscribing, we have successfully processed your subscription! A confirmation email will be sent to {{ customerEmail }}.",
"checkoutSuccessBackButton": "Proceed to App",
"status": {
"free": {
"label": "Free Plan",
"heading": "You are currently on the Free Plan",
"description": "You're on a free plan. You can upgrade to a paid plan at any time."
},
"active": {
"label": "Active",
"heading": "Your subscription is active",
"description": "Your subscription is active. You can manage your subscription and billing in the Customer Portal."
},
"trialing": {
"label": "Trial",
"heading": "You're on a trial",
"description": "Your trial will end on {{- trialEndDate }}."
},
"past_due": {
"label": "Past Due",
"heading": "Your invoice is past due",
"description": "Your invoice is past due. Please update your payment method."
},
"canceled": {
"label": "Canceled",
"heading": "Your subscription is canceled",
"description": "Your subscription is canceled. It is scheduled to end on {{- endDate }}."
},
"unpaid": {
"label": "Unpaid",
"heading": "Your invoice is unpaid",
"description": "Your invoice is unpaid. Please update your payment method."
},
"incomplete": {
"label": "Incomplete",
"heading": "We're waiting for your payment",
"description": "We're waiting for your payment to go through. Please bear with us."
},
"incomplete_expired": {
"label": "Expired",
"heading": "Your payment has expired",
"description": "Your payment has expired. Please update your payment method."
},
"paused": {
"label": "Paused",
"heading": "Your subscription is paused",
"description": "Your subscription is paused. You can resume it at any time."
}
}
}