Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mobile): new mobile UI #12582

Merged
merged 65 commits into from
Oct 10, 2024
Merged
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
a1df387
add collection page
alextran1502 Sep 5, 2024
14a5e98
Added people collections
alextran1502 Sep 6, 2024
c886fca
Added share partner button
alextran1502 Sep 6, 2024
9d6a177
Added collection pages
alextran1502 Sep 6, 2024
746354b
Added rounting mechanism
alextran1502 Sep 6, 2024
27d5b13
Update on rounting
alextran1502 Sep 6, 2024
34ea42c
wip: album collesction page
alextran1502 Sep 6, 2024
30a3f82
wip: album collections page
alextran1502 Sep 6, 2024
424de03
wip: album collections page
alextran1502 Sep 6, 2024
31f2b94
better anchor menu
alextran1502 Sep 7, 2024
77bfa5d
search album
alextran1502 Sep 7, 2024
2320e7a
smooth transition
alextran1502 Sep 7, 2024
2dc73c2
quick filter for album
alextran1502 Sep 7, 2024
3417330
better album tile
alextran1502 Sep 7, 2024
9266197
wip
alextran1502 Sep 7, 2024
27d390a
wip
alextran1502 Sep 8, 2024
c26baea
album on collections page does not change
alextran1502 Sep 8, 2024
f73deae
Merge branch 'main' of github.com:immich-app/immich into mobile/colle…
alextran1502 Sep 8, 2024
bb50ccb
local albums
alextran1502 Sep 8, 2024
ad84a6e
Merge branch 'main' of github.com:immich-app/immich into mobile/colle…
alextran1502 Sep 9, 2024
0a9d8ac
swipe to go back from album view
alextran1502 Sep 9, 2024
c2e4d91
Merge branch 'main' of github.com:immich-app/immich into mobile/colle…
alextran1502 Sep 10, 2024
8475cfb
people collection page
alextran1502 Sep 10, 2024
701b2be
place collections
alextran1502 Sep 10, 2024
4d45e36
wip
alextran1502 Sep 11, 2024
bee7cd9
add albums to dedicated item menu
alextran1502 Sep 11, 2024
e69bcf3
add albums to dedicated item menu
alextran1502 Sep 11, 2024
4c9a7a7
wip
alextran1502 Sep 11, 2024
8e90913
merge main
alextran1502 Sep 30, 2024
3901792
fixed build
alextran1502 Sep 30, 2024
a14fadc
Merge branch 'main' into mobile/collections
alextran1502 Oct 2, 2024
bae02c3
Merge branch 'main' into mobile/collections
alextran1502 Oct 3, 2024
86e577a
Change back to Library and previous location
alextran1502 Oct 3, 2024
d3d71d6
provider
alextran1502 Oct 3, 2024
f8b28c0
smaller fontsize for bottom app bar
alextran1502 Oct 3, 2024
45fa65a
simplify album sync
alextran1502 Oct 4, 2024
b3d2cac
partners list and quick access item
alextran1502 Oct 4, 2024
707902b
simplify search page
alextran1502 Oct 4, 2024
8b1b275
recently added route
alextran1502 Oct 4, 2024
faeb6cd
WIP
alextran1502 Oct 4, 2024
e43dc88
UI WIP
alextran1502 Oct 4, 2024
2cd4283
wip
alextran1502 Oct 5, 2024
f4952fe
merge main
alextran1502 Oct 5, 2024
7011450
improve minor styling
alextran1502 Oct 5, 2024
0986da9
improved search box ui
alextran1502 Oct 5, 2024
f47618c
Merge branch 'main' of github.com:immich-app/immich into mobile/colle…
alextran1502 Oct 7, 2024
568a09b
better search
alextran1502 Oct 7, 2024
fa4606d
pull to refresh
alextran1502 Oct 7, 2024
2d86c30
refactor with repository pattern
alextran1502 Oct 7, 2024
3afcc13
refactor
alextran1502 Oct 7, 2024
8fc58c1
put back logo with name
alextran1502 Oct 7, 2024
64c7cad
refactor: remove reference to shared_album provider
alextran1502 Oct 7, 2024
24aadd4
refactor: add and remove users from album
alextran1502 Oct 8, 2024
5e8616b
refactor: activity, title change action
alextran1502 Oct 8, 2024
2d98d80
pr feedback
alextran1502 Oct 8, 2024
f15efd8
pr feedback
alextran1502 Oct 8, 2024
b01e1a7
improve ui
alextran1502 Oct 8, 2024
e162a4e
feedback and update test
alextran1502 Oct 9, 2024
813ee4f
dropdown menu feedback
alextran1502 Oct 9, 2024
b014cc5
clean up
alextran1502 Oct 9, 2024
cd0e757
add refresh remote album status
alextran1502 Oct 9, 2024
c59b697
search bar alighment fix
alextran1502 Oct 9, 2024
4c94ddc
use custom hashset for album
alextran1502 Oct 10, 2024
fbfc9c2
fix test
alextran1502 Oct 10, 2024
d70ac13
linting
alextran1502 Oct 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip: album collections page
  • Loading branch information
