fix: Enable management of notifications without SMTP configured
closes #6046
This commit is contained in:
@@ -139,45 +139,15 @@ function Notifications() {
|
|||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
{env.EMAIL_ENABLED ? (
|
{env.EMAIL_ENABLED ? (
|
||||||
<>
|
<SettingRow
|
||||||
<SettingRow
|
label={t("Email address")}
|
||||||
label={t("Email address")}
|
name="email"
|
||||||
name="email"
|
description={t(
|
||||||
description={t(
|
"Your email address should be updated in your SSO provider."
|
||||||
"Your email address should be updated in your SSO provider."
|
)}
|
||||||
)}
|
>
|
||||||
>
|
<Input type="email" value={user.email} readOnly />
|
||||||
<Input type="email" value={user.email} readOnly />
|
</SettingRow>
|
||||||
</SettingRow>
|
|
||||||
|
|
||||||
<h2>{t("Notifications")}</h2>
|
|
||||||
|
|
||||||
{options.map((option) => {
|
|
||||||
const setting = user.subscribedToEventType(option.event);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<SettingRow
|
|
||||||
key={option.event}
|
|
||||||
visible={option.visible}
|
|
||||||
label={
|
|
||||||
<Flex align="center" gap={4}>
|
|
||||||
{option.icon} {option.title}
|
|
||||||
</Flex>
|
|
||||||
}
|
|
||||||
name={option.event}
|
|
||||||
description={option.description}
|
|
||||||
>
|
|
||||||
<Switch
|
|
||||||
key={option.event}
|
|
||||||
id={option.event}
|
|
||||||
name={option.event}
|
|
||||||
checked={!!setting}
|
|
||||||
onChange={handleChange}
|
|
||||||
/>
|
|
||||||
</SettingRow>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</>
|
|
||||||
) : (
|
) : (
|
||||||
<Notice>
|
<Notice>
|
||||||
<Trans>
|
<Trans>
|
||||||
@@ -187,6 +157,34 @@ function Notifications() {
|
|||||||
</Trans>
|
</Trans>
|
||||||
</Notice>
|
</Notice>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<h2>{t("Notifications")}</h2>
|
||||||
|
|
||||||
|
{options.map((option) => {
|
||||||
|
const setting = user.subscribedToEventType(option.event);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SettingRow
|
||||||
|
key={option.event}
|
||||||
|
visible={option.visible}
|
||||||
|
label={
|
||||||
|
<Flex align="center" gap={4}>
|
||||||
|
{option.icon} {option.title}
|
||||||
|
</Flex>
|
||||||
|
}
|
||||||
|
name={option.event}
|
||||||
|
description={option.description}
|
||||||
|
>
|
||||||
|
<Switch
|
||||||
|
key={option.event}
|
||||||
|
id={option.event}
|
||||||
|
name={option.event}
|
||||||
|
checked={!!setting}
|
||||||
|
onChange={handleChange}
|
||||||
|
/>
|
||||||
|
</SettingRow>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</Scene>
|
</Scene>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user