π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Skip on our own prod
Manav Rathi57a674fd2693
diff --git a/web/apps/photos/src/pages/index.tsx b/web/apps/photos/src/pages/index.tsxindex e359e572de..5c50e1de48 100644--- a/web/apps/photos/src/pages/index.tsx+++ b/web/apps/photos/src/pages/index.tsx@@ -162,6 +162,9 @@ const TappableContainer: React.FC<React.PropsWithChildren> = ({ children }) => {const handleClick: React.MouseEventHandler = (event) => {console.log("click", tapCount, event, event.target);+ // Don't allow this when runinng on (e.g.) web.ente.io.+ if (!shouldAllowChangingAPIOrigin()) return;+// Ignore clicks on buttons when counting up towards 7.if (event.target instanceof HTMLButtonElement) return;@@ -202,6 +205,15 @@ const TappableContainer_ = styled("div")`}`;+/**+ * Disable the ability to set the custom server when we're running on our own+ * production deployment.+ */+const shouldAllowChangingAPIOrigin = () => {+ const hostname = new URL(window.location.origin).hostname;+ return !(hostname.endsWith(".ente.io") || hostname.endsWith(".ente.sh"));+};+const SlideContainer = styled("div")`flex: 1;display: flex;