@digilogiclabs/create-saas-app 1.5.4 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -49
- package/bin/index.js +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/generators/template-generator.d.ts.map +1 -1
- package/dist/generators/template-generator.js +3 -5
- package/dist/generators/template-generator.js.map +1 -1
- package/dist/templates/mobile/base/template/App.tsx +113 -23
- package/dist/templates/mobile/base/template/package.json +5 -2
- package/dist/templates/web/base/template/package.json +1 -1
- package/dist/templates/web/base/template/src/app/checkout/page.tsx +99 -8
- package/dist/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
- package/dist/templates/web/base/template/src/app/globals.css +97 -0
- package/dist/templates/web/base/template/src/app/login/page.tsx +36 -8
- package/dist/templates/web/base/template/src/app/page.tsx +123 -83
- package/dist/templates/web/base/template/src/app/signup/page.tsx +36 -8
- package/dist/templates/web/base/template/src/components/shared/header.tsx +49 -30
- package/dist/templates/web/ui-auth/template/package.json +2 -2
- package/dist/templates/web/ui-auth/template/src/app/page.tsx +203 -61
- package/dist/templates/web/ui-auth-payments/template/package.json +2 -2
- package/dist/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
- package/dist/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
- package/dist/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
- package/dist/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
- package/dist/templates/web/ui-auth-payments-audio/template/package.json +2 -2
- package/dist/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
- package/dist/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
- package/dist/templates/web/ui-auth-payments-video/template/package.json +2 -2
- package/dist/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
- package/dist/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
- package/dist/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
- package/package.json +106 -106
- package/src/templates/mobile/base/template/App.tsx +113 -23
- package/src/templates/mobile/base/template/package.json +5 -2
- package/src/templates/web/base/template/package.json +1 -1
- package/src/templates/web/base/template/src/app/checkout/page.tsx +99 -8
- package/src/templates/web/base/template/src/app/dashboard/page.tsx +309 -0
- package/src/templates/web/base/template/src/app/globals.css +97 -0
- package/src/templates/web/base/template/src/app/login/page.tsx +36 -8
- package/src/templates/web/base/template/src/app/page.tsx +123 -83
- package/src/templates/web/base/template/src/app/signup/page.tsx +36 -8
- package/src/templates/web/base/template/src/components/shared/header.tsx +49 -30
- package/src/templates/web/ui-auth/template/package.json +2 -2
- package/src/templates/web/ui-auth/template/src/app/page.tsx +203 -61
- package/src/templates/web/ui-auth-payments/template/package.json +2 -2
- package/src/templates/web/ui-auth-payments/template/src/app/checkout/page.tsx +253 -87
- package/src/templates/web/ui-auth-payments/template/src/app/globals.css +129 -0
- package/src/templates/web/ui-auth-payments/template/src/app/page.tsx +246 -74
- package/src/templates/web/ui-auth-payments/template/src/components/shared/header.tsx +106 -40
- package/src/templates/web/ui-auth-payments-audio/template/package.json +2 -2
- package/src/templates/web/ui-auth-payments-audio/template/src/app/page.tsx +221 -82
- package/src/templates/web/ui-auth-payments-audio/template/src/components/shared/header.tsx +132 -40
- package/src/templates/web/ui-auth-payments-video/template/package.json +2 -2
- package/src/templates/web/ui-auth-payments-video/template/src/app/globals.css +146 -0
- package/src/templates/web/ui-auth-payments-video/template/src/app/page.tsx +259 -85
- package/src/templates/web/ui-auth-payments-video/template/src/components/shared/header.tsx +133 -41
- package/dist/index.js +0 -1173
- package/dist/index.js.map +0 -1
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
Card,
|
|
6
|
+
PageTransition,
|
|
7
|
+
MobileContainer,
|
|
8
|
+
MobileHero,
|
|
9
|
+
ResponsiveGrid,
|
|
10
|
+
NetworkAwareContent,
|
|
11
|
+
OfflineWrapper,
|
|
12
|
+
SwipeableCard,
|
|
13
|
+
PullToRefresh,
|
|
14
|
+
LazyImage,
|
|
15
|
+
useNetworkInfo,
|
|
16
|
+
useOfflineState
|
|
17
|
+
} from '@digilogiclabs/saas-factory-ui'
|
|
18
|
+
import { ArrowRight, Zap, Shield, Rocket, CheckCircle, LogOut, User, Wifi, WifiOff, CreditCard, Smartphone } from 'lucide-react'
|
|
5
19
|
import { useAuth } from '@digilogiclabs/saas-factory-auth'
|
|
6
20
|
import Link from 'next/link'
|
|
21
|
+
import { useState } from 'react'
|
|
7
22
|
|
|
8
23
|
export default function Home() {
|
|
9
24
|
const { user, signOut, loading } = useAuth()
|
|
25
|
+
const networkInfo = useNetworkInfo()
|
|
26
|
+
const isOnline = useOfflineState()
|
|
27
|
+
const [isRefreshing, setIsRefreshing] = useState(false)
|
|
10
28
|
|
|
11
29
|
const handleSignOut = async () => {
|
|
12
30
|
try {
|
|
@@ -16,13 +34,52 @@ export default function Home() {
|
|
|
16
34
|
}
|
|
17
35
|
}
|
|
18
36
|
|
|
37
|
+
const handleRefresh = async () => {
|
|
38
|
+
setIsRefreshing(true)
|
|
39
|
+
// Simulate refresh
|
|
40
|
+
await new Promise(resolve => setTimeout(resolve, 1500))
|
|
41
|
+
setIsRefreshing(false)
|
|
42
|
+
}
|
|
43
|
+
|
|
19
44
|
return (
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
45
|
+
<PageTransition type="fade" duration={300}>
|
|
46
|
+
<OfflineWrapper
|
|
47
|
+
cacheStrategy="stale-while-revalidate"
|
|
48
|
+
showOfflineIndicator={true}
|
|
49
|
+
backgroundSync={true}
|
|
50
|
+
>
|
|
51
|
+
<PullToRefresh
|
|
52
|
+
onRefresh={handleRefresh}
|
|
53
|
+
threshold={80}
|
|
54
|
+
loadingIndicator="spinner"
|
|
55
|
+
hapticOnTrigger={true}
|
|
56
|
+
networkAware={true}
|
|
57
|
+
>
|
|
58
|
+
<main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
|
|
59
|
+
<MobileContainer className="py-16">
|
|
60
|
+
{/* Network & Auth Status Bar */}
|
|
61
|
+
<div className="flex flex-col sm:flex-row justify-between items-center mb-8 gap-4">
|
|
62
|
+
<div className="flex items-center gap-2 text-sm">
|
|
63
|
+
{isOnline ? (
|
|
64
|
+
<div className="flex items-center gap-2 text-green-600">
|
|
65
|
+
<Wifi className="w-4 h-4" />
|
|
66
|
+
<span>Online</span>
|
|
67
|
+
{networkInfo?.effectiveType && (
|
|
68
|
+
<span className="bg-green-100 text-green-800 px-2 py-1 rounded text-xs">
|
|
69
|
+
{networkInfo.effectiveType.toUpperCase()}
|
|
70
|
+
</span>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
) : (
|
|
74
|
+
<div className="flex items-center gap-2 text-red-600">
|
|
75
|
+
<WifiOff className="w-4 h-4" />
|
|
76
|
+
<span>Offline Mode</span>
|
|
77
|
+
</div>
|
|
78
|
+
)}
|
|
79
|
+
</div>
|
|
80
|
+
|
|
24
81
|
{loading ? (
|
|
25
|
-
<div className="text-sm text-gray-600">Loading...</div>
|
|
82
|
+
<div className="text-sm text-gray-600">Loading auth...</div>
|
|
26
83
|
) : user ? (
|
|
27
84
|
<div className="flex items-center gap-4">
|
|
28
85
|
<div className="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-300">
|
|
@@ -47,75 +104,187 @@ export default function Home() {
|
|
|
47
104
|
</div>
|
|
48
105
|
|
|
49
106
|
{/* Hero Section */}
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
107
|
+
<MobileHero
|
|
108
|
+
badge={{
|
|
109
|
+
text: "UI Package v0.13.0 + Auth v1.0.0 + Payments - Mobile-First Ready",
|
|
110
|
+
variant: "secondary",
|
|
111
|
+
icon: CheckCircle
|
|
112
|
+
}}
|
|
113
|
+
title={{
|
|
114
|
+
text: "Welcome to {{titleCaseName}}",
|
|
115
|
+
highlight: "{{titleCaseName}}",
|
|
116
|
+
size: "xl"
|
|
117
|
+
}}
|
|
118
|
+
description="{{description}}. This mobile-optimized template uses SaaS Factory UI package v0.13.0 with cross-device authentication v1.0.0 and touch-friendly payments integration."
|
|
119
|
+
actions={[
|
|
120
|
+
{
|
|
121
|
+
label: "View Pricing",
|
|
122
|
+
href: "/checkout",
|
|
123
|
+
icon: CreditCard,
|
|
124
|
+
variant: "default",
|
|
125
|
+
size: "lg"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: "Learn More",
|
|
129
|
+
variant: "outline",
|
|
130
|
+
size: "lg"
|
|
131
|
+
}
|
|
132
|
+
]}
|
|
133
|
+
className="text-center mb-16"
|
|
134
|
+
/>
|
|
74
135
|
|
|
75
136
|
{/* Component Showcase */}
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
137
|
+
<NetworkAwareContent
|
|
138
|
+
showOnSlow={
|
|
139
|
+
<ResponsiveGrid columns={{ base: 1, md: 2 }} gap="lg" className="mb-16">
|
|
140
|
+
<SwipeableCard
|
|
141
|
+
rightActions={[
|
|
142
|
+
{
|
|
143
|
+
id: 'explore',
|
|
144
|
+
label: 'Explore',
|
|
145
|
+
onAction: () => console.log('Exploring mobile features'),
|
|
146
|
+
color: 'blue'
|
|
147
|
+
}
|
|
148
|
+
]}
|
|
149
|
+
threshold={60}
|
|
150
|
+
hapticFeedback={true}
|
|
151
|
+
showActionLabels={true}
|
|
152
|
+
>
|
|
153
|
+
<Card className="text-center p-6">
|
|
154
|
+
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
155
|
+
<Smartphone className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
156
|
+
</div>
|
|
157
|
+
<h3 className="text-lg font-semibold mb-2">Mobile-First UI</h3>
|
|
158
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
159
|
+
Touch-optimized components from @digilogiclabs/saas-factory-ui v0.13.0
|
|
160
|
+
</p>
|
|
161
|
+
</Card>
|
|
162
|
+
</SwipeableCard>
|
|
163
|
+
|
|
164
|
+
<SwipeableCard
|
|
165
|
+
rightActions={[
|
|
166
|
+
{
|
|
167
|
+
id: 'payments',
|
|
168
|
+
label: 'Try Payments',
|
|
169
|
+
onAction: () => window.location.href = '/checkout',
|
|
170
|
+
color: 'green'
|
|
171
|
+
}
|
|
172
|
+
]}
|
|
173
|
+
threshold={60}
|
|
174
|
+
hapticFeedback={true}
|
|
175
|
+
showActionLabels={true}
|
|
176
|
+
>
|
|
177
|
+
<Card className="text-center p-6">
|
|
178
|
+
<div className="mx-auto w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mb-4">
|
|
179
|
+
<CreditCard className="h-6 w-6 text-orange-600 dark:text-orange-400" />
|
|
180
|
+
</div>
|
|
181
|
+
<h3 className="text-lg font-semibold mb-2">Touch Payments</h3>
|
|
182
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
183
|
+
Mobile-optimized payment flows with swipe gestures
|
|
184
|
+
</p>
|
|
185
|
+
</Card>
|
|
186
|
+
</SwipeableCard>
|
|
187
|
+
</ResponsiveGrid>
|
|
188
|
+
}
|
|
189
|
+
>
|
|
190
|
+
<ResponsiveGrid columns={{ base: 1, sm: 2, md: 4 }} gap="lg" className="mb-16">
|
|
191
|
+
<SwipeableCard
|
|
192
|
+
rightActions={[
|
|
193
|
+
{
|
|
194
|
+
id: 'demo-ui',
|
|
195
|
+
label: 'Try Demo',
|
|
196
|
+
onAction: () => console.log('Demo UI components'),
|
|
197
|
+
color: 'blue'
|
|
198
|
+
}
|
|
199
|
+
]}
|
|
200
|
+
threshold={60}
|
|
201
|
+
hapticFeedback={true}
|
|
202
|
+
showActionLabels={true}
|
|
203
|
+
>
|
|
204
|
+
<Card className="text-center p-6">
|
|
205
|
+
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
206
|
+
<Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
207
|
+
</div>
|
|
208
|
+
<h3 className="text-lg font-semibold mb-2">Mobile UI Components</h3>
|
|
209
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
210
|
+
Touch-optimized buttons, cards, and gestures from @digilogiclabs/saas-factory-ui v0.13.0
|
|
211
|
+
</p>
|
|
212
|
+
</Card>
|
|
213
|
+
</SwipeableCard>
|
|
86
214
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
215
|
+
<SwipeableCard
|
|
216
|
+
rightActions={[
|
|
217
|
+
{
|
|
218
|
+
id: 'auth-demo',
|
|
219
|
+
label: 'Auth Demo',
|
|
220
|
+
onAction: () => window.location.href = '/login',
|
|
221
|
+
color: 'green'
|
|
222
|
+
}
|
|
223
|
+
]}
|
|
224
|
+
threshold={60}
|
|
225
|
+
hapticFeedback={true}
|
|
226
|
+
showActionLabels={true}
|
|
227
|
+
>
|
|
228
|
+
<Card className="text-center p-6">
|
|
229
|
+
<div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
|
|
230
|
+
<Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
|
|
231
|
+
</div>
|
|
232
|
+
<h3 className="text-lg font-semibold mb-2">Cross-Device Auth</h3>
|
|
233
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
234
|
+
Secure authentication across all devices with @digilogiclabs/saas-factory-auth v1.0.0
|
|
235
|
+
</p>
|
|
236
|
+
</Card>
|
|
237
|
+
</SwipeableCard>
|
|
96
238
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
239
|
+
<SwipeableCard
|
|
240
|
+
rightActions={[
|
|
241
|
+
{
|
|
242
|
+
id: 'performance',
|
|
243
|
+
label: 'See Performance',
|
|
244
|
+
onAction: () => console.log('Performance demo'),
|
|
245
|
+
color: 'purple'
|
|
246
|
+
}
|
|
247
|
+
]}
|
|
248
|
+
threshold={60}
|
|
249
|
+
hapticFeedback={true}
|
|
250
|
+
showActionLabels={true}
|
|
251
|
+
>
|
|
252
|
+
<Card className="text-center p-6">
|
|
253
|
+
<div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
|
|
254
|
+
<Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
255
|
+
</div>
|
|
256
|
+
<h3 className="text-lg font-semibold mb-2">Performance First</h3>
|
|
257
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
258
|
+
Network-aware components with offline support and lazy loading
|
|
259
|
+
</p>
|
|
260
|
+
</Card>
|
|
261
|
+
</SwipeableCard>
|
|
106
262
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
263
|
+
<SwipeableCard
|
|
264
|
+
rightActions={[
|
|
265
|
+
{
|
|
266
|
+
id: 'checkout',
|
|
267
|
+
label: 'View Checkout',
|
|
268
|
+
onAction: () => window.location.href = '/checkout',
|
|
269
|
+
color: 'orange'
|
|
270
|
+
}
|
|
271
|
+
]}
|
|
272
|
+
threshold={60}
|
|
273
|
+
hapticFeedback={true}
|
|
274
|
+
showActionLabels={true}
|
|
275
|
+
>
|
|
276
|
+
<Card className="text-center p-6">
|
|
277
|
+
<div className="mx-auto w-12 h-12 bg-orange-100 dark:bg-orange-900 rounded-lg flex items-center justify-center mb-4">
|
|
278
|
+
<CreditCard className="h-6 w-6 text-orange-600 dark:text-orange-400" />
|
|
279
|
+
</div>
|
|
280
|
+
<h3 className="text-lg font-semibold mb-2">Mobile Payments</h3>
|
|
281
|
+
<p className="text-sm text-gray-600 dark:text-gray-300">
|
|
282
|
+
Touch-optimized payment processing with @digilogiclabs/saas-factory-payments v1.0.0
|
|
283
|
+
</p>
|
|
284
|
+
</Card>
|
|
285
|
+
</SwipeableCard>
|
|
286
|
+
</ResponsiveGrid>
|
|
287
|
+
</NetworkAwareContent>
|
|
119
288
|
|
|
120
289
|
{/* Button Variants Showcase */}
|
|
121
290
|
<Card className="max-w-4xl mx-auto p-8">
|
|
@@ -133,11 +302,14 @@ export default function Home() {
|
|
|
133
302
|
</div>
|
|
134
303
|
<div className="text-center">
|
|
135
304
|
<p className="text-sm text-gray-500">
|
|
136
|
-
All components from @digilogiclabs/saas-factory-ui v0.
|
|
305
|
+
All mobile-optimized components from @digilogiclabs/saas-factory-ui v0.13.0 + auth v1.0.0 + payments v1.0.0
|
|
137
306
|
</p>
|
|
138
307
|
</div>
|
|
139
308
|
</Card>
|
|
140
|
-
|
|
141
|
-
|
|
309
|
+
</MobileContainer>
|
|
310
|
+
</main>
|
|
311
|
+
</PullToRefresh>
|
|
312
|
+
</OfflineWrapper>
|
|
313
|
+
</PageTransition>
|
|
142
314
|
)
|
|
143
315
|
}
|
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Link from 'next/link';
|
|
5
|
-
import { LogOut, CreditCard } from 'lucide-react';
|
|
5
|
+
import { LogOut, CreditCard, User, Settings, Home } from 'lucide-react';
|
|
6
6
|
import { useAuth } from '@digilogiclabs/saas-factory-auth';
|
|
7
|
+
import {
|
|
8
|
+
ResponsiveHeader,
|
|
9
|
+
MobileNavigation,
|
|
10
|
+
HamburgerIcon,
|
|
11
|
+
useNetworkInfo,
|
|
12
|
+
useOfflineState
|
|
13
|
+
} from '@digilogiclabs/saas-factory-ui';
|
|
7
14
|
import { ThemeToggle } from '../ui/theme-toggle';
|
|
8
15
|
|
|
9
16
|
export function Header() {
|
|
10
17
|
const { user, signOut } = useAuth();
|
|
18
|
+
const networkInfo = useNetworkInfo();
|
|
19
|
+
const isOnline = useOfflineState();
|
|
11
20
|
|
|
12
21
|
const handleSignOut = async () => {
|
|
13
22
|
try {
|
|
@@ -17,46 +26,103 @@ export function Header() {
|
|
|
17
26
|
}
|
|
18
27
|
};
|
|
19
28
|
|
|
29
|
+
const navigationItems = [
|
|
30
|
+
{
|
|
31
|
+
label: 'Home',
|
|
32
|
+
href: '/',
|
|
33
|
+
icon: Home,
|
|
34
|
+
protected: false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: 'Dashboard',
|
|
38
|
+
href: '/dashboard',
|
|
39
|
+
icon: User,
|
|
40
|
+
protected: true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: 'Billing',
|
|
44
|
+
href: '/billing',
|
|
45
|
+
icon: CreditCard,
|
|
46
|
+
protected: true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'Checkout',
|
|
50
|
+
href: '/checkout',
|
|
51
|
+
icon: CreditCard,
|
|
52
|
+
protected: false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: 'Settings',
|
|
56
|
+
href: '/settings',
|
|
57
|
+
icon: Settings,
|
|
58
|
+
protected: true
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const authActions = user ? [
|
|
63
|
+
{
|
|
64
|
+
label: 'Sign Out',
|
|
65
|
+
icon: LogOut,
|
|
66
|
+
onClick: handleSignOut,
|
|
67
|
+
variant: 'ghost' as const
|
|
68
|
+
}
|
|
69
|
+
] : [
|
|
70
|
+
{
|
|
71
|
+
label: 'Login',
|
|
72
|
+
href: '/login',
|
|
73
|
+
variant: 'ghost' as const
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'Sign Up',
|
|
77
|
+
href: '/signup',
|
|
78
|
+
variant: 'default' as const
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
|
|
20
82
|
return (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
83
|
+
<>
|
|
84
|
+
{/* Network Status Banner */}
|
|
85
|
+
{!isOnline && (
|
|
86
|
+
<div className="bg-yellow-500 text-white text-center py-2 text-sm animate-pulse">
|
|
87
|
+
<span>⚠️ You're offline - Some features may be limited</span>
|
|
88
|
+
</div>
|
|
89
|
+
)}
|
|
90
|
+
|
|
91
|
+
{/* Connection Quality Banner */}
|
|
92
|
+
{isOnline && networkInfo?.effectiveType === '2g' && (
|
|
93
|
+
<div className="bg-orange-500 text-white text-center py-2 text-sm">
|
|
94
|
+
<div className="animate-marquee whitespace-nowrap">
|
|
95
|
+
🐌 Slow connection detected - Optimized experience enabled • Reduced data usage • Cached content prioritized
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
)}
|
|
99
|
+
|
|
100
|
+
<ResponsiveHeader
|
|
101
|
+
logo={{
|
|
102
|
+
text: '{{titleCaseName}}',
|
|
103
|
+
href: '/',
|
|
104
|
+
className: 'text-2xl font-bold'
|
|
105
|
+
}}
|
|
106
|
+
navigationItems={navigationItems}
|
|
107
|
+
actions={authActions}
|
|
108
|
+
showThemeToggle={true}
|
|
109
|
+
user={user}
|
|
110
|
+
mobileBreakpoint="md"
|
|
111
|
+
className="bg-white dark:bg-gray-800 shadow-md"
|
|
112
|
+
hamburgerIcon={
|
|
113
|
+
<HamburgerIcon
|
|
114
|
+
className="w-6 h-6 text-gray-600 dark:text-gray-300"
|
|
115
|
+
animated={true}
|
|
116
|
+
hapticFeedback={true}
|
|
117
|
+
/>
|
|
118
|
+
}
|
|
119
|
+
networkStatus={{
|
|
120
|
+
isOnline,
|
|
121
|
+
connectionType: networkInfo?.effectiveType,
|
|
122
|
+
showIndicator: true
|
|
123
|
+
}}
|
|
124
|
+
/>
|
|
125
|
+
</>
|
|
60
126
|
);
|
|
61
127
|
}
|
|
62
128
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "{{packageName}}",
|
|
3
3
|
"version": "0.1.0",
|
|
4
|
-
"description": "{{description}} - Audio Player App (with UI Package v0.
|
|
4
|
+
"description": "{{description}} - Audio Player App (with UI Package v0.13.0 + Auth v1.0.0 + Payments)",
|
|
5
5
|
"private": true,
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "next dev",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"next": "^15.0.0",
|
|
18
18
|
"react": "^19.0.0",
|
|
19
19
|
"react-dom": "^19.0.0",
|
|
20
|
-
"@digilogiclabs/saas-factory-ui": "^0.
|
|
20
|
+
"@digilogiclabs/saas-factory-ui": "^0.13.0",
|
|
21
21
|
"@digilogiclabs/saas-factory-auth": "^1.0.0",
|
|
22
22
|
"@digilogiclabs/saas-factory-payments": "^1.0.0",
|
|
23
23
|
"stripe": "^14.0.0",
|