Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

use assets to show photos, videos and live photos in file types section

ashilkn9e09f884cb8b
diff --git a/assets/2.0x/type_live.png b/assets/2.0x/type_live.png
new file mode 100644
index 0000000000..762cd162c8
Binary files /dev/null and b/assets/2.0x/type_live.png differ
diff --git a/assets/2.0x/type_photos.png b/assets/2.0x/type_photos.png
new file mode 100644
index 0000000000..07332e836a
Binary files /dev/null and b/assets/2.0x/type_photos.png differ
diff --git a/assets/2.0x/type_videos.png b/assets/2.0x/type_videos.png
new file mode 100644
index 0000000000..d56bbb556f
Binary files /dev/null and b/assets/2.0x/type_videos.png differ
diff --git a/assets/3.0x/type_live.png b/assets/3.0x/type_live.png
new file mode 100644
index 0000000000..a374691284
Binary files /dev/null and b/assets/3.0x/type_live.png differ
diff --git a/assets/3.0x/type_photos.png b/assets/3.0x/type_photos.png
new file mode 100644
index 0000000000..8a9279a4fc
Binary files /dev/null and b/assets/3.0x/type_photos.png differ
diff --git a/assets/3.0x/type_videos.png b/assets/3.0x/type_videos.png
new file mode 100644
index 0000000000..99967ea5f6
Binary files /dev/null and b/assets/3.0x/type_videos.png differ
diff --git a/assets/type_live.png b/assets/type_live.png
new file mode 100644
index 0000000000..f2dbd30953
Binary files /dev/null and b/assets/type_live.png differ
diff --git a/assets/type_photos.png b/assets/type_photos.png
new file mode 100644
index 0000000000..b83abe698d
Binary files /dev/null and b/assets/type_photos.png differ
diff --git a/assets/type_videos.png b/assets/type_videos.png
new file mode 100644
index 0000000000..c86768afcb
Binary files /dev/null and b/assets/type_videos.png differ
diff --git a/lib/ui/viewer/search_tab/file_type_section.dart b/lib/ui/viewer/search_tab/file_type_section.dart
index 2c19b95f1d..2a01ed543c 100644
--- a/lib/ui/viewer/search_tab/file_type_section.dart
+++ b/lib/ui/viewer/search_tab/file_type_section.dart
@@ -129,6 +129,9 @@ class _FileTypeSectionState extends State<FileTypeSection> {
class FileTypeRecommendation extends StatelessWidget {
static const knownTypesToAssetPath = {
+ "PHOTO": "assets/type_photos.png",
+ "VIDEO": "assets/type_videos.png",
+ "LIVE": "assets/type_live.png",
"AVI": "assets/type_AVI.png",
"GIF": "assets/type_GIF.png",
"HEIC": "assets/type_HEIC.png",
@@ -150,7 +153,8 @@ class FileTypeRecommendation extends StatelessWidget {
.call()
.replaceAll(RegExp(r'.$'), "")
.split(" ")
- .first;
+ .first
+ .toUpperCase();
final assetPath = knownTypesToAssetPath[fileType];
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),