Skip to content

Native iCloud apps for Windows and Linux, built in Rust. Notes, Reminders, Calendar, Contacts, Drive and Photos, offline and in sync with your iPhone.

Photos: the sidebar in Photos' sections — Photos, Media Types, Albums, Utilities

Yashwanth Kamireddi8074c6d4c9c3
diff --git a/src/screens/PhotosView.tsx b/src/screens/PhotosView.tsx
index 2c9174d..8f423bb 100644
--- a/src/screens/PhotosView.tsx
+++ b/src/screens/PhotosView.tsx
@@ -29,6 +29,9 @@ const VIEWS: { key: PhotoView; label: string; Icon: LucideIcon }[] = [
{ key: "library", label: "Library", Icon: Images },
{ key: "favorites", label: "Favorites", Icon: Heart },
{ key: "recents", label: "Recents", Icon: Clock },
+];
+/** Photos' Media Types: the library by what kind of picture each is. */
+const MEDIA: typeof VIEWS = [
{ key: "videos", label: "Videos", Icon: Video },
{ key: "screenshots", label: "Screenshots", Icon: Scan },
];
@@ -1184,7 +1187,7 @@ export function PhotosView() {
return () => window.removeEventListener("keydown", onKey);
}, []);
- const title = album?.name ?? VIEWS.find((v) => v.key === view)?.label ?? "Photos";
+ const title = album?.name ?? [...VIEWS, ...MEDIA, ...UTILITIES].find((v) => v.key === view)?.label ?? "Photos";
const across = ACROSS[zoom];
const source = (v: (typeof VIEWS)[number]) => (
@@ -1209,6 +1212,8 @@ export function PhotosView() {
<aside className="px-side" aria-label="Photos">
<p className="px-side-heading">Photos</p>
{VIEWS.map(source)}
+ <p className="px-side-heading px-side-gap">Media Types</p>
+ {MEDIA.map(source)}
<div className="px-side-row">
<p className="px-side-heading">Albums</p>
<button className="px-side-add" aria-label="New Album" title="New Album" onClick={() => setNaming({ id: null, then: [], draft: "" })}>