π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: format code with prettier
anandbaburajanf29f714e2b0c
diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsxindex dd4d1ec88a..a7d35dcd86 100644--- a/web/apps/photos/src/components/Collections/CollectionShare.tsx+++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx@@ -1835,8 +1835,7 @@ const ManageView: React.FC<ManageViewProps> = ({const options = useMemo(() => viewOptions(), []);- const currentView =- collection.pubMagicMetadata?.data?.view || "grouped";+ const currentView = collection.pubMagicMetadata?.data?.view || "grouped";const changeViewValue = (value: string) => async () => {if (value === currentView) return;@@ -1880,9 +1879,7 @@ const ManageView: React.FC<ManageViewProps> = ({onClick={changeViewValue(value)}label={label}endIcon={- currentView === value && (- <DoneIcon />- )+ currentView === value && <DoneIcon />}/>{index != options.length - 1 && (diff --git a/web/apps/photos/src/components/TripView/MobileCover.tsx b/web/apps/photos/src/components/TripView/MobileCover.tsxindex 50fe8de15d..ea85cb29a5 100644--- a/web/apps/photos/src/components/TripView/MobileCover.tsx+++ b/web/apps/photos/src/components/TripView/MobileCover.tsx@@ -42,7 +42,7 @@ export const MobileCover = memo<MobileCoverProps>(inset: 0,width: "100%",height: "100%",- objectFit: "cover"+ objectFit: "cover",}}/><GradientOverlay />diff --git a/web/apps/photos/src/components/TripView/PhotoFan.tsx b/web/apps/photos/src/components/TripView/PhotoFan.tsxindex 0b93f1930c..535862181f 100644--- a/web/apps/photos/src/components/TripView/PhotoFan.tsx+++ b/web/apps/photos/src/components/TripView/PhotoFan.tsx@@ -32,7 +32,7 @@ export const PhotoFan = memo<PhotoFanProps>(({ cluster, onPhotoClick }) => {width: "100%",height: "100%",objectFit: "cover",- zIndex: 1+ zIndex: 1,}}/>)}@@ -63,7 +63,7 @@ export const PhotoFan = memo<PhotoFanProps>(({ cluster, onPhotoClick }) => {width: "100%",height: "100%",objectFit: "cover",- zIndex: 1+ zIndex: 1,}}/>)}@@ -92,7 +92,7 @@ export const PhotoFan = memo<PhotoFanProps>(({ cluster, onPhotoClick }) => {width: "100%",height: "100%",objectFit: "cover",- zIndex: 1+ zIndex: 1,}}/>)}@@ -117,7 +117,7 @@ export const PhotoFan = memo<PhotoFanProps>(({ cluster, onPhotoClick }) => {inset: 0,width: "100%",height: "100%",- objectFit: "cover"+ objectFit: "cover",}}/>) : (diff --git a/web/apps/photos/src/components/TripView/TripCover.tsx b/web/apps/photos/src/components/TripView/TripCover.tsxindex 82c7ebb09a..fa18b624d4 100644--- a/web/apps/photos/src/components/TripView/TripCover.tsx+++ b/web/apps/photos/src/components/TripView/TripCover.tsx@@ -44,7 +44,7 @@ export const TripCover = memo<TripCoverProps>(inset: 0,width: "100%",height: "100%",- objectFit: "cover"+ objectFit: "cover",}}/><GradientOverlay />diff --git a/web/apps/photos/src/components/TripView/index.tsx b/web/apps/photos/src/components/TripView/index.tsxindex f0eaf2df52..75da13ecd2 100644--- a/web/apps/photos/src/components/TripView/index.tsx+++ b/web/apps/photos/src/components/TripView/index.tsx@@ -8,7 +8,6 @@ import { type Collection } from "ente-media/collection";import { type EnteFile } from "ente-media/file";import { useEffect, useRef, useState } from "react";-// Import extracted componentsimport { MobileCover } from "./MobileCover";import { MobileNavBar } from "./MobileNavBar";@@ -112,20 +111,25 @@ export const TripView: React.FC<TripViewProps> = ({const [photoClusters, setPhotoClusters] = useState<JourneyPoint[][]>([]);const [optimalZoom, setOptimalZoom] = useState(7);- const [TripMapComponent, setTripMapComponent] = useState<React.ComponentType<{- journeyData: JourneyPoint[];- photoClusters: JourneyPoint[][];- hasPhotoData: boolean;- optimalZoom: number;- currentZoom: number;- targetZoom: number | null;- mapRef: import("leaflet").Map | null;- scrollProgress: number;- setMapRef: (map: import("leaflet").Map | null) => void;- setCurrentZoom: (zoom: number) => void;- setTargetZoom: (zoom: number | null) => void;- onMarkerClick: (clusterIndex: number, clusterLat: number, clusterLng: number) => void;- }> | null>(null);+ const [TripMapComponent, setTripMapComponent] =+ useState<React.ComponentType<{+ journeyData: JourneyPoint[];+ photoClusters: JourneyPoint[][];+ hasPhotoData: boolean;+ optimalZoom: number;+ currentZoom: number;+ targetZoom: number | null;+ mapRef: import("leaflet").Map | null;+ scrollProgress: number;+ setMapRef: (map: import("leaflet").Map | null) => void;+ setCurrentZoom: (zoom: number) => void;+ setTargetZoom: (zoom: number | null) => void;+ onMarkerClick: (+ clusterIndex: number,+ clusterLat: number,+ clusterLng: number,+ ) => void;+ }> | null>(null);// Load client-side components and calculationsuseEffect(() => {@@ -137,23 +141,29 @@ export const TripView: React.FC<TripViewProps> = ({// Load mapHelpers and calculate clusters if we have dataif (journeyData.length > 0) {- void import("./mapHelpers").then(({ clusterPhotosByProximity, calculateOptimalZoom }) => {- const clusters = clusterPhotosByProximity(journeyData);-- // Sort clusters by their earliest timestamp to maintain chronological order- const sortedClusters = clusters.sort((a, b) => {- const earliestA = Math.min(- ...a.map((p) => new Date(p.timestamp).getTime()),- );- const earliestB = Math.min(- ...b.map((p) => new Date(p.timestamp).getTime()),- );- return earliestA - earliestB;- });-- setPhotoClusters(sortedClusters);- setOptimalZoom(calculateOptimalZoom());- });+ void import("./mapHelpers").then(+ ({ clusterPhotosByProximity, calculateOptimalZoom }) => {+ const clusters = clusterPhotosByProximity(journeyData);++ // Sort clusters by their earliest timestamp to maintain chronological order+ const sortedClusters = clusters.sort((a, b) => {+ const earliestA = Math.min(+ ...a.map((p) =>+ new Date(p.timestamp).getTime(),+ ),+ );+ const earliestB = Math.min(+ ...b.map((p) =>+ new Date(p.timestamp).getTime(),+ ),+ );+ return earliestA - earliestB;+ });++ setPhotoClusters(sortedClusters);+ setOptimalZoom(calculateOptimalZoom());+ },+ );}}}, [isClient, journeyData]);diff --git a/web/apps/photos/src/components/TripView/utils/geocoding.ts b/web/apps/photos/src/components/TripView/utils/geocoding.tsindex 896c04b444..6f21a2093d 100644--- a/web/apps/photos/src/components/TripView/utils/geocoding.ts+++ b/web/apps/photos/src/components/TripView/utils/geocoding.ts@@ -1,4 +1,3 @@-interface GeocodingResponse {features?: {properties?: {