1.2.1
Good to know
Please check the
version
field in thepackage.json
file 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.css
have been split intostyles/theme.css
- Import
theme.css
inapp/[locale]/layout.tsx
Future theme switching solution will be based on theme.css
- Use
main
for custom primary styles
- Custom
primary
related CSS variables instyles/theme.css
have been renamed tomain
- Add
main
color extension intailwind.config.ts
- Support regular users uploading files through Cloudflare pre-signed URLs
generatePresignedUploadUrl
inactions/r2-resources/index.ts
has been extended togenerateAdminPresignedUploadUrl
andgenerateUserPresignedUploadUrl
- Pages that previously used
generatePresignedUploadUrl
have been updated to usegenerateAdminPresignedUploadUrl
Other Updates
Non-essential updates, existing code does not need to be synchronized.
- Text updates
- Unified
unauthorized
default message - Added
analyze
command 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
uploadFile
method in@/lib/cloudflare/r2
toserverUploadFile
, and updated all function names calling this method - Optimized
BLOGS_IMAGE_PATH
path 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