yarn pretty
This commit is contained in:
@@ -35,4 +35,4 @@ be specific to your distro (e.g. `xdg-desktop-menu forceupdate`).
|
|||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
>
|
>
|
||||||
> If you're using an AppImage and not seeing the icon, you'll need to
|
> 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).
|
> [enable AppImage desktop integration](/photos/troubleshooting/desktop-install/#appimage-desktop-integration).
|
||||||
|
|||||||
@@ -112,4 +112,4 @@ ip addr add 10.10.10.1/24 dev dummy0
|
|||||||
ip link set dummy0 up
|
ip link set dummy0 up
|
||||||
```
|
```
|
||||||
|
|
||||||
Once the interface is up, Ente correctly detects that the system is online.
|
Once the interface is up, Ente correctly detects that the system is online.
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import LockOutlinedIcon from "@mui/icons-material/LockOutlined";
|
|||||||
import NorthEastIcon from "@mui/icons-material/NorthEast";
|
import NorthEastIcon from "@mui/icons-material/NorthEast";
|
||||||
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
||||||
import {
|
import {
|
||||||
Alert,
|
|
||||||
Box,
|
Box,
|
||||||
Dialog,
|
Dialog,
|
||||||
DialogContent,
|
DialogContent,
|
||||||
@@ -1030,7 +1029,6 @@ const DomainSettings: React.FC<NestedSidebarDrawerVisibilityProps> = ({
|
|||||||
|
|
||||||
// Separate component to reset state on going back.
|
// Separate component to reset state on going back.
|
||||||
const DomainSettingsContents: React.FC = () => {
|
const DomainSettingsContents: React.FC = () => {
|
||||||
const userDetails = useUserDetailsSnapshot();
|
|
||||||
const { customDomain, customDomainCNAME } = useSettingsSnapshot();
|
const { customDomain, customDomainCNAME } = useSettingsSnapshot();
|
||||||
|
|
||||||
const formik = useFormik({
|
const formik = useFormik({
|
||||||
@@ -1046,6 +1044,8 @@ const DomainSettingsContents: React.FC = () => {
|
|||||||
log.error(`Failed to submit input ${domain}`, e);
|
log.error(`Failed to submit input ${domain}`, e);
|
||||||
if (isHTTPErrorWithStatus(e, 400)) {
|
if (isHTTPErrorWithStatus(e, 400)) {
|
||||||
setValueFieldError(pt("Invalid domain"));
|
setValueFieldError(pt("Invalid domain"));
|
||||||
|
} else if (isHTTPErrorWithStatus(e, 402)) {
|
||||||
|
setValueFieldError(t("sharing_disabled_for_free_accounts"));
|
||||||
} else if (isHTTPErrorWithStatus(e, 409)) {
|
} else if (isHTTPErrorWithStatus(e, 409)) {
|
||||||
setValueFieldError(pt("Domain already linked by a user"));
|
setValueFieldError(pt("Domain already linked by a user"));
|
||||||
} else {
|
} else {
|
||||||
@@ -1055,16 +1055,8 @@ const DomainSettingsContents: React.FC = () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const disableShare =
|
|
||||||
!userDetails || !isSubscriptionActivePaid(userDetails.subscription);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack sx={{ px: 2, py: "12px" }}>
|
<Stack sx={{ px: 2, py: "12px" }}>
|
||||||
{disableShare && (
|
|
||||||
<Alert severity="warning">
|
|
||||||
{t("sharing_disabled_for_free_accounts")}
|
|
||||||
</Alert>
|
|
||||||
)}
|
|
||||||
<DomainItem title={pt("Link your domain")} ordinal={pt("1")}>
|
<DomainItem title={pt("Link your domain")} ordinal={pt("1")}>
|
||||||
<form onSubmit={formik.handleSubmit}>
|
<form onSubmit={formik.handleSubmit}>
|
||||||
<TextField
|
<TextField
|
||||||
@@ -1075,7 +1067,7 @@ const DomainSettingsContents: React.FC = () => {
|
|||||||
fullWidth
|
fullWidth
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
margin="dense"
|
margin="dense"
|
||||||
disabled={disableShare || formik.isSubmitting}
|
disabled={formik.isSubmitting}
|
||||||
error={!!formik.errors.domain}
|
error={!!formik.errors.domain}
|
||||||
helperText={
|
helperText={
|
||||||
formik.errors.domain ??
|
formik.errors.domain ??
|
||||||
@@ -1088,7 +1080,6 @@ const DomainSettingsContents: React.FC = () => {
|
|||||||
<LoadingButton
|
<LoadingButton
|
||||||
fullWidth
|
fullWidth
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={disableShare}
|
|
||||||
loading={formik.isSubmitting}
|
loading={formik.isSubmitting}
|
||||||
color="accent"
|
color="accent"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user