diff --git a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx index b772a8101d..88e3088b38 100644 --- a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx +++ b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx @@ -2,6 +2,7 @@ import { TitledMiniDialog } from "@/base/components/MiniDialog"; import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator"; import log from "@/base/log"; import type { Collection } from "@/media/collection"; +import { useSettingsSnapshot } from "@/new/photos/components/utils/use-snapshot"; import { photosDialogZIndex } from "@/new/photos/components/utils/z-index"; import { publishCastPayload, @@ -34,12 +35,18 @@ export const AlbumCastDialog: React.FC = ({ onClose, collection, }) => { + const { castURL } = useSettingsSnapshot(); + const [view, setView] = useState< "choose" | "auto" | "pin" | "auto-cast-error" >("choose"); 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"). + const castHost = new URL(castURL).host; + useEffect(() => { // Determine if Chromecast is supported by the current browser // (effectively, only Chrome). @@ -177,14 +184,9 @@ export const AlbumCastDialog: React.FC = ({ - ), + a: , }} - values={{ url: "cast.ente.io" }} + values={{ url: castHost }} /> {t("enter_cast_pin_code")}