diff --git a/apps/readest-app/next.config.mjs b/apps/readest-app/next.config.mjs index 3220a3ea..e321072d 100644 --- a/apps/readest-app/next.config.mjs +++ b/apps/readest-app/next.config.mjs @@ -13,10 +13,6 @@ if (isDev) { const exportOutput = appPlatform !== 'web' && !isDev; -const bundleAnalyzer = withBundleAnalyzer({ - enabled: process.env.ANALYZE === 'true', -}); - /** @type {import('next').NextConfig} */ const nextConfig = { // Ensure Next.js uses SSG instead of SSR @@ -75,4 +71,8 @@ const withPWA = withPWAInit({ }, }); -export default withPWA(bundleAnalyzer(nextConfig)); +const withAnalyzer = withBundleAnalyzer({ + enabled: process.env.ANALYZE === 'true', +}); + +export default withPWA(withAnalyzer(nextConfig)); diff --git a/apps/readest-app/src/app/auth/page.tsx b/apps/readest-app/src/app/auth/page.tsx index 68009bee..b5f9732f 100644 --- a/apps/readest-app/src/app/auth/page.tsx +++ b/apps/readest-app/src/app/auth/page.tsx @@ -334,66 +334,82 @@ export default function AuthPage() { return isTauriAppPlatform() ? (
- +
+ - {appService?.hasWindowBar && ( - + )} +
+
+ - )} -
-
- - - -
- + + +
+
+ +
+
) : ( diff --git a/apps/readest-app/src/app/user/components/Header.tsx b/apps/readest-app/src/app/user/components/Header.tsx index 53e9e7c9..017108d7 100644 --- a/apps/readest-app/src/app/user/components/Header.tsx +++ b/apps/readest-app/src/app/user/components/Header.tsx @@ -22,7 +22,10 @@ const ProfileHeader: React.FC = ({ onGoBack }) => { appService?.hasTrafficLight && 'pt-11', )} > - diff --git a/apps/readest-app/src/app/user/components/PlansComparison.tsx b/apps/readest-app/src/app/user/components/PlansComparison.tsx index cf52505c..a01f33dd 100644 --- a/apps/readest-app/src/app/user/components/PlansComparison.tsx +++ b/apps/readest-app/src/app/user/components/PlansComparison.tsx @@ -44,13 +44,16 @@ const PlansComparison: React.FC = ({ }; const handleTouchStart = (e: React.TouchEvent) => { - const touchStart = e.touches[0]!.clientX; + const touchStartX = e.touches[0]!.clientX; + const touchStartY = e.touches[0]!.clientY; const handleTouchMove = (moveEvent: TouchEvent) => { - const touchEnd = moveEvent.touches[0]!.clientX; - const diff = touchStart - touchEnd; + const touchEndX = moveEvent.touches[0]!.clientX; + const touchEndY = moveEvent.touches[0]!.clientY; + const diffX = touchStartX - touchEndX; + const diffY = touchStartY - touchEndY; - if (Math.abs(diff) > 50) { - if (diff > 0) { + if (Math.abs(diffX) > Math.abs(diffY) && Math.abs(diffX) > 50) { + if (diffX > 0) { handlePlanSwipe('left'); } else { handlePlanSwipe('right'); diff --git a/apps/readest-app/src/app/user/page.tsx b/apps/readest-app/src/app/user/page.tsx index 8fa9d42e..8033bca5 100644 --- a/apps/readest-app/src/app/user/page.tsx +++ b/apps/readest-app/src/app/user/page.tsx @@ -191,7 +191,7 @@ const ProfilePage = () => { useEffect(() => { fetch(WEB_STRIPE_PLANS_URL) .then((res) => res.json()) - .then((data) => setAvailablePlans(data)); + .then((data) => setAvailablePlans(data || [])); }, []); if (!mounted) { @@ -219,14 +219,18 @@ const ProfilePage = () => { return (
-
+
{loading && (