From 3bb92e10e46fd20fdd731e22a82569e2df9b85c5 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 6 Mar 2025 06:57:52 +0530 Subject: [PATCH] Temporary workbench This reverts commit 1eed87e117f9917e20b489622316fd7a82e6edfb. --- web/apps/photos/src/pages/_app.tsx | 4 ++-- web/apps/photos/src/styles/global.css | 3 ++- web/packages/gallery/components/viewer/photoswipe.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsx index 000cf2d037..aad64be0cf 100644 --- a/web/apps/photos/src/pages/_app.tsx +++ b/web/apps/photos/src/pages/_app.tsx @@ -48,9 +48,9 @@ import { useCallback, useEffect, useMemo, useState } from "react"; import { resumeExportsIfNeeded } from "services/export"; import { photosLogout } from "services/logout"; -import "photoswipe/dist/photoswipe.css"; +// import "photoswipe/dist/photoswipe.css"; // TODO(PS): Note, auto hide only works with the new CSS. -// import "../../../../packages/gallery/components/viewer/ps5/dist/photoswipe.css"; +import "../../../../packages/gallery/components/viewer/ps5/dist/photoswipe.css"; import "styles/global.css"; diff --git a/web/apps/photos/src/styles/global.css b/web/apps/photos/src/styles/global.css index 17aa9cb186..ae091f6cf3 100644 --- a/web/apps/photos/src/styles/global.css +++ b/web/apps/photos/src/styles/global.css @@ -12,7 +12,7 @@ body { flex-direction: column; height: 100%; } - +@media DISABLED { .pswp__button--custom { width: 48px; height: 48px; @@ -114,6 +114,7 @@ body { .pswp__caption--empty { display: none; } +} .pswp-ente { /* The default z-index for PhotoSwipe is 10k, way beyond everything else. diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts index 774d899091..5ad19eb76e 100644 --- a/web/packages/gallery/components/viewer/photoswipe.ts +++ b/web/packages/gallery/components/viewer/photoswipe.ts @@ -33,7 +33,7 @@ if (process.env.NEXT_PUBLIC_ENTE_WIP_PS5) { let PhotoSwipe; if (process.env.NEXT_PUBLIC_ENTE_WIP_PS5) { // TODO(PS): Comment me before merging into main. - // PhotoSwipe = require("./ps5/dist/photoswipe.esm.js").default; + PhotoSwipe = require("./ps5/dist/photoswipe.esm.js").default; } export interface FileViewerPhotoSwipeDelegate {