π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Move web app defaults to ente.com
Manav Rathi4be3ef1f058a
diff --git a/web/README.md b/web/README.mdindex 8a24aff8b4..2200092fd8 100644--- a/web/README.md+++ b/web/README.md@@ -4,10 +4,10 @@ Source code for Ente's various web apps and supporting websites.Live versions are at:-- Ente Photos: [web.ente.io](https://web.ente.io)-- Ente Albums: [albums.ente.io](https://albums.ente.io)-- Ente Auth: [auth.ente.io](https://auth.ente.io)-- Ente Locker: [locker.ente.io](https://locker.ente.io)+- Ente Photos: [photos.ente.com](https://photos.ente.com)+- Ente Albums: [albums.ente.com](https://albums.ente.com)+- Ente Auth: [auth.ente.com](https://auth.ente.com)+- Ente Locker: [locker.ente.com](https://locker.ente.com)To know more about Ente, see [our main README](../README.md) or visit[ente.com](https://ente.com).diff --git a/web/apps/accounts/src/pages/index.tsx b/web/apps/accounts/src/pages/index.tsxindex cb6d2b20f1..9f8274d900 100644--- a/web/apps/accounts/src/pages/index.tsx+++ b/web/apps/accounts/src/pages/index.tsx@@ -3,7 +3,7 @@ import React, { useEffect } from "react";const Page: React.FC = () => {useEffect(() => {// There are no user navigable pages currently on accounts.ente.io.- window.location.href = "https://web.ente.io";+ window.location.href = "https://ente.com";}, []);return <></>;diff --git a/web/apps/accounts/src/services/passkey.ts b/web/apps/accounts/src/services/passkey.tsindex db274b06b7..71fddac872 100644--- a/web/apps/accounts/src/services/passkey.ts+++ b/web/apps/accounts/src/services/passkey.ts@@ -379,6 +379,7 @@ export const shouldRestrictToWhitelistedRedirect = () => {const _isWhitelistedRedirect = (redirectURL: URL) =>(isDevBuild && redirectURL.hostname.endsWith("localhost")) ||+ redirectURL.host.endsWith(".ente.com") ||redirectURL.host.endsWith(".ente.io") ||redirectURL.host.endsWith(".ente.sh");diff --git a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsxindex c39fd59d87..f9e6b01d37 100644--- a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx+++ b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx@@ -253,7 +253,7 @@ export default function PublicAlbumPage() {});/**- * Check if we need to redirect Trip albums from custom domains to albums.ente.io+ * Check if we need to redirect Trip albums from custom domains to albums.ente.com* Returns true if a redirect was initiated, false otherwise.* Reason: custom domains do not support the Trip layout fully*/diff --git a/web/apps/auth/src/pages/_app.tsx b/web/apps/auth/src/pages/_app.tsxindex 28792966c3..befe99fede 100644--- a/web/apps/auth/src/pages/_app.tsx+++ b/web/apps/auth/src/pages/_app.tsx@@ -47,7 +47,7 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {return (<ThemeProvider theme={authTheme}>- <CustomHead {...{ title }} />+ <CustomHead title={title} canonicalURL="https://auth.ente.com" /><CssBaseline enableColorScheme /><AttributedMiniDialog {...miniDialogProps} />diff --git a/web/apps/auth/src/pages/login.tsx b/web/apps/auth/src/pages/login.tsxindex 2dc68b5557..fd91ebda9d 100644--- a/web/apps/auth/src/pages/login.tsx+++ b/web/apps/auth/src/pages/login.tsx@@ -45,7 +45,7 @@ const Page: React.FC = () => {const onSignUp = useCallback(() => void router.push("/signup"), [router]);const handleBackgroundClick: React.MouseEventHandler = (event) => {- // Don't allow this when running on (e.g.) web.ente.io.+ // Don't allow this when running on (e.g.) auth.ente.com.if (!shouldAllowChangingAPIOrigin()) return;// Only count clicks directly on the background@@ -116,5 +116,9 @@ export default Page;*/const shouldAllowChangingAPIOrigin = () => {const hostname = new URL(window.location.origin).hostname;- return !(hostname.endsWith(".ente.io") || hostname.endsWith(".ente.sh"));+ return !(+ hostname.endsWith(".ente.com") ||+ hostname.endsWith(".ente.io") ||+ hostname.endsWith(".ente.sh")+ );};diff --git a/web/apps/locker/src/components/CreateItemDialog.tsx b/web/apps/locker/src/components/CreateItemDialog.tsxindex da8410ccf8..0ef73673ac 100644--- a/web/apps/locker/src/components/CreateItemDialog.tsx+++ b/web/apps/locker/src/components/CreateItemDialog.tsx@@ -280,7 +280,7 @@ export const CreateItemDialog: React.FC<CreateItemDialogProps> = ({components={{cta: (<Link- href="https://web.ente.io"+ href="https://photos.ente.com"target="_blank"rel="noopener"underline="always"diff --git a/web/apps/locker/src/components/LockerHead.tsx b/web/apps/locker/src/components/LockerHead.tsxindex 726eb366e8..20a195ec91 100644--- a/web/apps/locker/src/components/LockerHead.tsx+++ b/web/apps/locker/src/components/LockerHead.tsx@@ -1,7 +1,7 @@import Head from "next/head";import React from "react";-const url = "https://locker.ente.io";+const url = "https://locker.ente.com";const title = "Ente Locker";const description ="Store your important documents and credentials. Share them with trusted contacts or pass them on in emergencies.";@@ -12,6 +12,7 @@ export const LockerHead: React.FC = () => (<Head><title>{title}</title><meta name="description" content={description} />+ <link rel="canonical" href={url} /><link rel="icon" type="image/png" href="/images/favicon.png" /><meta name="twitter:site" content="@enteio" /><meta property="og:type" content="website" />diff --git a/web/apps/memories/src/pages/_app.tsx b/web/apps/memories/src/pages/_app.tsxindex 4dab3cd239..1610f059fb 100644--- a/web/apps/memories/src/pages/_app.tsx+++ b/web/apps/memories/src/pages/_app.tsx@@ -13,7 +13,7 @@ const memoriesAppStyle = { "--font-itim": "'Itim'" } as React.CSSProperties;const memoriesAppTitle = "Ente Memories";function MemoriesAppHead() {- const previewImage = "https://memories.ente.io/images/memories-meta.png";+ const previewImage = "https://memories.ente.com/images/memories-meta.png";return (<>diff --git a/web/apps/memories/src/services/public-memory-page.ts b/web/apps/memories/src/services/public-memory-page.tsindex 4eab802f27..6d8ec5840c 100644--- a/web/apps/memories/src/services/public-memory-page.ts+++ b/web/apps/memories/src/services/public-memory-page.ts@@ -1,6 +1,5 @@import { isHTTPErrorWithStatus } from "ente-base/http";import log from "ente-base/log";-import { memoriesAppOrigin } from "ente-base/origins";import type { EnteFile } from "ente-media/file";import { alignLaneFilesWithMetadata } from "../utils/lane";import {@@ -38,7 +37,7 @@ export const loadPublicMemoryPage = async (const accessToken = extractAccessTokenFromURL(currentURL);if (!accessToken) {- return { kind: "redirect", redirectURL: memoriesAppOrigin() };+ return { kind: "redirect", redirectURL: "https://ente.com" };}const shareKey = await extractMemoryShareKeyFromURL(currentURL);diff --git a/web/apps/payments/README.md b/web/apps/payments/README.mdindex 2670a761a9..71071972c1 100644--- a/web/apps/payments/README.md+++ b/web/apps/payments/README.md@@ -1,6 +1,6 @@# Payments-Code that runs on `payments.ente.io`. It brokers between our services and+Code that runs on `payments.ente.com`. It brokers between our services andStripe's API for payments.## Development@@ -22,7 +22,7 @@ Add the following to `web/apps/photos/.env.local`:NEXT_PUBLIC_ENTE_ENDPOINT = http://localhost:8080```-Modify "https://payments.ente.io" to "http://localhost:3001".+Modify "https://payments.ente.com" to "http://localhost:3001".Then start it locallydiff --git a/web/apps/payments/index.html b/web/apps/payments/index.htmlindex 8cfdfef15b..70c5e45611 100644--- a/web/apps/payments/index.html+++ b/web/apps/payments/index.html@@ -3,7 +3,7 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />- <title>Payments | ente.io</title>+ <title>Payments | ente.com</title></head><body><div id="root"></div>diff --git a/web/apps/photos/.env b/web/apps/photos/.envindex 4885463516..bcabe0dc3e 100644--- a/web/apps/photos/.env+++ b/web/apps/photos/.env@@ -57,7 +57,7 @@# The URL for the photos app deployment#-# The default is "https://web.ente.io", but this can be customized for local+# The default is "https://photos.ente.com", but this can be customized for local# development or self-hosting. For example, you can set this to# http://localhost:3000 when developing locally.#diff --git a/web/apps/photos/.env.development b/web/apps/photos/.env.developmentindex b11f779997..9d4faa5400 100644--- a/web/apps/photos/.env.development+++ b/web/apps/photos/.env.development@@ -20,6 +20,6 @@#NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT = http://localhost:3002# If you also want to customize the photos app origin (defaults to-# https://web.ente.io), you can uncomment this:+# https://photos.ente.com), you can uncomment this:#NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT = http://localhost:3000diff --git a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsxindex 2c1946fbff..20115039e9 100644--- a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx+++ b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx@@ -80,7 +80,7 @@ export const AlbumCastDialogContents: React.FC<AlbumCastDialogProps> = ({const [browserCanCast, setBrowserCanCast] = useState(false);// The link to the cast app is to the full URL, but in the link text only- // show the host (e.g. for "https://cast.ente.io", show "cast.ente.io").+ // show the host (e.g. for "https://cast.ente.com", show "cast.ente.com").const castHost = new URL(castURL).host;useEffect(() => {diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsxindex 41e3c992eb..112fa73ca1 100644--- a/web/apps/photos/src/components/Collections/CollectionShare.tsx+++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx@@ -1802,7 +1802,7 @@ const ManagePublicShareOptions: React.FC<ManagePublicShareOptionsProps> = ({const embedURL = resolvedURL? resolvedURL.replace(new URL(resolvedURL).origin,- embedBaseURL || "https://embed.ente.io",+ embedBaseURL || "https://embed.ente.com",): undefined;const iframeHTML = embedURLdiff --git a/web/apps/photos/src/pages/_app.tsx b/web/apps/photos/src/pages/_app.tsxindex a9bf3ff361..7f612b6a71 100644--- a/web/apps/photos/src/pages/_app.tsx+++ b/web/apps/photos/src/pages/_app.tsx@@ -194,7 +194,7 @@ const App: React.FC<PhotosAppProps> = ({ Component, pageProps }) => {return (<ThemeProvider theme={photosTheme}>- <CustomHead {...{ title }} />+ <CustomHead title={title} canonicalURL="https://photos.ente.com" /><CssBaseline enableColorScheme /><ThemedLoadingBar ref={loadingBarRef} />diff --git a/web/apps/photos/src/pages/index.tsx b/web/apps/photos/src/pages/index.tsxindex 93de39bb25..546864babd 100644--- a/web/apps/photos/src/pages/index.tsx+++ b/web/apps/photos/src/pages/index.tsx@@ -206,7 +206,7 @@ const TappableContainer: React.FC<const [showDevSettings, setShowDevSettings] = useState(false);const handleClick: React.MouseEventHandler = (event) => {- // Don't allow this when running on (e.g.) web.ente.io.+ // Don't allow this when running on (e.g.) photos.ente.com.if (!shouldAllowChangingAPIOrigin()) return;// Ignore clicks on buttons when counting up towards 7.@@ -255,7 +255,11 @@ const TappableContainer: React.FC<*/const shouldAllowChangingAPIOrigin = () => {const hostname = new URL(window.location.origin).hostname;- return !(hostname.endsWith(".ente.io") || hostname.endsWith(".ente.sh"));+ return !(+ hostname.endsWith(".ente.com") ||+ hostname.endsWith(".ente.io") ||+ hostname.endsWith(".ente.sh")+ );};const SlideshowPanel = styled("div")`diff --git a/web/docs/deploy.md b/web/docs/deploy.mdindex 08ca71343d..cacc6201ab 100644--- a/web/docs/deploy.md+++ b/web/docs/deploy.md@@ -16,17 +16,16 @@ Cloudflare Pages using GitHub workflows.Here is a list of all the deployments, whether or not they are productiondeployments, and the action that triggers them:-| URL | Type | Deployment action |-| -------------------------------------------- | ---------- | ------------------------------------------- |-| [web.ente.io](https://web.ente.io) | Production | Daily deploy of `main` |-| [photos.ente.io](https://photos.ente.io) | Production | Alias of [web.ente.io](https://web.ente.io) |-| [albums.ente.io](https://albums.ente.io) | Production | Daily deploy of `main` |-| [auth.ente.io](https://auth.ente.io) | Production | Daily deploy of `main` |-| [accounts.ente.io](https://accounts.ente.io) | Production | Daily deploy of `main` |-| [cast.ente.io](https://cast.ente.io) | Production | Daily deploy of `main` |-| [payments.ente.io](https://payments.ente.io) | Production | Daily deploy of `main` |-| [ente.com/help](https://ente.com/help) | Production | Changes in `docs/` on push to `main` |-| [staff.ente.sh](https://staff.ente.sh) | Production | Changes in `infra/staff` on push to `main` |+| URL | Type | Deployment action |+| ---------------------------------------------- | ---------- | ------------------------------------------ |+| [photos.ente.com](https://photos.ente.com) | Production | Daily deploy of `main` |+| [albums.ente.com](https://albums.ente.com) | Production | Daily deploy of `main` |+| [auth.ente.com](https://auth.ente.com) | Production | Daily deploy of `main` |+| [accounts.ente.io](https://accounts.ente.io) | Production | Daily deploy of `main` |+| [cast.ente.com](https://cast.ente.com) | Production | Daily deploy of `main` |+| [payments.ente.com](https://payments.ente.com) | Production | Daily deploy of `main` |+| [ente.com/help](https://ente.com/help) | Production | Changes in `docs/` on push to `main` |+| [staff.ente.sh](https://staff.ente.sh) | Production | Changes in `infra/staff` on push to `main` |### Other subdomainsdiff --git a/web/packages/base/components/Head.tsx b/web/packages/base/components/Head.tsxindex 3317e5c622..75e1d24ba7 100644--- a/web/packages/base/components/Head.tsx+++ b/web/packages/base/components/Head.tsx@@ -10,6 +10,7 @@ import {interface CustomHeadProps {title: string;+ canonicalURL?: string;}const AlbumsFontPreloads: React.FC = () => (@@ -32,11 +33,13 @@ const AlbumsFontPreloads: React.FC = () => (*/export const CustomHead: React.FC<React.PropsWithChildren<CustomHeadProps>> = ({title,+ canonicalURL,children,}) => (<Head>{children}<title>{title}</title>+ {canonicalURL && <link rel="canonical" href={canonicalURL} />}<link rel="icon" href="/images/favicon.png" type="image/png" /><metaname="description"@@ -73,12 +76,12 @@ export const CustomHeadAlbumsStatic: React.FC = () => (/><metaproperty="og:image"- content="https://albums.ente.io/images/preview.jpg"+ content="https://albums.ente.com/images/preview.jpg"/>{/* Twitter wants its own thing. */}<metaname="twitter:image"- content="https://albums.ente.io/images/preview.jpg"+ content="https://albums.ente.com/images/preview.jpg"/><meta name="viewport" content="width=device-width, initial-scale=1" /><meta name="referrer" content="strict-origin-when-cross-origin" />@@ -121,11 +124,11 @@ export const CustomHeadShareStatic: React.FC = () => (/><metaproperty="og:image"- content="https://share.ente.io/images/preview.png"+ content="https://share.ente.com/images/preview.png"/><metaname="twitter:image"- content="https://share.ente.io/images/preview.png"+ content="https://share.ente.com/images/preview.png"/><meta name="viewport" content="width=device-width, initial-scale=1" /><meta name="referrer" content="strict-origin-when-cross-origin" />diff --git a/web/packages/base/origins.ts b/web/packages/base/origins.tsindex 360e529ec6..f46677afee 100644--- a/web/packages/base/origins.ts+++ b/web/packages/base/origins.ts@@ -91,12 +91,12 @@ export const isCustomAlbumsAppOrigin =/*** Return the origin that serves public albums.*- * Defaults to our production instance, "https://albums.ente.io", but can be+ * Defaults to our production instance, "https://albums.ente.com", but can be* overridden by setting the `NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT` environment* variable.*/export const albumsAppOrigin = () =>- process.env.NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT ?? "https://albums.ente.io";+ process.env.NEXT_PUBLIC_ENTE_ALBUMS_ENDPOINT ?? "https://albums.ente.com";/*** Return true if this build is Ente's official public albums deployment.@@ -114,29 +114,19 @@ export const isCustomShareAppOrigin =/*** Return the origin that serves public locker (share app).*- * Defaults to our production instance, "https://share.ente.io", but can be+ * Defaults to our production instance, "https://share.ente.com", but can be* overridden by setting the `NEXT_PUBLIC_ENTE_SHARE_ENDPOINT` environment* variable.*/export const shareAppOrigin = (): string =>- process.env.NEXT_PUBLIC_ENTE_SHARE_ENDPOINT ?? "https://share.ente.io";--/**- * Return the origin/path that serves the memories app landing experience.- *- * Defaults to our production memories app, "https://ente.com",- * but can be overridden by setting the `NEXT_PUBLIC_ENTE_MEMORIES_ENDPOINT`- * environment variable.- */-export const memoriesAppOrigin = (): string =>- process.env.NEXT_PUBLIC_ENTE_MEMORIES_ENDPOINT ?? "https://ente.com";+ process.env.NEXT_PUBLIC_ENTE_SHARE_ENDPOINT ?? "https://share.ente.com";/*** Return the origin that serves the photos app.*- * Defaults to our production instance, "https://web.ente.io", but can be+ * Defaults to our production instance, "https://photos.ente.com", but can be* overridden by setting the `NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT` environment* variable.*/export const photosAppOrigin = (): string =>- process.env.NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT ?? "https://web.ente.io";+ process.env.NEXT_PUBLIC_ENTE_PHOTOS_ENDPOINT ?? "https://photos.ente.com";diff --git a/web/packages/media/collection.ts b/web/packages/media/collection.tsindex d3cc500ae1..c83407f083 100644--- a/web/packages/media/collection.ts+++ b/web/packages/media/collection.ts@@ -284,14 +284,14 @@ export interface PublicURL {* A URL that can be used access the shared collection.** This will be of the form "https://<public-albums-app>/?t=<token>", e.g.,- * "https://albums.ente.io/?t=xxxxxx".+ * "https://albums.ente.com/?t=xxxxxx".** In particular, this URL does not contain the URL fragment (the part after* the "#"). URL fragments are client side only, and not sent to remote.* They contain the decryption key.** The client can use this field to form the fully usable URL (e.g.- * "https://albums.ente.io/?t=xxxxxx#yyy...yyy") and provide it to the user+ * "https://albums.ente.com/?t=xxxxxx#yyy...yyy") and provide it to the user* for sharing.*/url: string;diff --git a/web/packages/new/photos/services/settings.ts b/web/packages/new/photos/services/settings.tsindex 1601cac11d..6d816b0845 100644--- a/web/packages/new/photos/services/settings.ts+++ b/web/packages/new/photos/services/settings.ts@@ -70,7 +70,7 @@ export interface Settings {* point to their own self hosted cast app (See `apps.cast` in `local.yaml`* in the museum code).*- * Default: "https://cast.ente.io"+ * Default: "https://cast.ente.com"*/castURL: string;@@ -81,7 +81,7 @@ export interface Settings {* point to their own self hosted embed app (See `apps.embed-albums` in* `local.yaml` in the museum code).*- * Default: "https://embed.ente.io"+ * Default: "https://embed.ente.com"*/embedURL: string;@@ -108,8 +108,8 @@ const createDefaultSettings = (): Settings => ({isInternalUser: false,mapEnabled: false,cfUploadProxyDisabled: false,- castURL: "https://cast.ente.io",- embedURL: "https://embed.ente.io",+ castURL: "https://cast.ente.com",+ embedURL: "https://embed.ente.com",customDomainCNAME: "my.ente.io",});diff --git a/web/packages/new/photos/services/user-details.ts b/web/packages/new/photos/services/user-details.tsindex 7202441633..62823074c0 100644--- a/web/packages/new/photos/services/user-details.ts+++ b/web/packages/new/photos/services/user-details.ts@@ -388,7 +388,7 @@ export const cancelStripeSubscription = async () => {return pullUserDetails();};-const paymentsAppOrigin = "https://payments.ente.io";+const paymentsAppOrigin = "https://payments.ente.com";/*** Start the flow to purchase or update a subscription by redirecting the user