Made changes as requested in PR.
This commit is contained in:
1 parent
cf344b1809
commit
6ba52156b8
3 files changed
+9
-3
No files matched your search
@@ -13,6 +13,7 @@ import { useNavigate } from "react-router-dom";
|
|||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import { usePauseMonitor } from "../../Hooks/useMonitorControls";
|
import { usePauseMonitor } from "../../Hooks/useMonitorControls";
|
||||||
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
|
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MonitorDetailsControlHeader component displays the control header for monitor details.
|
* MonitorDetailsControlHeader component displays the control header for monitor details.
|
||||||
@@ -36,6 +37,7 @@ const MonitorDetailsControlHeader = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation();
|
||||||
const [pauseMonitor, isPausing, error] = usePauseMonitor({
|
const [pauseMonitor, isPausing, error] = usePauseMonitor({
|
||||||
monitorId: monitor?._id,
|
monitorId: monitor?._id,
|
||||||
triggerUpdate,
|
triggerUpdate,
|
||||||
@@ -60,12 +62,12 @@ const MonitorDetailsControlHeader = ({
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="accent"
|
color="secondary"
|
||||||
loading={isSending}
|
loading={isSending}
|
||||||
startIcon={<EmailIcon />}
|
startIcon={<EmailIcon />}
|
||||||
onClick={sendTestEmail}
|
onClick={sendTestEmail}
|
||||||
>
|
>
|
||||||
Test e-mail
|
{t("sendTestEmail")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ const useSendTestEmail = () => {
|
|||||||
throw new Error("Failed to send test email");
|
throw new Error("Failed to send test email");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
createToast({
|
||||||
|
body: "Failed to send test email",
|
||||||
|
});
|
||||||
setError(error);
|
setError(error);
|
||||||
} finally {
|
} finally {
|
||||||
setIsSending(false);
|
setIsSending(false);
|
||||||
|
|||||||
@@ -536,5 +536,6 @@
|
|||||||
"passwordRequirements": "New password must contain at least 8 characters and must have at least one uppercase letter, one lowercase letter, one number and one special character.",
|
"passwordRequirements": "New password must contain at least 8 characters and must have at least one uppercase letter, one lowercase letter, one number and one special character.",
|
||||||
"saving": "Saving..."
|
"saving": "Saving..."
|
||||||
},
|
},
|
||||||
"uptimeCreateSelectURL": "Enter the URL or IP to monitor (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard."
|
"uptimeCreateSelectURL": "Enter the URL or IP to monitor (e.g., https://example.com/ or 192.168.1.100) and add a clear display name that appears on the dashboard.",
|
||||||
|
"sendTestEmail": "Send test email"
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user