Skip to content

armgit / ente

Public Imported from GitHub
0

💚 End-to-end encrypted cloud for everything.

Prefix

Manav Rathiaa551463b360
diff --git a/web/apps/photos/src/styles/photoswipe.css b/web/apps/photos/src/styles/photoswipe.css
index 00dc2c051e..8229a1621b 100644
--- a/web/apps/photos/src/styles/photoswipe.css
+++ b/web/apps/photos/src/styles/photoswipe.css
@@ -11,15 +11,6 @@
top: calc(env(titlebar-area-height, 0px) * 0.4);
}
-/*
- Make the controllable video elements we render as custom PhotoSwipe content
- take up the entire container.
- */
-.pswp-ente video[controls] {
- width: 100%;
- height: 100%;
-}
-
.pswp-ente .pswp__preloader--active .pswp__icn {
opacity: 0.4;
}
@@ -112,7 +103,7 @@
/* Make the controls fit the top bar on mobile sized screens */
@media (width < 450px) {
- .pswp__button {
+ .pswp-ente .pswp__button {
width: 44px;
}
@@ -127,7 +118,7 @@
}
@media (width < 350px) {
- .pswp__button {
+ .pswp-ente .pswp__button {
width: 42px;
}
@@ -165,3 +156,12 @@
-webkit-line-clamp: 4;
line-clamp: 4;
}
+
+/*
+ Make the controllable video elements we render as custom PhotoSwipe content
+ take .pswp-ente up the entire container.
+ */
+.pswp-ente video[controls] {
+ width: 100%;
+ height: 100%;
+}
diff --git a/web/packages/gallery/components/viewer/photoswipe.ts b/web/packages/gallery/components/viewer/photoswipe.ts
index f86edad7d3..92f6bc3ec8 100644
--- a/web/packages/gallery/components/viewer/photoswipe.ts
+++ b/web/packages/gallery/components/viewer/photoswipe.ts
@@ -228,7 +228,9 @@ export class FileViewerPhotoSwipe {
// Set the index within files that we should open to. Subsequent
// updates to the index will be tracked by PhotoSwipe internally.
index: initialIndex,
- // TODO(PS): will we need this?
+ // Use "pswp-ente" as the main class name. Note that this is not
+ // necessary, we could've target the "pswp" class too in our CSS
+ // since we only have a single PhotoSwipe instance.
mainClass: "pswp-ente",
// TODO(PS): Translated variants
closeTitle: pt("Close"),