mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:06:56 -04:00
Added rounting mechanism
This commit is contained in:
parent
9d6a177547
commit
746354b779
@ -7,6 +7,13 @@ class AlbumsCollectionPage extends HookConsumerWidget {
|
|||||||
const AlbumsCollectionPage({super.key});
|
const AlbumsCollectionPage({super.key});
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Container();
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('albums_collection_page_title'),
|
||||||
|
),
|
||||||
|
body: const Center(
|
||||||
|
child: Text('albums_collection_page_content'),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,13 @@ class LocalAlbumsCollectionPage extends HookConsumerWidget {
|
|||||||
const LocalAlbumsCollectionPage({super.key});
|
const LocalAlbumsCollectionPage({super.key});
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Container();
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('on_this_device'),
|
||||||
|
),
|
||||||
|
body: const Center(
|
||||||
|
child: Text('on_this_device_content'),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,13 @@ class PeopleCollectionPage extends HookConsumerWidget {
|
|||||||
const PeopleCollectionPage({super.key});
|
const PeopleCollectionPage({super.key});
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Container();
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('people'),
|
||||||
|
),
|
||||||
|
body: const Center(
|
||||||
|
child: Text('people'),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,13 @@ class PlacesCollectionPage extends HookConsumerWidget {
|
|||||||
const PlacesCollectionPage({super.key});
|
const PlacesCollectionPage({super.key});
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Container();
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: const Text('places'),
|
||||||
|
),
|
||||||
|
body: const Center(
|
||||||
|
child: Text('places'),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,9 @@ class PeopleCollectionCard extends ConsumerWidget {
|
|||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
final people = ref.watch(getAllPeopleProvider);
|
final people = ref.watch(getAllPeopleProvider);
|
||||||
final size = MediaQuery.of(context).size.width * 0.5 - 20;
|
final size = MediaQuery.of(context).size.width * 0.5 - 20;
|
||||||
return Column(
|
return GestureDetector(
|
||||||
|
onTap: () => context.pushRoute(const PeopleCollectionRoute()),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -122,6 +124,7 @@ class PeopleCollectionCard extends ConsumerWidget {
|
|||||||
child: Text('People', style: context.textTheme.labelLarge),
|
child: Text('People', style: context.textTheme.labelLarge),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -137,7 +140,11 @@ class AlbumsCollectionCard extends ConsumerWidget {
|
|||||||
? ref.watch(albumProvider).where((album) => album.isLocal)
|
? ref.watch(albumProvider).where((album) => album.isLocal)
|
||||||
: ref.watch(albumProvider).where((album) => album.isRemote);
|
: ref.watch(albumProvider).where((album) => album.isRemote);
|
||||||
final size = MediaQuery.of(context).size.width * 0.5 - 20;
|
final size = MediaQuery.of(context).size.width * 0.5 - 20;
|
||||||
return Column(
|
return GestureDetector(
|
||||||
|
onTap: () => context.pushRoute(isLocal
|
||||||
|
? const LocalAlbumsCollectionRoute()
|
||||||
|
: const AlbumsCollectionRoute()),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -169,6 +176,7 @@ class AlbumsCollectionCard extends ConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -178,7 +186,9 @@ class PlacesCollectionCard extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final size = MediaQuery.of(context).size.width * 0.5 - 20;
|
final size = MediaQuery.of(context).size.width * 0.5 - 20;
|
||||||
return Column(
|
return GestureDetector(
|
||||||
|
onTap: () => context.pushRoute(const PlacesCollectionRoute()),
|
||||||
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
@ -196,7 +206,8 @@ class PlacesCollectionCard extends StatelessWidget {
|
|||||||
-157.91959,
|
-157.91959,
|
||||||
),
|
),
|
||||||
showAttribution: false,
|
showAttribution: false,
|
||||||
themeMode: context.isDarkTheme ? ThemeMode.dark : ThemeMode.light,
|
themeMode:
|
||||||
|
context.isDarkTheme ? ThemeMode.dark : ThemeMode.light,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -205,6 +216,7 @@ class PlacesCollectionCard extends StatelessWidget {
|
|||||||
child: Text('Places', style: context.textTheme.labelLarge),
|
child: Text('Places', style: context.textTheme.labelLarge),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -240,21 +240,25 @@ class AppRouter extends RootStackRouter {
|
|||||||
page: HeaderSettingsRoute.page,
|
page: HeaderSettingsRoute.page,
|
||||||
guards: [_duplicateGuard],
|
guards: [_duplicateGuard],
|
||||||
),
|
),
|
||||||
AutoRoute(
|
CustomRoute(
|
||||||
page: PeopleCollectionRoute.page,
|
page: PeopleCollectionRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
|
transitionsBuilder: TransitionsBuilders.slideLeft,
|
||||||
),
|
),
|
||||||
AutoRoute(
|
CustomRoute(
|
||||||
page: AlbumsCollectionRoute.page,
|
page: AlbumsCollectionRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
|
transitionsBuilder: TransitionsBuilders.slideLeft,
|
||||||
),
|
),
|
||||||
AutoRoute(
|
CustomRoute(
|
||||||
page: LocalAlbumsCollectionRoute.page,
|
page: LocalAlbumsCollectionRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
|
transitionsBuilder: TransitionsBuilders.slideLeft,
|
||||||
),
|
),
|
||||||
AutoRoute(
|
CustomRoute(
|
||||||
page: PlacesCollectionRoute.page,
|
page: PlacesCollectionRoute.page,
|
||||||
guards: [_authGuard, _duplicateGuard],
|
guards: [_authGuard, _duplicateGuard],
|
||||||
|
transitionsBuilder: TransitionsBuilders.slideLeft,
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user