π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Icon 1
Manav Rathi46658a26f3e8
diff --git a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts b/web/packages/new/photos/components/FileViewerPhotoSwipe.tsxsimilarity index 95%rename from web/packages/new/photos/components/FileViewerPhotoSwipe.tsrename to web/packages/new/photos/components/FileViewerPhotoSwipe.tsxindex 28e88c825a..0821e6ec8d 100644--- a/web/packages/new/photos/components/FileViewerPhotoSwipe.ts+++ b/web/packages/new/photos/components/FileViewerPhotoSwipe.tsx@@ -9,6 +9,8 @@ import {} from "@/gallery/services/download";import type { EnteFile } from "@/media/file";import { FileType } from "@/media/file-type";+import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";+import { renderToString } from "react-dom/server";import type { FileViewerProps } from "./FileViewer5";// TODO(PS): WIP gallery using upstream photoswipe@@ -313,12 +315,22 @@ export class FileViewerPhotoSwipe {// - zoom: 10// - close: 20pswp.on("uiRegister", () => {+ const html = <InfoOutlinedIcon />;+ console.log(renderToString(html));+ const path =+ '<path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"></path>';+ const pathWithID =+ '<path d="M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8" id="pswp__icn-info"/>';pswp.ui.registerElement({name: "info-button",ariaLabel: "File info",order: 15,isButton: true,- html: "Info",+ html: {+ isCustomSVG: true,+ inner: path,+ outlineID: "pswp__icn-info",+ },onClick: (e) => {console.log("click", e);},@@ -408,7 +420,8 @@ export class FileViewerPhotoSwipe {return;}- this.pswp.element.classList.remove("pswp--ui-visible");+ // TODO(PS): Commented during testing+ // this.pswp.element.classList.remove("pswp--ui-visible");}private async enqueueUpdates(index: number, file: EnteFile) {