mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-10 11:49:49 -06:00
Made changes as requested in PR.
This commit is contained in:
@@ -13,6 +13,7 @@ import { useNavigate } from "react-router-dom";
|
||||
import { useTheme } from "@mui/material/styles";
|
||||
import { usePauseMonitor } from "../../Hooks/useMonitorControls";
|
||||
import { useSendTestEmail } from "../../Hooks/useSendTestEmail";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
/**
|
||||
* MonitorDetailsControlHeader component displays the control header for monitor details.
|
||||
@@ -36,6 +37,7 @@ const MonitorDetailsControlHeader = ({
|
||||
}) => {
|
||||
const navigate = useNavigate();
|
||||
const theme = useTheme();
|
||||
const { t } = useTranslation();
|
||||
const [pauseMonitor, isPausing, error] = usePauseMonitor({
|
||||
monitorId: monitor?._id,
|
||||
triggerUpdate,
|
||||
@@ -60,12 +62,12 @@ const MonitorDetailsControlHeader = ({
|
||||
>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="accent"
|
||||
color="secondary"
|
||||
loading={isSending}
|
||||
startIcon={<EmailIcon />}
|
||||
onClick={sendTestEmail}
|
||||
>
|
||||
Test e-mail
|
||||
{t("sendTestEmail")}
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
|
||||
@@ -22,6 +22,9 @@ const useSendTestEmail = () => {
|
||||
throw new Error("Failed to send test email");
|
||||
}
|
||||
} catch (error) {
|
||||
createToast({
|
||||
body: "Failed to send test email",
|
||||
});
|
||||
setError(error);
|
||||
} finally {
|
||||
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.",
|
||||
"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