From 0eb56a84376c2306baff877a7814374c6fda390b Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Wed, 13 Aug 2025 12:31:43 +0530 Subject: [PATCH] yarn pretty --- docs/docs/photos/faq/desktop.md | 2 +- .../troubleshooting/desktop-install/index.md | 2 +- web/apps/photos/src/components/Sidebar.tsx | 15 +++------------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/docs/docs/photos/faq/desktop.md b/docs/docs/photos/faq/desktop.md index f590c956a9..b705bedfc4 100644 --- a/docs/docs/photos/faq/desktop.md +++ b/docs/docs/photos/faq/desktop.md @@ -35,4 +35,4 @@ be specific to your distro (e.g. `xdg-desktop-menu forceupdate`). > [!NOTE] > > If you're using an AppImage and not seeing the icon, you'll need to -> [enable AppImage desktop integration](/photos/troubleshooting/desktop-install/#appimage-desktop-integration). \ No newline at end of file +> [enable AppImage desktop integration](/photos/troubleshooting/desktop-install/#appimage-desktop-integration). diff --git a/docs/docs/photos/troubleshooting/desktop-install/index.md b/docs/docs/photos/troubleshooting/desktop-install/index.md index 85e6cb5e62..8543b78e34 100644 --- a/docs/docs/photos/troubleshooting/desktop-install/index.md +++ b/docs/docs/photos/troubleshooting/desktop-install/index.md @@ -112,4 +112,4 @@ ip addr add 10.10.10.1/24 dev dummy0 ip link set dummy0 up ``` -Once the interface is up, Ente correctly detects that the system is online. \ No newline at end of file +Once the interface is up, Ente correctly detects that the system is online. diff --git a/web/apps/photos/src/components/Sidebar.tsx b/web/apps/photos/src/components/Sidebar.tsx index 729b332ed3..11abfe7e9e 100644 --- a/web/apps/photos/src/components/Sidebar.tsx +++ b/web/apps/photos/src/components/Sidebar.tsx @@ -9,7 +9,6 @@ import LockOutlinedIcon from "@mui/icons-material/LockOutlined"; import NorthEastIcon from "@mui/icons-material/NorthEast"; import VisibilityOffIcon from "@mui/icons-material/VisibilityOff"; import { - Alert, Box, Dialog, DialogContent, @@ -1030,7 +1029,6 @@ const DomainSettings: React.FC = ({ // Separate component to reset state on going back. const DomainSettingsContents: React.FC = () => { - const userDetails = useUserDetailsSnapshot(); const { customDomain, customDomainCNAME } = useSettingsSnapshot(); const formik = useFormik({ @@ -1046,6 +1044,8 @@ const DomainSettingsContents: React.FC = () => { log.error(`Failed to submit input ${domain}`, e); if (isHTTPErrorWithStatus(e, 400)) { setValueFieldError(pt("Invalid domain")); + } else if (isHTTPErrorWithStatus(e, 402)) { + setValueFieldError(t("sharing_disabled_for_free_accounts")); } else if (isHTTPErrorWithStatus(e, 409)) { setValueFieldError(pt("Domain already linked by a user")); } else { @@ -1055,16 +1055,8 @@ const DomainSettingsContents: React.FC = () => { }, }); - const disableShare = - !userDetails || !isSubscriptionActivePaid(userDetails.subscription); - return ( - {disableShare && ( - - {t("sharing_disabled_for_free_accounts")} - - )}
{ fullWidth autoFocus={true} margin="dense" - disabled={disableShare || formik.isSubmitting} + disabled={formik.isSubmitting} error={!!formik.errors.domain} helperText={ formik.errors.domain ?? @@ -1088,7 +1080,6 @@ const DomainSettingsContents: React.FC = () => {