mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Added icons logo
This commit is contained in:
parent
20cab5a949
commit
09964e4b16
30 changed files with 109 additions and 15 deletions
|
|
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue