π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Swap
Manav Rathi892a836fcad4
diff --git a/web/apps/photos/src/components/PhotoViewer/index.tsx b/web/apps/photos/src/components/PhotoViewer/index.tsxindex d1ee5f59de..a057677e35 100644--- a/web/apps/photos/src/components/PhotoViewer/index.tsx+++ b/web/apps/photos/src/components/PhotoViewer/index.tsx@@ -55,7 +55,6 @@ import {} from "utils/file";import { pauseVideo, playVideo } from "utils/photoFrame";import { PublicCollectionGalleryContext } from "utils/publicCollectionGallery";-import { getTrashFileMessage } from "utils/ui";import { FileInfo, type FileInfoExif, type FileInfoProps } from "./FileInfo";import ImageEditorOverlay from "./ImageEditorOverlay";@@ -125,7 +124,7 @@ export interface PhotoViewerProps {function PhotoViewer(props: PhotoViewerProps) {const galleryContext = useContext(GalleryContext);- const { showLoadingBar, hideLoadingBar, setDialogMessage } =+ const { showLoadingBar, hideLoadingBar, setDialogMessage, showMiniDialog } =useContext(AppContext);const publicCollectionGalleryContext = useContext(PublicCollectionGalleryContext,@@ -563,7 +562,16 @@ function PhotoViewer(props: PhotoViewerProps) {if (!file || !isOwnFile || props.isTrashCollection) {return;}- setDialogMessage(getTrashFileMessage(() => trashFile(file)));+ showMiniDialog({+ title: t("TRASH_FILE_TITLE"),+ message: t("TRASH_FILE_MESSAGE"),+ continue: {+ text: t("MOVE_TO_TRASH"),+ color: "critical",+ action: () => trashFile(file),+ autoFocus: true,+ },+ });};const handleArrowClick = (diff --git a/web/apps/photos/src/utils/ui/index.tsx b/web/apps/photos/src/utils/ui/index.tsxindex 11a1c08e77..7732cafcd5 100644--- a/web/apps/photos/src/utils/ui/index.tsx+++ b/web/apps/photos/src/utils/ui/index.tsx@@ -14,14 +14,3 @@ export const getTrashFilesMessage = (close: { text: t("cancel") },});-export const getTrashFileMessage = (deleteFileHelper): DialogBoxAttributes => ({- title: t("TRASH_FILE_TITLE"),- content: t("TRASH_FILE_MESSAGE"),- proceed: {- action: deleteFileHelper,- text: t("MOVE_TO_TRASH"),- variant: "critical",- autoFocus: true,- },- close: { text: t("cancel") },-});