π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Rename
Manav Rathi57a226ed2a1e
diff --git a/web/apps/photos/src/components/FileList.tsx b/web/apps/photos/src/components/FileList.tsxindex 2db2dd196f..ba73c43b3b 100644--- a/web/apps/photos/src/components/FileList.tsx+++ b/web/apps/photos/src/components/FileList.tsx@@ -9,7 +9,7 @@ import {} from "@/new/photos/components/FileList";import { FlexWrapper } from "@ente/shared/components/Container";import { Box, Checkbox, Link, Typography, styled } from "@mui/material";-import type { PhotoFrameProps } from "components/PhotoFrame";+import type { FileListWithViewerProps } from "components/FileListWithViewer";import { t } from "i18next";import memoize from "memoize-one";import { GalleryContext } from "pages/gallery";@@ -193,7 +193,7 @@ export interface FileListAnnotatedFile {}type FileListProps = Pick<- PhotoFrameProps,+ FileListWithViewerProps,| "mode"| "modePlus"| "selectable"@@ -545,7 +545,7 @@ export const FileList: React.FC<FileListProps> = ({} else {footerHeight = FOOTER_HEIGHT;}- const photoFrameHeight = (() => {+ const fileListHeight = (() => {let sum = 0;const getCurrentItemSize = getItemSize(timeStampList);for (let i = 0; i < timeStampList.length; i++) {@@ -559,7 +559,7 @@ export const FileList: React.FC<FileListProps> = ({return {itemType: ITEM_TYPE.OTHER,item: <></>,- height: Math.max(height - photoFrameHeight - footerHeight, 0),+ height: Math.max(height - fileListHeight - footerHeight, 0),};};diff --git a/web/apps/photos/src/components/PhotoFrame.tsx b/web/apps/photos/src/components/FileListWithViewer.tsxsimilarity index 97%rename from web/apps/photos/src/components/PhotoFrame.tsxrename to web/apps/photos/src/components/FileListWithViewer.tsxindex 806a67ebab..baeb7e3775 100644--- a/web/apps/photos/src/components/PhotoFrame.tsx+++ b/web/apps/photos/src/components/FileListWithViewer.tsx@@ -76,7 +76,7 @@ export type DisplayFile = EnteFile & {timelineDateString?: string;};-export type PhotoFrameProps = Pick<+export type FileListWithViewerProps = Pick<FileInfoProps,| "fileCollectionIDs"| "allCollectionsNameByID"@@ -142,9 +142,10 @@ export type PhotoFrameProps = Pick<};/**- * TODO: Rename me to FileListWithViewer (or Gallery?)+ * A list of files (represented by their thumbnails), alongwith the viewer that+ * opens on activating the thumbnail.*/-const PhotoFrame = ({+export const FileListWithViewer: React.FC<FileListWithViewerProps> = ({mode,modePlus,files,@@ -167,7 +168,7 @@ const PhotoFrame = ({onSyncWithRemote,onSelectCollection,onSelectPerson,-}: PhotoFrameProps) => {+}) => {const galleryContext = useContext(GalleryContext);const [openFileViewer, setOpenFileViewer] = useState(false);@@ -288,8 +289,6 @@ const PhotoFrame = ({);};-export default PhotoFrame;-/*** See: [Note: Timeline date string]*/diff --git a/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx b/web/apps/photos/src/components/pages/gallery/PreviewCard.tsxindex 5b3700971f..0c974ac78a 100644--- a/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx+++ b/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx@@ -16,7 +16,7 @@ import AlbumOutlinedIcon from "@mui/icons-material/AlbumOutlined";import FavoriteRoundedIcon from "@mui/icons-material/FavoriteRounded";import PlayCircleOutlineOutlinedIcon from "@mui/icons-material/PlayCircleOutlineOutlined";import { styled, Typography } from "@mui/material";-import type { DisplayFile } from "components/PhotoFrame";+import type { DisplayFile } from "components/FileListWithViewer";import { GalleryContext } from "pages/gallery";import React, { useContext, useEffect, useRef, useState } from "react";import { shouldShowAvatar } from "utils/file";diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex 580bc49d58..85d3b59345 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -96,13 +96,13 @@ import CollectionNamer, {import { GalleryBarAndListHeader } from "components/Collections/GalleryBarAndListHeader";import { Export } from "components/Export";import { ITEM_TYPE, TimeStampListItem } from "components/FileList";+import {FileListWithViewer} from "components/FileListWithViewer";import {FilesDownloadProgress,FilesDownloadProgressAttributes,} from "components/FilesDownloadProgress";import { FixCreationTime } from "components/FixCreationTime";import GalleryEmptyState from "components/GalleryEmptyState";-import PhotoFrame from "components/PhotoFrame";import { Sidebar } from "components/Sidebar";import { Upload, type UploadTypeSelectorIntent } from "components/Upload";import SelectedFileOptions from "components/pages/gallery/SelectedFileOptions";@@ -1047,7 +1047,7 @@ const Page: React.FC = () => {!state.view.activePerson ? (<PeopleEmptyState />) : (- <PhotoFrame+ <FileListWithViewermode={barMode}modePlus={isInSearchMode ? "search" : barMode}files={filteredFiles}diff --git a/web/apps/photos/src/pages/shared-albums.tsx b/web/apps/photos/src/pages/shared-albums.tsxindex 63b02cfc72..7566a280b4 100644--- a/web/apps/photos/src/pages/shared-albums.tsx+++ b/web/apps/photos/src/pages/shared-albums.tsx@@ -52,11 +52,11 @@ import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";import { Box, Button, IconButton, Stack, styled, Tooltip } from "@mui/material";import Typography from "@mui/material/Typography";import { ITEM_TYPE, TimeStampListItem } from "components/FileList";+import { FileListWithViewer } from "components/FileListWithViewer";import {FilesDownloadProgress,FilesDownloadProgressAttributes,} from "components/FilesDownloadProgress";-import PhotoFrame from "components/PhotoFrame";import { Upload } from "components/Upload";import { t } from "i18next";import { useRouter } from "next/router";@@ -509,7 +509,7 @@ export default function PublicCollectionGallery() {)}</NavbarBase>- <PhotoFrame+ <FileListWithViewerfiles={publicFiles}onSyncWithRemote={handleSyncWithRemote}setSelected={setSelected}diff --git a/web/packages/new/photos/components/FileList.ts b/web/packages/new/photos/components/FileList.tsindex 0d8c724b51..ce96218dad 100644--- a/web/packages/new/photos/components/FileList.ts+++ b/web/packages/new/photos/components/FileList.ts@@ -3,4 +3,4 @@ export const IMAGE_CONTAINER_MAX_HEIGHT = 180;export const IMAGE_CONTAINER_MAX_WIDTH = 180;export const MIN_COLUMNS = 4;-// TODO: Move the PhotoList component here.+// TODO: Move the FileList component here.