diff --git a/client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx b/client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx index a9872e99f..d45c977a1 100644 --- a/client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx +++ b/client/src/Pages/StatusPage/Status/Components/ControlsHeader/index.jsx @@ -3,6 +3,7 @@ import { Box, Stack, Typography, Button } from "@mui/material"; import Image from "../../../../../Components/Image"; import SettingsIcon from "../../../../../assets/icons/settings-bold.svg?react"; import ThemeSwitch from "../../../../../Components/ThemeSwitch"; +import ArrowOutwardIcon from "@mui/icons-material/ArrowOutward"; //Utils import { useTheme } from "@mui/material/styles"; import { useNavigate } from "react-router-dom"; @@ -86,6 +87,11 @@ const ControlsHeader = ({ type = "uptime", }) => { const theme = useTheme(); + const { t } = useTranslation(); + const publicUrl = + type === "uptime" + ? `/status/uptime/public/${url}` + : `/status/distributed/public/${url}`; return ( {statusPage?.companyName} + {statusPage?.isPublished && !isPublic && ( + { + window.open(publicUrl, "_blank", "noopener,noreferrer"); + }} + sx={{ + display: "inline-flex", + ":hover": { + cursor: "pointer", + borderBottom: 1, + }, + }} + > + {t("publicLink")} + + + )} { isDeleteOpen={isDeleteOpen} setIsDeleteOpen={setIsDeleteOpen} url={url} + isPublic={isPublic} /> {t("statusPageStatusServiceStatus")} diff --git a/client/src/locales/gb.json b/client/src/locales/gb.json index 9deaa9e48..930804cfa 100644 --- a/client/src/locales/gb.json +++ b/client/src/locales/gb.json @@ -410,5 +410,6 @@ "validationFailed": "Validation failed", "noFileSelected": "No file selected", "fallbackPage": "Import a file to upload a list of servers in bulk" - } + }, + "publicLink": "Public Link" }