@@ -26,49 +26,112 @@ class HomeScreen extends ConsumerWidget {
2626 Widget build (BuildContext context, WidgetRef ref) {
2727 final repos = ref.watch (reposProvider).repos;
2828 final sessions = ref.watch (sessionsProvider);
29+ final cs = Theme .of (context).colorScheme;
30+ final topInset = MediaQuery .of (context).padding.top;
2931
3032 return Scaffold (
31- appBar: AppBar (
32- title: const Text ('makit' ),
33- actions: [
34- const ConnectionChip (),
35- IconButton (
36- icon: const Icon (Icons .create_new_folder_outlined),
37- tooltip: 'Add repo' ,
38- onPressed: () => showFolderBrowser (context),
33+ extendBodyBehindAppBar: true ,
34+ extendBody: true ,
35+ body: Stack (
36+ children: [
37+ RefreshIndicator (
38+ onRefresh: () =>
39+ ref.read (storeControllerProvider.notifier).refreshRepos (),
40+ child: repos.isEmpty
41+ ? _EmptyState (
42+ onAdd: () => showFolderBrowser (context),
43+ topPadding: topInset + 60 ,
44+ )
45+ : ListView .builder (
46+ padding: EdgeInsets .fromLTRB (12 , topInset + 60 , 12 , 24 ),
47+ itemCount: repos.length,
48+ itemBuilder: (context, i) => _RepoCard (
49+ repo: repos[i],
50+ sessions: sessions.forProject (repos[i].id),
51+ ),
52+ ),
3953 ),
40- IconButton (
41- icon: const Icon (Icons .settings_outlined),
42- onPressed: () => context.go ('/settings' ),
54+ Positioned (
55+ top: 0 ,
56+ left: 0 ,
57+ right: 0 ,
58+ child: IgnorePointer (
59+ child: Container (
60+ height: topInset + 96 ,
61+ decoration: BoxDecoration (
62+ gradient: LinearGradient (
63+ begin: Alignment .topCenter,
64+ end: Alignment .bottomCenter,
65+ colors: [
66+ cs.surface.withValues (alpha: 0.80 ),
67+ cs.surface.withValues (alpha: 0.70 ),
68+ cs.surface.withValues (alpha: 0 ),
69+ ],
70+ stops: const [0 , 0.5 , 1 ],
71+ ),
72+ ),
73+ ),
74+ ),
4375 ),
44- ],
45- ),
46- body: RefreshIndicator (
47- onRefresh: () =>
48- ref.read (storeControllerProvider.notifier).refreshRepos (),
49- child: repos.isEmpty
50- ? _EmptyState (onAdd: () => showFolderBrowser (context))
51- : ListView .builder (
52- padding: const EdgeInsets .fromLTRB (12 , 12 , 12 , 24 ),
53- itemCount: repos.length,
54- itemBuilder: (context, i) => _RepoCard (
55- repo: repos[i],
56- sessions: sessions.forProject (repos[i].id),
76+ Positioned (
77+ top: 0 ,
78+ left: 0 ,
79+ right: 0 ,
80+ child: SafeArea (
81+ bottom: false ,
82+ child: Padding (
83+ padding: const EdgeInsets .fromLTRB (12 , 8 , 12 , 0 ),
84+ child: Row (
85+ children: [
86+ Expanded (
87+ child: Text (
88+ 'makit' ,
89+ maxLines: 1 ,
90+ overflow: TextOverflow .ellipsis,
91+ style: Theme .of (context).textTheme.titleMedium
92+ ? .copyWith (
93+ fontWeight: FontWeight .w600,
94+ shadows: [
95+ Shadow (color: cs.surface, blurRadius: 6 ),
96+ Shadow (color: cs.surface, blurRadius: 12 ),
97+ ],
98+ ),
99+ ),
100+ ),
101+ GlassCircleButton (
102+ icon: Icons .create_new_folder_outlined,
103+ tooltip: 'Add repo' ,
104+ onTap: () => showFolderBrowser (context),
105+ ),
106+ const SizedBox (width: 6 ),
107+ GlassCircleButton (
108+ icon: Icons .settings_outlined,
109+ tooltip: 'Settings' ,
110+ onTap: () => context.go ('/settings' ),
111+ ),
112+ const SizedBox (width: 6 ),
113+ const ConnectionChip (circular: true ),
114+ ],
57115 ),
58116 ),
117+ ),
118+ ),
119+ ],
59120 ),
60121 );
61122 }
62123}
63124
64125class _EmptyState extends StatelessWidget {
65- const _EmptyState ({required this .onAdd});
126+ const _EmptyState ({required this .onAdd, required this .topPadding });
66127 final VoidCallback onAdd;
128+ final double topPadding;
67129
68130 @override
69131 Widget build (BuildContext context) {
70132 // Wrapped in a scroll view so RefreshIndicator still works when empty.
71133 return ListView (
134+ padding: EdgeInsets .only (top: topPadding),
72135 children: [
73136 SizedBox (height: MediaQuery .of (context).size.height * 0.18 ),
74137 Center (
0 commit comments