π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix(embed):use-shared-viewer-stylesheet
Aswin Asok5735c7777444
diff --git a/web/apps/embed/src/pages/_app.tsx b/web/apps/embed/src/pages/_app.tsxindex 926ca07394..7463b71949 100644--- a/web/apps/embed/src/pages/_app.tsx+++ b/web/apps/embed/src/pages/_app.tsx@@ -12,11 +12,10 @@ import { photosTheme } from "ente-base/components/utils/theme";import { useLoadingBar } from "ente-base/components/utils/use-loading-bar";import { BaseContext, deriveBaseContext } from "ente-base/context";import { logStartupBanner } from "ente-base/log-web";+import "ente-gallery/styles/photoswipe.css";import { PhotosAppContext } from "ente-new/photos/types/context";import type { AppProps } from "next/app";-import "photoswipe/dist/photoswipe.css";import { useCallback, useEffect, useMemo } from "react";-import "../styles/photoswipe.css";export default function App({ Component, pageProps }: AppProps) {useSetupLogs();diff --git a/web/apps/embed/src/styles/photoswipe.css b/web/apps/embed/src/styles/photoswipe.cssdeleted file mode 100644index eeeb8b2bef..0000000000--- a/web/apps/embed/src/styles/photoswipe.css+++ /dev/null@@ -1,479 +0,0 @@-.pswp-ente {- /* PhotoSwipe defaults to z-index 10000; keep it below MUI drawers. */- z-index: calc(var(--mui-zIndex-drawer) - 1);-}--.pswp-ente .pswp__top-bar {- top: calc(env(titlebar-area-height, 0px) * 0.4);-}--@media (width >= 450px) {- .pswp-ente .pswp__top-bar {- padding-top: 24px;- }-}--.pswp-ente .pswp__top-bar::before {- content: "";- position: absolute;- top: 0;- left: 0;- right: 0;- height: 125px;- background: linear-gradient(- to top,- transparent 0%,- rgb(0 0 0 / 0.05) 20%,- rgb(0 0 0 / 0.15) 40%,- rgb(0 0 0 / 0.3) 60%,- rgb(0 0 0 / 0.45) 80%,- rgb(0 0 0 / 0.6) 100%- );- pointer-events: none;- z-index: -1;-}--/* PhotoSwipe's lower-specificity rule leaves hidden buttons clickable. */-.pswp .pswp__hide-on-close button {- pointer-events: none;-}--.pswp--ui-visible .pswp__hide-on-close button {- pointer-events: auto;-}--.pswp-ente .pswp__preloader--active .pswp__icn {- opacity: 0.4;-}--.pswp-ente .pswp__error {- position: relative;- overflow: hidden;- width: 50px;- height: 60px;- display: none;- opacity: 0.85;-}--.pswp-ente .pswp__error .pswp__icn {- fill: var(--mui-palette-fixed-golden);-}--.pswp-ente .pswp__error .pswp__icn-shadow {- stroke-width: 1px;-}--.pswp-ente.pswp--ui-visible .pswp__hide-on-close.pswp__button--arrow {- opacity: 0.85;-}--.pswp-ente .pswp__error--active {- display: initial;-}--.pswp-ente .pswp__counter {- margin-top: 22.5px;- margin-inline-start: 18px;- margin-inline-end: 9px;- line-height: 20px;-}--@media (width >= 450px) {- .pswp-ente .pswp__counter {- margin-top: 22px;- margin-inline-start: 44px;- }-}--.pswp-ente .pswp__button--zoom .pswp__icn {- top: 16px;- transform: scale(0.85);-}--.pswp-ente.pswp--one-slide .pswp__top-bar .pswp__button--zoom {- margin-left: 4px;-}--@media (width >= 450px) {- .pswp-ente.pswp--one-slide .pswp__top-bar .pswp__button--zoom {- margin-left: 28px;- }-}--.pswp-ente .pswp__preloader {- transform: translate(-2px, 2px);-}--.pswp-ente .pswp__error {- transform: translate(-2px, 2px);-}--.pswp-ente .pswp__button--close .pswp__icn {- transform: translate(-6px, 0) scale(0.925);-}--.pswp-ente .pswp__button--close {- margin-right: 2px;-}--.pswp-ente .pswp__top-bar .pswp__icn-shadow {- stroke-width: 0;-}--@media (width >= 450px) {- .pswp-ente .pswp__top-bar .pswp__button {- margin-left: 8px;- }-- .pswp-ente .pswp__button--close {- margin-right: 20px;- }-}--.pswp-ente .pswp__button--arrow--prev .pswp__icn {- transform: scale(0.8);-}--.pswp-ente .pswp__button--arrow--next .pswp__icn {- transform: scale(-0.8, 0.8);-}--.pswp-ente button.pswp-ente-off .pswp__icn {- fill: rgb(255 255 255 / 0.6);-}--@media (width < 450px) {- .pswp-ente .pswp__button {- width: 44px;- }-- .pswp-ente .pswp__counter {- margin-inline-start: 10px;- margin-inline-end: 0;- }-- .pswp-ente .pswp__button--close {- margin-right: -2px;- }-}--@media (width < 350px) {- .pswp-ente .pswp__button {- width: 42px;- }-- .pswp-ente .pswp__counter {- margin-inline-start: 4px;- }-- .pswp-ente .pswp__button--close {- margin-right: -4px;- }-}--.pswp-ente .pswp__caption {- border-radius: 3px;- color: rgb(255 255 255 / 0.85);- max-width: 375px;- max-height: 200px;- p {- margin: 12px 17px;- word-break: break-word;- overflow: hidden;- text-overflow: ellipsis;- display: -webkit-box;- -webkit-box-orient: vertical;- -webkit-line-clamp: 4;- line-clamp: 4;- }-}--@media (width >= 450px) {- .pswp-ente .pswp__caption {- max-width: 40%;- }-}--.pswp-ente .pswp__caption.ente-video {- background-color: rgb(0 0 0 / 0.2);- backdrop-filter: blur(10px);- border-radius: 16px;- p {- -webkit-line-clamp: 2;- line-clamp: 2;- }-}--.pswp-ente .pswp__caption-more {- color: white;- text-decoration: underline;- cursor: pointer;-}--.pswp-ente .pswp__caption p:has(.pswp__caption-more) {- display: block;- -webkit-line-clamp: unset;- line-clamp: unset;-}--.pswp-ente .pswp__img {- cursor: auto;-}--.pswp-ente video[controls] {- width: 100%;- height: 100%;-}--.pswp-ente media-controller.ente-vanilla-video {- width: 100%;- height: 100%;-- video {- /* The one-pixel inset prevents fractional-size flicker in Chrome. HLS video does not need it. */- width: calc(100% - 1px);- height: calc(100% - 1px);- }-}--.pswp-ente .pswp__media-controls {- position: absolute;- bottom: 0px;- left: 0px;- right: 0px;- background: linear-gradient(transparent, rgb(0 0 0 / 0.8));- --media-icon-color: rgb(255 255 255 / 0.8);- --media-font-family: "Inter Variable", sans-serif;- --media-control-background: transparent;- --media-control-hover-background: rgb(255 255 255 / 0.12);- /*- * These controls sit outside media-controller, a layout Media Chrome does not officially support.- * The height overrides stop hidden menus from intercepting clicks. Recheck them when upgrading media-chrome.- */- --media-menu-hidden-max-height: 1px;- --media-menu-max-height: 1000px;-}--.pswp-ente .pswp__media-controls > div {- display: flex;- flex-direction: column;-}--media-control-bar:not([mediacontroller]) {- display: none;-}--media-control-bar {- padding-inline: 12px;-}--media-control-bar:last-child {- padding-block-end: 4px;-}--media-loading-indicator {- --media-icon-color: rgb(255 255 255 / 0.6);-}--media-text-display {- flex-grow: 1;-}--media-time-range {- --media-range-bar-color: red;- --media-range-thumb-background: var(--media-range-bar-color);- --media-control-hover-background: transparent;- --media-control-padding: 0px;-}--media-time-range:hover {- --media-range-track-height: 5px;- --media-range-thumb-transform: scale(1.1);-}--media-pip-button[mediapipunavailable],-media-fullscreen-button[mediafullscreenunavailable] {- display: none;-}--media-settings-menu {- --media-control-background: var(--mui-palette-fixed-dark-background-paper);- --media-font-weight: 500;- z-index: 1;-}--body:has(- media-time-range[mediapreviewtime],- media-settings-menu:not([hidden])-) {- & .pswp-ente .pswp__bottom-right-controls {- display: none;- }-}--.pswp-ente.pswp--video-fullscreen .pswp__top-bar,-.pswp-ente.pswp--video-fullscreen .pswp__button--arrow {- display: none !important;-}--.pswp-ente.pswp--video-fullscreen .pswp__media-controls {- opacity: 0;- transition: opacity 0.3s ease;-}--.pswp-ente.pswp--video-fullscreen .pswp__media-controls:hover,-.pswp-ente.pswp--video-fullscreen:has(media-settings-menu:not([hidden]))- .pswp__media-controls {- opacity: 1;-}--.pswp-ente.pswp--video-fullscreen.pswp--controls-visible .pswp__media-controls {- opacity: 1;-}--.pswp-ente.pswp--video-fullscreen .pswp__bottom-right-controls {- display: none;-}--.pswp-ente .pswp__bottom-right-controls {- position: absolute;- bottom: 20px;- right: 24px;- display: flex;- flex-direction: column-reverse;- align-items: flex-end;- gap: 12px;-}--.pswp-ente .pswp__bottom-right-controls::before {- content: "";- position: absolute;- bottom: -20px;- left: -24px;- right: -24px;- height: 225px;- background: linear-gradient(- to bottom,- transparent 0%,- rgb(0 0 0 / 0.05) 20%,- rgb(0 0 0 / 0.15) 40%,- rgb(0 0 0 / 0.3) 60%,- rgb(0 0 0 / 0.45) 80%,- rgb(0 0 0 / 0.6) 100%- );- pointer-events: none;- z-index: -1;-}--@media (width >= 450px) {- .pswp-ente .pswp__bottom-right-controls {- bottom: 40px;- left: 28px;- right: 44px;- flex-direction: row;- align-items: flex-end;- gap: 24px;- }-- .pswp-ente .pswp__bottom-right-controls::before {- bottom: -40px;- left: -28px;- right: -44px;- }-}--.pswp-ente .pswp__bottom-right-controls:has(.pswp__caption.ente-video) {- bottom: 100px;-}--.pswp-ente .pswp__bottom-right-controls:has(.pswp__caption.ente-video)::before {- display: none;-}--.pswp-ente- .pswp__bottom-right-controls:has(- .pswp__caption[style*="display: none"]- )::before {- display: none;-}--.pswp-ente .pswp__action-buttons {- display: flex;- flex-direction: row;- gap: 20px;- margin-left: auto;-}--.pswp-ente .pswp__action-button {- width: 56px;- height: 56px;- border-radius: 50%;- background-color: rgb(0 0 0 / 0.6);- border: 1px solid rgb(255 255 255 / 0.2);- cursor: pointer;- display: flex;- align-items: center;- justify-content: center;- transition: background-color 0.2s ease;-}--.pswp-ente .pswp__action-button:hover {- background-color: rgb(0 0 0 / 0.8);-}--.pswp-ente .pswp__action-button svg {- width: 28px;- height: 28px;- fill: white;-}--.pswp-ente .pswp__action-button--comment {- position: relative;-}--.pswp-ente .pswp__comment-count {- position: absolute;- top: -6px;- right: -6px;- width: 24px;- height: 24px;- border-radius: 50%;- background-color: #fff;- color: #000;- font-family: "Inter Variable", sans-serif;- font-size: 12px;- font-weight: 600;- line-height: 24px;- text-align: center;- display: none;-}--.pswp-ente .pswp__comment-count:not(:empty) {- display: block;-}--@media (width < 450px) {- .pswp-ente .pswp__bottom-right-controls {- bottom: 12px;- left: 12px;- right: 12px;- }-- .pswp-ente .pswp__bottom-right-controls::before {- bottom: -12px;- left: -12px;- right: -12px;- }-}--#pswp__icn-heart-fill {- display: none;-}--#pswp__icn-heart-fill:not(.pswp__hidden) {- display: inline;-}--#pswp__icn-heart.pswp__hidden {- display: none;-}