modify
This commit is contained in:
1 parent
77be1fc37f
commit
b4d74d370a
5 files changed
+11
-7
No files matched your search
@@ -19,10 +19,11 @@ import "./index.css";
|
||||
* @param {Array<string>} props.checks - An array of strings representing the checks to display.
|
||||
* @param {string} [props.link="/"] - The link to navigate to.
|
||||
* @param {boolean} [props.vowelStart=false] - Whether the title starts with a vowel.
|
||||
* @param {boolean} [props.showPageSpeedWarning=false] - Whether to show the PageSpeed API warning.
|
||||
* @returns {JSX.Element} The rendered fallback UI.
|
||||
*/
|
||||
|
||||
const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) => {
|
||||
const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, showPageSpeedWarning = false }) => {
|
||||
const theme = useTheme();
|
||||
const navigate = useNavigate();
|
||||
const mode = useSelector((state) => state.ui.mode);
|
||||
@@ -36,6 +37,7 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
|
||||
<Link
|
||||
href="https://docs.checkmate.so/users-guide/quickstart#env-vars-server"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
sx={{
|
||||
textDecoration: "underline",
|
||||
color: "inherit",
|
||||
@@ -45,9 +47,9 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
|
||||
}
|
||||
}}
|
||||
>
|
||||
{t("pageSpeedLearnMore")}
|
||||
{t("pageSpeedLearnMoreLink")}
|
||||
</Link>
|
||||
{" "} {t("pageSpeedAddApiKey")}
|
||||
{" "}{t("pageSpeedAddApiKey")}
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -118,7 +120,7 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
|
||||
</Button>
|
||||
|
||||
{/* Warning box for PageSpeed monitor */}
|
||||
{title === "pagespeed monitor" && (
|
||||
{(title === "pagespeed monitor" && showPageSpeedWarning) && (
|
||||
<Box sx={{ width: "80%", maxWidth: "600px", zIndex: 1 }}>
|
||||
<Box sx={{
|
||||
'& .alert.row-stack': {
|
||||
@@ -153,6 +155,7 @@ Fallback.propTypes = {
|
||||
link: PropTypes.string,
|
||||
isAdmin: PropTypes.bool,
|
||||
vowelStart: PropTypes.bool,
|
||||
showPageSpeedWarning: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default Fallback;
|
||||
@@ -52,6 +52,7 @@ const PageSpeed = () => {
|
||||
]}
|
||||
link="/pagespeed/create"
|
||||
isAdmin={isAdmin}
|
||||
showPageSpeedWarning={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
+1
-1
@@ -377,6 +377,6 @@
|
||||
"errorInvalidFieldId": "Invalid field ID provided",
|
||||
"inviteNoTokenFound": "No invite token found",
|
||||
"pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key. Without it, the PageSpeed monitor won't function.",
|
||||
"pageSpeedLearnMore": "Click here to learn",
|
||||
"pageSpeedLearnMoreLink": "Click here to learn",
|
||||
"pageSpeedAddApiKey": "how to add your API key."
|
||||
}
|
||||
+1
-1
@@ -362,6 +362,6 @@
|
||||
"uptimeCreateJsonPathQuery": "",
|
||||
"maintenanceTableActionMenuDialogTitle": "",
|
||||
"pageSpeedWarning": "Предупреждение: Вы не добавили ключ API Google PageSpeed. Без него монитор PageSpeed не будет работать.",
|
||||
"pageSpeedLearnMore": "Нажмите здесь, чтобы узнать",
|
||||
"pageSpeedLearnMoreLink": "Нажмите здесь, чтобы узнать",
|
||||
"pageSpeedAddApiKey": "как добавить ваш ключ API."
|
||||
}
|
||||
+1
-1
@@ -377,6 +377,6 @@
|
||||
"errorInvalidFieldId": "",
|
||||
"inviteNoTokenFound": "",
|
||||
"pageSpeedWarning": "Uyarı: Google PageSpeed API anahtarı eklemediniz. Bu olmadan, PageSpeed monitörü çalışmayacaktır.",
|
||||
"pageSpeedLearnMore": "API anahtarınızı nasıl ekleyeceğinizi",
|
||||
"pageSpeedLearnMoreLink": "API anahtarınızı nasıl ekleyeceğinizi",
|
||||
"pageSpeedAddApiKey": "öğrenmek için buraya tıklayın."
|
||||
}
|
||||
Reference in new issue
Block a user