alextran1502 committed Sep 6, 2024
commit 30a3f827a24de8030208c3aa8cb1806c963de177
119 changes: 32 additions & 87 deletions mobile/lib/pages/collections/albums/albums_collection.page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AlbumsCollectionPage extends HookConsumerWidget {
final remote = albums.where((a) => a.isRemote).toList();
final sorted = albumSortOption.sortFn(remote, albumSortIsReverse);
final local = albums.where((a) => a.isLocal).toList();
final isGrid = useState(false);

useEffect(
() {
Expand All @@ -29,98 +30,42 @@ class AlbumsCollectionPage extends HookConsumerWidget {
[],
);

toggleViewMode() {
isGrid.value = !isGrid.value;
}

return Scaffold(
appBar: AppBar(
title: const Text("Albums"),
),
body: SafeArea(
child: CustomScrollView(
slivers: [
const SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.only(
top: 12.0,
left: 12.0,
right: 12.0,
bottom: 20.0,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SortButton(),
],
),
),
),
SliverPadding(
padding: const EdgeInsets.all(12.0),
sliver: SliverGrid(
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 250,
mainAxisSpacing: 12,
crossAxisSpacing: 12,
childAspectRatio: .7,
),
delegate: SliverChildBuilderDelegate(
childCount: sorted.length,
(context, index) {
return AlbumThumbnailCard(
album: sorted[index],
onTap: () => context.pushRoute(
AlbumViewerRoute(
albumId: sorted[index].id,
),
),
);
},
),
),
),
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.only(
top: 12.0,
left: 12.0,
right: 12.0,
bottom: 20.0,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'library_page_device_albums',
style: context.textTheme.bodyLarge?.copyWith(
fontWeight: FontWeight.w500,
),
).tr(),
],
),
),
),
SliverPadding(
padding: const EdgeInsets.all(12.0),
sliver: SliverGrid(
gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: 250,
mainAxisSpacing: 12,
crossAxisSpacing: 12,
childAspectRatio: .7,
),
delegate: SliverChildBuilderDelegate(
childCount: local.length,
(context, index) => AlbumThumbnailCard(
album: local[index],
onTap: () => context.pushRoute(
AlbumViewerRoute(
albumId: local[index].id,
),
),
),
),
body: ListView(
shrinkWrap: true,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const SortButton(),
IconButton(
onPressed: toggleViewMode,
icon: Icon(isGrid.value ? Icons.list : Icons.grid_view),
),
),
],
),
],
),
GridView.count(
shrinkWrap: true,
physics: const ScrollPhysics(),
crossAxisCount: 2,
mainAxisSpacing: 32,
crossAxisSpacing: 32,
children: sorted.map((album) {
return AlbumThumbnailCard(
album: album,
onTap: () =>
context.pushRoute(AlbumViewerRoute(albumId: album.id)),
);
}).toList(),
),
],
),
);
}
Expand Down