88 StatusBar ,
99 ActivityIndicator ,
1010 RefreshControl ,
11- Image ,
1211 Dimensions ,
1312} from 'react-native' ;
1413import { fetchApps , AppModel } from './src/config/supabase' ;
@@ -57,14 +56,23 @@ function App(): React.JSX.Element {
5756 } ;
5857
5958 const renderHeader = ( ) => (
60- < View style = { styles . headerContainer } >
61- < View style = { styles . headerTextContainer } >
62- < Text style = { styles . greeting } > Welcome back,</ Text >
63- < Text style = { styles . title } > Zeeshan Hub</ Text >
59+ < View style = { styles . header } >
60+ { /* Top bar */ }
61+ < View style = { styles . topBar } >
62+ < View >
63+ < Text style = { styles . greeting } > Welcome back 👋</ Text >
64+ < Text style = { styles . title } > Zeeshan Hub</ Text >
65+ </ View >
66+ < View style = { styles . avatar } >
67+ < Text style = { styles . avatarLetter } > Z</ Text >
68+ </ View >
6469 </ View >
65- < View style = { styles . profileAvatarContainer } >
66- < View style = { styles . profileAvatar } >
67- < Text style = { styles . avatarText } > Z</ Text >
70+
71+ { /* Section title */ }
72+ < View style = { styles . sectionRow } >
73+ < Text style = { styles . sectionTitle } > Your Apps</ Text >
74+ < View style = { styles . countBadge } >
75+ < Text style = { styles . countText } > { apps . length } </ Text >
6876 </ View >
6977 </ View >
7078 </ View >
@@ -74,14 +82,17 @@ function App(): React.JSX.Element {
7482 < View style = { styles . container } >
7583 < StatusBar barStyle = "light-content" backgroundColor = "transparent" translucent />
7684
77- { /* Modern Background Orbs */ }
85+ { /* Background orbs */ }
7886 < View style = { styles . orb1 } />
7987 < View style = { styles . orb2 } />
88+ < View style = { styles . orb3 } />
8089
8190 { loading && ! refreshing ? (
82- < View style = { styles . loadingContainer } >
83- < ActivityIndicator size = "large" color = "#00B4D8" style = { styles . spinner } />
84- < Text style = { styles . loadingText } > Fetching available apps...</ Text >
91+ < View style = { styles . loadingWrap } >
92+ < View style = { styles . loadingRing } >
93+ < ActivityIndicator size = "large" color = "#A78BFA" />
94+ </ View >
95+ < Text style = { styles . loadingText } > Loading apps…</ Text >
8596 </ View >
8697 ) : (
8798 < FlatList
@@ -95,18 +106,18 @@ function App(): React.JSX.Element {
95106 < RefreshControl
96107 refreshing = { refreshing }
97108 onRefresh = { onRefresh }
98- tintColor = "#00B4D8 "
99- colors = { [ '#00B4D8 ' ] }
100- progressBackgroundColor = "#1E293B "
109+ tintColor = "#A78BFA "
110+ colors = { [ '#7C3AED ' ] }
111+ progressBackgroundColor = "#161B2E "
101112 />
102113 }
103114 ListEmptyComponent = {
104- < View style = { styles . emptyContainer } >
105- < View style = { styles . emptyIconContainer } >
106- < Icon name = "package-variant" size = { 80 } color = "rgba(255, 255, 255 , 0.2 )" />
115+ < View style = { styles . emptyWrap } >
116+ < View style = { styles . emptyIcon } >
117+ < Icon name = "package-variant" size = { 56 } color = "rgba(167, 139, 250 , 0.3 )" />
107118 </ View >
108- < Text style = { styles . emptyTitle } > It's quiet here </ Text >
109- < Text style = { styles . emptyText } > Upload your first app via the Admin Portal to see it here.</ Text >
119+ < Text style = { styles . emptyTitle } > No apps yet </ Text >
120+ < Text style = { styles . emptyDesc } > Upload your first app via the{ '\n' } Admin Portal to see it here.</ Text >
110121 </ View >
111122 }
112123 />
@@ -124,120 +135,160 @@ function App(): React.JSX.Element {
124135const styles = StyleSheet . create ( {
125136 container : {
126137 flex : 1 ,
127- backgroundColor : '#050814 ' ,
138+ backgroundColor : '#0A0E1A ' ,
128139 } ,
140+ // Background decorative orbs
129141 orb1 : {
130142 position : 'absolute' ,
131- top : - height * 0.1 ,
132- left : - width * 0.2 ,
143+ top : - height * 0.08 ,
144+ left : - width * 0.25 ,
145+ width : width * 0.7 ,
146+ height : width * 0.7 ,
147+ borderRadius : width * 0.35 ,
148+ backgroundColor : 'rgba(124, 58, 237, 0.08)' ,
149+ } ,
150+ orb2 : {
151+ position : 'absolute' ,
152+ top : height * 0.35 ,
153+ right : - width * 0.3 ,
133154 width : width * 0.8 ,
134155 height : width * 0.8 ,
135156 borderRadius : width * 0.4 ,
136- backgroundColor : 'rgba(0, 180, 216, 0.12)' ,
137- // React Native does not support blurRadius on View natively perfectly on all Androids without specific properties,
138- // so we rely on low opacity and large size for the gradient effect.
157+ backgroundColor : 'rgba(56, 189, 248, 0.05)' ,
139158 } ,
140- orb2 : {
159+ orb3 : {
141160 position : 'absolute' ,
142- top : height * 0.4 ,
143- right : - width * 0.3 ,
144- width : width * 0.9 ,
145- height : width * 0.9 ,
146- borderRadius : width * 0.45 ,
147- backgroundColor : 'rgba(88, 30, 255 , 0.08 )' ,
161+ bottom : - height * 0.1 ,
162+ left : width * 0.1 ,
163+ width : width * 0.5 ,
164+ height : width * 0.5 ,
165+ borderRadius : width * 0.25 ,
166+ backgroundColor : 'rgba(167, 139, 250 , 0.04 )' ,
148167 } ,
149- loadingContainer : {
168+ // Loading
169+ loadingWrap : {
150170 flex : 1 ,
151171 justifyContent : 'center' ,
152172 alignItems : 'center' ,
153173 } ,
154- spinner : {
155- transform : [ { scale : 1.2 } ] ,
156- marginBottom : 20 ,
174+ loadingRing : {
175+ width : 80 ,
176+ height : 80 ,
177+ borderRadius : 40 ,
178+ backgroundColor : 'rgba(124, 58, 237, 0.08)' ,
179+ justifyContent : 'center' ,
180+ alignItems : 'center' ,
181+ marginBottom : 16 ,
182+ borderWidth : 1 ,
183+ borderColor : 'rgba(167, 139, 250, 0.15)' ,
157184 } ,
158185 loadingText : {
159- color : '#00B4D8 ' ,
160- fontSize : 16 ,
161- fontWeight : '700 ' ,
162- letterSpacing : 0.5 ,
186+ color : '#A78BFA ' ,
187+ fontSize : 15 ,
188+ fontWeight : '600 ' ,
189+ letterSpacing : 0.3 ,
163190 } ,
191+ // List
164192 listContent : {
165- paddingTop : StatusBar . currentHeight ? StatusBar . currentHeight + 20 : 60 ,
193+ paddingTop : StatusBar . currentHeight ? StatusBar . currentHeight + 16 : 56 ,
166194 paddingBottom : 40 ,
167195 } ,
168- headerContainer : {
196+ // Header
197+ header : {
198+ paddingHorizontal : 22 ,
199+ marginBottom : 8 ,
200+ } ,
201+ topBar : {
169202 flexDirection : 'row' ,
170203 justifyContent : 'space-between' ,
171204 alignItems : 'center' ,
172- paddingHorizontal : 24 ,
173- marginBottom : 20 ,
174- } ,
175- headerTextContainer : {
176- flex : 1 ,
205+ marginBottom : 28 ,
177206 } ,
178207 greeting : {
179- fontSize : 16 ,
180- color : '#94A3B8 ' ,
181- fontWeight : '600 ' ,
208+ fontSize : 14 ,
209+ color : '#64748B ' ,
210+ fontWeight : '500 ' ,
182211 marginBottom : 4 ,
183- letterSpacing : 0.5 ,
212+ letterSpacing : 0.3 ,
184213 } ,
185214 title : {
186- fontSize : 34 ,
187- fontWeight : '900 ' ,
215+ fontSize : 30 ,
216+ fontWeight : '800 ' ,
188217 color : '#F8FAFC' ,
189- letterSpacing : 0.5 ,
218+ letterSpacing : 0.3 ,
190219 } ,
191- profileAvatarContainer : {
192- shadowColor : '#00B4D8' ,
193- shadowOffset : { width : 0 , height : 8 } ,
220+ avatar : {
221+ width : 46 ,
222+ height : 46 ,
223+ borderRadius : 15 ,
224+ backgroundColor : '#7C3AED' ,
225+ justifyContent : 'center' ,
226+ alignItems : 'center' ,
227+ shadowColor : '#7C3AED' ,
228+ shadowOffset : { width : 0 , height : 6 } ,
194229 shadowOpacity : 0.4 ,
195- shadowRadius : 16 ,
230+ shadowRadius : 12 ,
196231 elevation : 8 ,
197232 } ,
198- profileAvatar : {
199- width : 50 ,
200- height : 50 ,
201- borderRadius : 25 ,
202- backgroundColor : '#00B4D8' ,
203- justifyContent : 'center' ,
233+ avatarLetter : {
234+ color : '#FFFFFF' ,
235+ fontSize : 20 ,
236+ fontWeight : '800' ,
237+ } ,
238+ sectionRow : {
239+ flexDirection : 'row' ,
204240 alignItems : 'center' ,
205- borderWidth : 2 ,
206- borderColor : '#050814' ,
241+ gap : 8 ,
242+ marginBottom : 4 ,
207243 } ,
208- avatarText : {
209- color : '#050814' ,
210- fontSize : 24 ,
211- fontWeight : '900' ,
244+ sectionTitle : {
245+ fontSize : 18 ,
246+ fontWeight : '700' ,
247+ color : '#CBD5E1' ,
248+ letterSpacing : 0.3 ,
212249 } ,
213- emptyContainer : {
250+ countBadge : {
251+ backgroundColor : 'rgba(124, 58, 237, 0.15)' ,
252+ paddingHorizontal : 9 ,
253+ paddingVertical : 3 ,
254+ borderRadius : 8 ,
255+ borderWidth : 1 ,
256+ borderColor : 'rgba(124, 58, 237, 0.25)' ,
257+ } ,
258+ countText : {
259+ fontSize : 12 ,
260+ fontWeight : '800' ,
261+ color : '#A78BFA' ,
262+ } ,
263+ // Empty state
264+ emptyWrap : {
214265 alignItems : 'center' ,
215266 justifyContent : 'center' ,
216- marginTop : height * 0.15 ,
267+ marginTop : height * 0.12 ,
217268 paddingHorizontal : 40 ,
218269 } ,
219- emptyIconContainer : {
220- width : 140 ,
221- height : 140 ,
222- borderRadius : 70 ,
223- backgroundColor : 'rgba(255, 255, 255 , 0.03 )' ,
270+ emptyIcon : {
271+ width : 100 ,
272+ height : 100 ,
273+ borderRadius : 30 ,
274+ backgroundColor : 'rgba(124, 58, 237 , 0.06 )' ,
224275 justifyContent : 'center' ,
225276 alignItems : 'center' ,
226- marginBottom : 24 ,
277+ marginBottom : 20 ,
227278 borderWidth : 1 ,
228- borderColor : 'rgba(255, 255, 255 , 0.05 )' ,
279+ borderColor : 'rgba(167, 139, 250 , 0.1 )' ,
229280 } ,
230281 emptyTitle : {
231- color : '#F8FAFC ' ,
232- fontSize : 22 ,
233- fontWeight : '800 ' ,
234- marginBottom : 12 ,
282+ color : '#F1F5F9 ' ,
283+ fontSize : 20 ,
284+ fontWeight : '700 ' ,
285+ marginBottom : 8 ,
235286 } ,
236- emptyText : {
237- color : '#94A3B8 ' ,
238- fontSize : 15 ,
287+ emptyDesc : {
288+ color : '#64748B ' ,
289+ fontSize : 14 ,
239290 textAlign : 'center' ,
240- lineHeight : 24 ,
291+ lineHeight : 22 ,
241292 } ,
242293} ) ;
243294
0 commit comments