Skip to content

Commit 5939b80

Browse files
committed
feat: improve mobile app download page UX and web access
1 parent 2b85779 commit 5939b80

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

src/App.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,16 @@ function AppContent() {
4545
const isSignInPage = window.location.pathname === '/sign-in';
4646
const isSignUpPage = window.location.pathname === '/sign-up';
4747

48-
if (isMobileDevice && !isSignedIn) {
48+
// Check if user wants to force web version
49+
const urlParams = new URLSearchParams(window.location.search);
50+
const forceWeb = urlParams.get('web') === 'true' || localStorage.getItem('forceWebVersion') === 'true';
51+
52+
// Store preference if URL parameter is present
53+
if (urlParams.get('web') === 'true') {
54+
localStorage.setItem('forceWebVersion', 'true');
55+
}
56+
57+
if (isMobileDevice && !isSignedIn && !forceWeb) {
4958
return <MobileAppDownload />;
5059
}
5160

src/components/common/MobileAppDownload/index.tsx

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Lock, Zap, Cloud } from 'lucide-react';
1+
import { Lock, Zap, Cloud, ExternalLink } from 'lucide-react';
22
import { useMobilePlatform } from '@/hooks/useIsMobile';
33
import { useState } from 'react';
44

@@ -9,8 +9,8 @@ export function MobileAppDownload() {
99
const [imageLoaded, setImageLoaded] = useState(false);
1010

1111
return (
12-
<div className="bg-background flex min-h-screen flex-col items-center justify-center p-6">
13-
<div className={`w-full max-w-md space-y-8 text-center transition-opacity duration-300 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}>
12+
<div className="bg-background flex min-h-screen flex-col items-center p-6 pt-8">
13+
<div className={`w-full max-w-md space-y-6 text-center transition-opacity duration-300 ${imageLoaded ? 'opacity-100' : 'opacity-0'}`}>
1414
{/* App Icon/Logo */}
1515
<div className="mx-auto flex h-32 w-32 items-center justify-center">
1616
<img
@@ -22,7 +22,7 @@ export function MobileAppDownload() {
2222
</div>
2323

2424
{/* Title */}
25-
<div className="space-y-2">
25+
<div className="-mt-2 space-y-2">
2626
<h1 className="text-foreground text-3xl font-bold">Typelets</h1>
2727
<p className="text-muted-foreground text-lg">
2828
Secure, encrypted note-taking
@@ -84,9 +84,6 @@ export function MobileAppDownload() {
8484
) : platform === 'ios' ? (
8585
<div className="bg-muted rounded-lg p-4">
8686
<p className="text-foreground font-semibold">iOS App Coming Soon</p>
87-
<p className="text-muted-foreground mt-1 text-sm">
88-
We're working hard to bring Typelets to the App Store
89-
</p>
9087
</div>
9188
) : (
9289
<a
@@ -101,6 +98,20 @@ export function MobileAppDownload() {
10198
</a>
10299
)}
103100
</div>
101+
102+
{/* Web Version Link */}
103+
<div className="border-border bg-card mt-8 rounded-lg border p-4">
104+
<p className="text-foreground mb-3 text-sm font-semibold">
105+
For the best experience, use the Typelets mobile application.
106+
</p>
107+
<a
108+
href="/?web=true"
109+
className="text-primary hover:text-primary/80 inline-flex items-center gap-2 text-sm font-medium transition-colors"
110+
>
111+
<ExternalLink className="h-4 w-4" />
112+
Continue to Web Version
113+
</a>
114+
</div>
104115
</div>
105116
</div>
106117
);

0 commit comments

Comments
 (0)