π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
chore: misc changes
anandbaburajanfc1e421f9a1f
diff --git a/web/apps/photos/src/components/TripTemplate/MobileNavBar.tsx b/web/apps/photos/src/components/TripTemplate/MobileNavBar.tsxindex afb446b171..af59eb3513 100644--- a/web/apps/photos/src/components/TripTemplate/MobileNavBar.tsx+++ b/web/apps/photos/src/components/TripTemplate/MobileNavBar.tsx@@ -97,6 +97,17 @@ const MobileNavContainer = styled(Box)({padding: "0 16px",backgroundColor: "transparent",zIndex: 2000,+ "&::after": {+ content: '""',+ position: "absolute",+ top: 0,+ left: 0,+ right: 0,+ height: "90px",+ background: "linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%)",+ zIndex: -1,+ pointerEvents: "none",+ },});const LogoContainer = styled(Box)({diff --git a/web/apps/photos/src/components/TripTemplate/MobileTimelineLocation.tsx b/web/apps/photos/src/components/TripTemplate/MobileTimelineLocation.tsxindex 377aa51269..ed097da0a7 100644--- a/web/apps/photos/src/components/TripTemplate/MobileTimelineLocation.tsx+++ b/web/apps/photos/src/components/TripTemplate/MobileTimelineLocation.tsx@@ -117,6 +117,9 @@ const PhotoFanWrapper = styled(Box)({position: "relative",width: "180px",height: "240px",+ transition: "transform 0.3s ease-in-out",+ cursor: "pointer",+ "&:hover": { transform: "scale(1.05)" },});const PhotoOverlay = styled(Box)({@@ -126,13 +129,14 @@ const PhotoOverlay = styled(Box)({right: "2px",zIndex: 30,pointerEvents: "none",- background: "linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3), transparent)",- borderRadius: "0 0 14px 14px",- padding: "24px 16px 16px 16px",+ background: "linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%)",+ borderRadius: "0 0 12px 12px",+ padding: "16px",+ minHeight: "fit-content",});-const DayBadge = styled(Box)(({ theme }) => ({+const DayBadge = styled(Box)({display: "inline-flex",alignItems: "center",backgroundColor: "transparent",@@ -146,7 +150,7 @@ const DayBadge = styled(Box)(({ theme }) => ({textTransform: "uppercase",letterSpacing: "0.15em",textShadow: "0 2px 8px rgba(0, 0, 0, 0.8)",-}));+});const LocationTitle = styled(Typography)(() => ({fontSize: "18px",diff --git a/web/apps/photos/src/components/TripTemplate/PhotoFan.tsx b/web/apps/photos/src/components/TripTemplate/PhotoFan.tsxindex 2f96e48577..71232e1e24 100644--- a/web/apps/photos/src/components/TripTemplate/PhotoFan.tsx+++ b/web/apps/photos/src/components/TripTemplate/PhotoFan.tsx@@ -126,9 +126,6 @@ const PhotoFanContainer = styled(Box)({position: "relative",width: "180px",height: "240px",- transition: "transform 0.3s ease-in-out",- cursor: "pointer",- "&:hover": { transform: "scale(1.05)" },});const PhotoFrame = styled(Box)(() => ({diff --git a/web/apps/photos/src/components/TripTemplate/hooks/useFileViewer.ts b/web/apps/photos/src/components/TripTemplate/hooks/useFileViewer.tsindex ceb3d8ce8f..34b3c894c8 100644--- a/web/apps/photos/src/components/TripTemplate/hooks/useFileViewer.ts+++ b/web/apps/photos/src/components/TripTemplate/hooks/useFileViewer.ts@@ -18,22 +18,30 @@ export const useFileViewer = ({const [viewerFiles, setViewerFiles] = useState<EnteFile[]>([]);const handleOpenFileViewer = useCallback(- (_cluster: JourneyPoint[], clickedFileId: number) => {- // Sort all files by creation time- const sortedFiles = [...files].sort(+ (cluster: JourneyPoint[], clickedFileId: number) => {+ // Get file IDs from the cluster+ const clusterFileIds = cluster.map((point) => point.fileId);++ // Filter files to only include those from the cluster+ const clusterFiles = files.filter((file) =>+ clusterFileIds.includes(file.id)+ );++ // Sort cluster files by creation time+ const sortedClusterFiles = [...clusterFiles].sort((a, b) =>new Date(a.metadata.creationTime / 1000).getTime() -new Date(b.metadata.creationTime / 1000).getTime(),);- // Find the index of the clicked photo in all files- const clickedIndex = sortedFiles.findIndex(+ // Find the index of the clicked photo in the cluster files+ const clickedIndex = sortedClusterFiles.findIndex((f) => f.id === clickedFileId,);- if (clickedIndex !== -1 && sortedFiles.length > 0) {+ if (clickedIndex !== -1 && sortedClusterFiles.length > 0) {// Batch state updates to avoid multiple re-renders- setViewerFiles(sortedFiles);+ setViewerFiles(sortedClusterFiles);setCurrentFileIndex(clickedIndex);setOpenFileViewer(true);onSetOpenFileViewer?.(true);diff --git a/web/apps/photos/src/components/TripTemplate/index.tsx b/web/apps/photos/src/components/TripTemplate/index.tsxindex e2c53b73d9..9c55d0c298 100644--- a/web/apps/photos/src/components/TripTemplate/index.tsx+++ b/web/apps/photos/src/components/TripTemplate/index.tsx@@ -630,7 +630,9 @@ const MobileTimelineContainer = styled(Box)(({ theme }) => ({scrollbarColor: `${theme.palette.divider} transparent`,}));-const MobileCoverOverlay = styled(Box)<{ show: boolean }>(({ show }) => ({+const MobileCoverOverlay = styled(Box, {+ shouldForwardProp: (prop) => prop !== 'show',+})<{ show: boolean }>(({ show }) => ({position: "absolute",top: 0,left: 0,@@ -649,7 +651,9 @@ const MobileTimelineContent = styled(Box)({flexDirection: "column",});-const MobileTimelineBaseLine = styled(Box)<{ photoClusters: JourneyPoint[][] }>(({ theme, photoClusters }) => ({+const MobileTimelineBaseLine = styled(Box, {+ shouldForwardProp: (prop) => prop !== 'photoClusters',+})<{ photoClusters: JourneyPoint[][] }>(({ theme, photoClusters }) => ({position: "absolute",left: "50%",top: "-15vh",