π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
feat: add light and dark mode SVG icons for collection and search actions
AmanRajSinghMouryab43bc8a5bd57
diff --git a/mobile/assets/icons/list_view_icon_dark.svg b/mobile/assets/icons/list_view_icon_dark.svgnew file mode 100644index 0000000000..2e6c9e945f--- /dev/null+++ b/mobile/assets/icons/list_view_icon_dark.svg@@ -0,0 +1,4 @@+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M6.75 6.75H21.75M6.75 12H21.75M6.75 17.25H21.75" stroke="white" stroke-opacity="0.6" stroke-width="2.25" stroke-linejoin="round"/>+<path d="M3 6H4.5V7.5H3V6ZM3 11.25H4.5V12.75H3V11.25ZM3 16.5H4.5V18H3V16.5Z" stroke="white" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="round"/>+</svg>diff --git a/mobile/assets/icons/list_view_icon_light.svg b/mobile/assets/icons/list_view_icon_light.svgnew file mode 100644index 0000000000..3f62c7ad02--- /dev/null+++ b/mobile/assets/icons/list_view_icon_light.svg@@ -0,0 +1,4 @@+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M6.75 6.75H21.75M6.75 12H21.75M6.75 17.25H21.75" stroke="black" stroke-opacity="0.6" stroke-width="2.25" stroke-linejoin="round"/>+<path d="M3 6H4.5V7.5H3V6ZM3 11.25H4.5V12.75H3V11.25ZM3 16.5H4.5V18H3V16.5Z" stroke="black" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="square" stroke-linejoin="round"/>+</svg>diff --git a/mobile/assets/icons/search_icon_dark.svg b/mobile/assets/icons/search_icon_dark.svgnew file mode 100644index 0000000000..785e84064a--- /dev/null+++ b/mobile/assets/icons/search_icon_dark.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M15.7548 14.394L12.1277 10.7669C13.0009 9.60436 13.4723 8.18933 13.4707 6.73536C13.4707 3.02151 10.4492 0 6.73536 0C3.02151 0 0 3.02151 0 6.73536C0 10.4492 3.02151 13.4707 6.73536 13.4707C8.18933 13.4723 9.60436 13.0009 10.7669 12.1277L14.394 15.7548C14.5776 15.9189 14.8171 16.0065 15.0632 15.9996C15.3094 15.9927 15.5436 15.8919 15.7177 15.7177C15.8919 15.5436 15.9927 15.3094 15.9996 15.0632C16.0065 14.8171 15.9189 14.5776 15.7548 14.394ZM1.92439 6.73536C1.92439 5.78384 2.20655 4.85369 2.73518 4.06253C3.26382 3.27137 4.01519 2.65473 4.89428 2.2906C5.77337 1.92647 6.7407 1.8312 7.67393 2.01683C8.60717 2.20246 9.4644 2.66066 10.1372 3.33349C10.8101 4.00632 11.2683 4.86355 11.4539 5.79679C11.6395 6.73002 11.5442 7.69735 11.1801 8.57644C10.816 9.45553 10.1994 10.2069 9.40819 10.7355C8.61703 11.2642 7.68688 11.5463 6.73536 11.5463C5.45988 11.5448 4.23708 11.0374 3.33518 10.1355C2.43328 9.23364 1.92592 8.01084 1.92439 6.73536Z" fill="white" fill-opacity="0.6"/>+</svg>diff --git a/mobile/assets/icons/search_icon_light.svg b/mobile/assets/icons/search_icon_light.svgnew file mode 100644index 0000000000..13d557692a--- /dev/null+++ b/mobile/assets/icons/search_icon_light.svg@@ -0,0 +1,3 @@+<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M15.7548 14.394L12.1277 10.7669C13.0009 9.60436 13.4723 8.18933 13.4707 6.73536C13.4707 3.02151 10.4492 0 6.73536 0C3.02151 0 0 3.02151 0 6.73536C0 10.4492 3.02151 13.4707 6.73536 13.4707C8.18933 13.4723 9.60436 13.0009 10.7669 12.1277L14.394 15.7548C14.5776 15.9189 14.8171 16.0065 15.0632 15.9996C15.3094 15.9927 15.5436 15.8919 15.7177 15.7177C15.8919 15.5436 15.9927 15.3094 15.9996 15.0632C16.0065 14.8171 15.9189 14.5776 15.7548 14.394ZM1.92439 6.73536C1.92439 5.78384 2.20655 4.85369 2.73518 4.06253C3.26382 3.27137 4.01519 2.65473 4.89428 2.2906C5.77337 1.92647 6.7407 1.8312 7.67393 2.01683C8.60717 2.20246 9.4644 2.66066 10.1372 3.33349C10.8101 4.00632 11.2683 4.86355 11.4539 5.79679C11.6395 6.73002 11.5442 7.69735 11.1801 8.57644C10.816 9.45553 10.1994 10.2069 9.40819 10.7355C8.61703 11.2642 7.68688 11.5463 6.73536 11.5463C5.45988 11.5448 4.23708 11.0374 3.33518 10.1355C2.43328 9.23364 1.92592 8.01084 1.92439 6.73536Z" fill="black" fill-opacity="0.6"/>+</svg>diff --git a/mobile/lib/ui/collections/collection_list_page.dart b/mobile/lib/ui/collections/collection_list_page.dartindex 2df1e3b81f..9330ede480 100644--- a/mobile/lib/ui/collections/collection_list_page.dart+++ b/mobile/lib/ui/collections/collection_list_page.dart@@ -1,6 +1,7 @@import "dart:async";import 'package:flutter/material.dart';+import "package:flutter_svg/flutter_svg.dart";import "package:photos/core/event_bus.dart";import "package:photos/events/album_sort_order_change_event.dart";import "package:photos/events/collection_updated_event.dart";@@ -135,7 +136,7 @@ class _CollectionListPageState extends State<CollectionListPage> {Widget _sortMenu(List<Collection> collections) {final colorTheme = getEnteColorScheme(context);-+ final isLightMode = Theme.of(context).brightness == Brightness.light;Widget sortOptionText(AlbumSortKey key) {String text = key.toString();switch (key) {@@ -177,12 +178,7 @@ class _CollectionListPageState extends State<CollectionListPage> {),child: Row(children: [- IconButtonWidget(- icon: albumViewType == AlbumViewType.grid- ? Icons.view_list_outlined- : Icons.grid_view_outlined,- iconButtonType: IconButtonType.secondary,- iconColor: colorTheme.blurStrokePressed,+ GestureDetector(onTap: () async {setState(() {albumViewType = albumViewType == AlbumViewType.grid@@ -191,6 +187,24 @@ class _CollectionListPageState extends State<CollectionListPage> {});await localSettings.setAlbumViewType(albumViewType!);},+ child: Padding(+ padding: const EdgeInsets.all(12.0),+ child: SizedBox(+ height: 24,+ width: 24,+ child: albumViewType == AlbumViewType.grid+ ? SvgPicture.asset(+ isLightMode+ ? "assets/icons/list_view_icon_light.svg"+ : "assets/icons/list_view_icon_dark.svg",+ )+ : Icon(+ Icons.grid_view,+ color: colorTheme.textMuted,+ size: 22,+ ),+ ),+ ),),GestureDetector(onTapDown: (TapDownDetails details) async {@@ -222,9 +236,9 @@ class _CollectionListPageState extends State<CollectionListPage> {}},child: IconButtonWidget(- icon: Icons.sort_outlined,+ icon: Icons.sort_rounded,iconButtonType: IconButtonType.secondary,- iconColor: colorTheme.blurStrokePressed,+ iconColor: colorTheme.textMuted,),),],diff --git a/mobile/lib/ui/components/searchable_appbar.dart b/mobile/lib/ui/components/searchable_appbar.dartindex 4290713552..bf447a952d 100644--- a/mobile/lib/ui/components/searchable_appbar.dart+++ b/mobile/lib/ui/components/searchable_appbar.dart@@ -1,6 +1,6 @@import "package:flutter/material.dart";+import "package:flutter_svg/flutter_svg.dart";import "package:photos/theme/ente_theme.dart";-import "package:photos/ui/components/buttons/icon_button_widget.dart";class SearchableAppBar extends StatefulWidget {final Widget title;@@ -56,6 +56,7 @@ class _SearchableAppBarState extends State<SearchableAppBar> {@overrideWidget build(BuildContext context) {+ final isLightMode = Theme.of(context).brightness == Brightness.light;return SliverAppBar(floating: true,elevation: 0,@@ -81,11 +82,20 @@ class _SearchableAppBarState extends State<SearchableAppBar> {actions: _isSearchActive? null: [- IconButtonWidget(- icon: Icons.search,- iconButtonType: IconButtonType.secondary,+ GestureDetector(onTap: _activateSearch,- iconColor: getEnteColorScheme(context).blurStrokePressed,+ child: Padding(+ padding: const EdgeInsets.all(12.0),+ child: SizedBox(+ height: 18,+ width: 18,+ child: SvgPicture.asset(+ isLightMode+ ? "assets/icons/search_icon_light.svg"+ : "assets/icons/search_icon_dark.svg",+ ),+ ),+ ),),...?widget.actions,],