1.2.1
Good to know
Please check the
versionfield in thepackage.jsonfile for the version number
Bug Fixes
Required update, version 1.2.0 code needs to be updated.
- Fix stripe existence check
In app/api/admin/stripe/coupons/route.ts, before calling stripe.xxx methods, you need to check if stripe exists
app/api/admin/stripe/coupons/route.ts
if (!stripe) {
return apiResponse.serverError('Stripe is not initialized. Please check your environment variables.');
}- Fix unencoded symbol error
In app/[locale]/(protected)/dashboard/credit-usage-example/page.tsx, one instance of feature's has been changed to feature's
Optimizations
These optimizations are preparations for future features, old version code does not need to be synchronized.
- Split custom styles
- Custom styles in
styles/globals.csshave been split intostyles/theme.css - Import
theme.cssinapp/[locale]/layout.tsx
Future theme switching solution will be based on theme.css
- Use
mainfor custom primary styles
- Custom
primaryrelated CSS variables instyles/theme.csshave been renamed tomain - Add
maincolor extension intailwind.config.ts
- Support regular users uploading files through Cloudflare pre-signed URLs
generatePresignedUploadUrlinactions/r2-resources/index.tshas been extended togenerateAdminPresignedUploadUrlandgenerateUserPresignedUploadUrl- Pages that previously used
generatePresignedUploadUrlhave been updated to usegenerateAdminPresignedUploadUrl
Other Updates
Non-essential updates, existing code does not need to be synchronized.
- Text updates
- Unified
unauthorizeddefault message - Added
analyzecommand topackage.json - Pricing page path now supports environment variable configuration (
NEXT_PUBLIC_PRICING_PATH), defaults to/#pricing - Footer link object fields have been modified to sync with Header
- Added website name configuration to
config/site.ts, email templates and Footer locations that need to display the website name now use configuration instead of hardcoding - Renamed
uploadFilemethod in@/lib/cloudflare/r2toserverUploadFile, and updated all function names calling this method - Optimized
BLOGS_IMAGE_PATHpath by removing the suffix - Unified the method for server-side file upload to Cloudflare R2 file naming and path configuration
- Changed the path of AI model list file
models.ts