mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	Added icons logo
This commit is contained in:
		| @@ -1,6 +1,5 @@ | ||||
| import 'dart:async'; | ||||
|  | ||||
| import 'package:flutter/foundation.dart'; | ||||
| import 'package:flutter/material.dart'; | ||||
|  | ||||
| /// Build the Scroll Thumb and label using the current configuration | ||||
| @@ -166,7 +165,7 @@ class DraggableScrollbar extends StatefulWidget { | ||||
|     }) { | ||||
|       final scrollThumb = CustomPaint( | ||||
|         key: scrollThumbKey, | ||||
|         foregroundPainter: ArrowCustomPainter(Colors.grey), | ||||
|         foregroundPainter: ArrowCustomPainter(Colors.white), | ||||
|         child: Material( | ||||
|           elevation: 4.0, | ||||
|           child: Container( | ||||
| @@ -348,7 +347,7 @@ class _DraggableScrollbarState extends State<DraggableScrollbar> with TickerProv | ||||
|  | ||||
|   double get barMaxScrollExtent => context.size!.height - widget.heightScrollThumb; | ||||
|  | ||||
|   double get barMinScrollExtent => 0.0; | ||||
|   double get barMinScrollExtent => 0; | ||||
|  | ||||
|   double get viewMaxScrollExtent => widget.controller.position.maxScrollExtent; | ||||
|  | ||||
|   | ||||
| @@ -105,8 +105,8 @@ class ImmichSliverAppBar extends ConsumerWidget { | ||||
|           statusBarColor: Colors.indigo, | ||||
|  | ||||
|           // Status bar brightness (optional) | ||||
|           statusBarIconBrightness: Brightness.dark, // For Android (dark icons) | ||||
|           statusBarBrightness: Brightness.light, // For iOS (dark icons) | ||||
|           statusBarIconBrightness: Brightness.light, // For Android (dark icons) | ||||
|           statusBarBrightness: Brightness.dark, | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   | ||||
| @@ -5,7 +5,6 @@ import 'package:hive_flutter/hive_flutter.dart'; | ||||
| import 'package:immich_mobile/constants/hive_box.dart'; | ||||
| import 'package:immich_mobile/shared/models/immich_asset.model.dart'; | ||||
| import 'package:immich_mobile/routing/router.dart'; | ||||
| import 'package:transparent_image/transparent_image.dart'; | ||||
|  | ||||
| class ThumbnailImage extends StatelessWidget { | ||||
|   final ImmichAsset asset; | ||||
| @@ -17,7 +16,6 @@ class ThumbnailImage extends StatelessWidget { | ||||
|     var box = Hive.box(userInfoBox); | ||||
|     var thumbnailRequestUrl = | ||||
|         '${box.get(serverEndpointKey)}/asset/file?aid=${asset.deviceAssetId}&did=${asset.deviceId}&isThumb=true'; | ||||
|  | ||||
|     return GestureDetector( | ||||
|       onTap: () { | ||||
|         AutoRouter.of(context).push( | ||||
| @@ -44,7 +42,10 @@ class ThumbnailImage extends StatelessWidget { | ||||
|             scale: 0.2, | ||||
|             child: CircularProgressIndicator(value: downloadProgress.progress), | ||||
|           ), | ||||
|           errorWidget: (context, url, error) => const Icon(Icons.error), | ||||
|           errorWidget: (context, url, error) { | ||||
|             debugPrint("Error Loading Thumbnail Widget $error"); | ||||
|             return const Icon(Icons.error); | ||||
|           }, | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   | ||||
| @@ -84,6 +84,7 @@ class HomePage extends HookConsumerWidget { | ||||
|           int? currentMonth = DateTime.tryParse(dateTitle)?.month; | ||||
|           int? previousMonth = DateTime.tryParse(lastGroupDate)?.month; | ||||
|  | ||||
|           // Add Monthly Title Group if started at the beginning of the month | ||||
|           if ((currentMonth! - previousMonth!) != 0) { | ||||
|             var monthTitleText = DateFormat('MMMM, y').format(DateTime.parse(dateTitle)); | ||||
|  | ||||
| @@ -92,10 +93,12 @@ class HomePage extends HookConsumerWidget { | ||||
|             ); | ||||
|           } | ||||
|  | ||||
|           // Add Daily Title Group | ||||
|           imageGridGroup.add( | ||||
|             _buildDateGroupTitle(dateTitle), | ||||
|             DailyTitleText(dateTitle: dateTitle), | ||||
|           ); | ||||
|  | ||||
|           // Add Image Group | ||||
|           imageGridGroup.add( | ||||
|             ImageGrid(assetGroup: assetGroup), | ||||
|           ); | ||||
| @@ -121,8 +124,9 @@ class HomePage extends HookConsumerWidget { | ||||
|           //   return Text(scrollLabelText.value); | ||||
|           // }, | ||||
|           // labelConstraints: const BoxConstraints.tightFor(width: 200.0, height: 30.0), | ||||
|           backgroundColor: Theme.of(context).primaryColor, | ||||
|           controller: _scrollController, | ||||
|           heightScrollThumb: 40.0, | ||||
|           heightScrollThumb: 48.0, | ||||
|           child: CustomScrollView( | ||||
|             controller: _scrollController, | ||||
|             slivers: [ | ||||
| @@ -166,3 +170,41 @@ class MonthlyTitleText extends StatelessWidget { | ||||
|     ); | ||||
|   } | ||||
| } | ||||
|  | ||||
| class DailyTitleText extends StatelessWidget { | ||||
|   const DailyTitleText({ | ||||
|     Key? key, | ||||
|     required this.dateTitle, | ||||
|   }) : super(key: key); | ||||
|  | ||||
|   final String dateTitle; | ||||
|  | ||||
|   @override | ||||
|   Widget build(BuildContext context) { | ||||
|     var currentYear = DateTime.now().year; | ||||
|     var groupYear = DateTime.parse(dateTitle).year; | ||||
|     var formatDateTemplate = currentYear == groupYear ? 'E, MMM dd' : 'E, MMM dd, yyyy'; | ||||
|     var dateText = DateFormat(formatDateTemplate).format(DateTime.parse(dateTitle)); | ||||
|  | ||||
|     return SliverToBoxAdapter( | ||||
|       child: Padding( | ||||
|         padding: const EdgeInsets.only(top: 24.0, bottom: 24.0, left: 3.0), | ||||
|         child: Row( | ||||
|           children: [ | ||||
|             Padding( | ||||
|               padding: const EdgeInsets.only(left: 8.0, bottom: 5.0, top: 5.0), | ||||
|               child: Text( | ||||
|                 dateText, | ||||
|                 style: const TextStyle( | ||||
|                   fontSize: 14, | ||||
|                   fontWeight: FontWeight.bold, | ||||
|                   color: Colors.black87, | ||||
|                 ), | ||||
|               ), | ||||
|             ), | ||||
|           ], | ||||
|         ), | ||||
|       ), | ||||
|     ); | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -12,7 +12,7 @@ class LoginForm extends HookConsumerWidget { | ||||
|   Widget build(BuildContext context, WidgetRef ref) { | ||||
|     final usernameController = useTextEditingController(text: 'testuser@email.com'); | ||||
|     final passwordController = useTextEditingController(text: 'password'); | ||||
|     final serverEndpointController = useTextEditingController(text: 'http://192.168.1.103:3000'); | ||||
|     final serverEndpointController = useTextEditingController(text: 'http://192.168.1.216:3000'); | ||||
|  | ||||
|     return Center( | ||||
|       child: ConstrainedBox( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user