diff --git a/src/Components/Inputs/Search/index.jsx b/src/Components/Inputs/Search/index.jsx index 662ade695..647af874a 100644 --- a/src/Components/Inputs/Search/index.jsx +++ b/src/Components/Inputs/Search/index.jsx @@ -128,7 +128,7 @@ const Search = ({ { const theme = useTheme(); const levelConfig = { - primary: {}, + primary: { + color: theme.palette.primary.contrastTextTertiary, + sx: { + ":hover": { + color: theme.palette.primary.contrastTextSecondary, + }, + }, + }, secondary: { color: theme.palette.primary.contrastTextSecondary, sx: { diff --git a/src/Components/Sidebar/index.jsx b/src/Components/Sidebar/index.jsx index c82f2e5be..4fbc12538 100644 --- a/src/Components/Sidebar/index.jsx +++ b/src/Components/Sidebar/index.jsx @@ -17,6 +17,7 @@ import { } from "@mui/material"; import ThemeSwitch from "../ThemeSwitch"; import Avatar from "../Avatar"; +import StarPrompt from "../StarPrompt"; import LockSvg from "../../assets/icons/lock.svg?react"; import UserSvg from "../../assets/icons/user.svg?react"; import TeamSvg from "../../assets/icons/user-two.svg?react"; @@ -608,6 +609,8 @@ function Sidebar() { + {!collapsed && } + { + const theme = useTheme(); + const dispatch = useDispatch(); + const { t } = useTranslation(); + const isOpen = useSelector((state) => state.ui?.starPromptOpen ?? true); + const mode = useSelector((state) => state.ui.mode); + + const handleClose = () => { + dispatch(setStarPromptOpen(false)); + }; + + const handleStarClick = () => { + window.open(repoUrl, '_blank'); + }; + + if (!isOpen) return null; + + return ( + + + + {t('starPromptTitle')} + + + + + + + + {t('starPromptDescription')} + + + + + ); +}; + +export default StarPrompt; diff --git a/src/Components/WalletProvider/index.css b/src/Components/WalletProvider/index.css new file mode 100644 index 000000000..15fb9d816 --- /dev/null +++ b/src/Components/WalletProvider/index.css @@ -0,0 +1,51 @@ +.wallet-adapter-dropdown { + width: 100%; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + gap: var(--env-var-spacing-1); +} + +.wallet-adapter-button { + display: flex; + align-items: center; + justify-content: center; + width: auto; + height: var(--env-var-height-2) !important; + font-size: var(--env-var-font-size-medium-plus) !important; + font-weight: 500 !important; + margin: 0; + padding: calc((var(--env-var-height-2) - var(--env-var-font-size-medium-plus) * 1.2) / 2) var(--env-var-spacing-1); + white-space: nowrap; +} + +.wallet-adapter-modal-title { + font-size: var(--font-size-h5) !important; +} + +/* Separator styling */ +.wallet-adapter-modal-divider { + background-color: var(--border-color) !important; + margin: var(--spacing-md) 0 !important; +} + +/* Responsive fixes */ +@media (max-width: 1200px) { + .wallet-adapter-button { + font-size: var(--env-var-font-size-medium) !important; + padding: calc((var(--env-var-height-2) - var(--env-var-font-size-medium) * 1.2) / 2) + var(--env-var-spacing-1-minus) !important; + + } +} + +@media (max-width: 900px) { + .wallet-adapter-modal-wrapper { + flex-direction: column !important; + } + + .wallet-adapter-modal-divider { + margin: var(--spacing-sm) 0 !important; + } +} \ No newline at end of file diff --git a/src/Components/WalletProvider/index.jsx b/src/Components/WalletProvider/index.jsx index a24124d93..9491c1d39 100644 --- a/src/Components/WalletProvider/index.jsx +++ b/src/Components/WalletProvider/index.jsx @@ -9,6 +9,7 @@ import { import { WalletModalProvider } from "@solana/wallet-adapter-react-ui"; import { clusterApiUrl } from "@solana/web3.js"; import PropTypes from "prop-types"; +import "./index.css"; // Default styles that can be overridden by your app import "@solana/wallet-adapter-react-ui/styles.css"; diff --git a/src/Features/UI/uiSlice.js b/src/Features/UI/uiSlice.js index ebafdbbf6..f20115b92 100644 --- a/src/Features/UI/uiSlice.js +++ b/src/Features/UI/uiSlice.js @@ -24,6 +24,7 @@ const initialState = { timezone: "America/Toronto", distributedUptimeEnabled: false, language: "gb", + starPromptOpen: true, }; const uiSlice = createSlice({ @@ -55,6 +56,9 @@ const uiSlice = createSlice({ setLanguage(state, action) { state.language = action.payload; }, + setStarPromptOpen: (state, action) => { + state.starPromptOpen = action.payload; + }, }, }); @@ -67,4 +71,5 @@ export const { setTimezone, setDistributedUptimeEnabled, setLanguage, + setStarPromptOpen, } = uiSlice.actions; diff --git a/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx b/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx index 8f188c970..22a56bd7e 100644 --- a/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx +++ b/src/Pages/DistributedUptime/Details/Components/StatusHeader/index.jsx @@ -30,7 +30,6 @@ const StatusHeader = ({ monitor, connectionStatus, elementToCapture }) => { }; let bgColor = COLOR_MAP[connectionStatus]; - return ( { backgroundColor={theme.palette.successSecondary.lowContrast} color={theme.palette.success.lowContrast} > - {t("distributedUptimeDetailsStatusHeaderUptime")} {(monitor.totalUptime * 100).toFixed(2)}% + {t("distributedUptimeDetailsStatusHeaderUptime")}{" "} + {(monitor.uptimePercentage * 100).toFixed(2)}% { {t("settingsWalletDescription")} - + { )} + {t("settingsAbout")} diff --git a/src/Pages/StatusPage/Status/index.jsx b/src/Pages/StatusPage/Status/index.jsx index ac5877815..a47e9d33e 100644 --- a/src/Pages/StatusPage/Status/index.jsx +++ b/src/Pages/StatusPage/Status/index.jsx @@ -24,7 +24,6 @@ const PublicStatus = () => { const [isDeleteOpen, setIsDeleteOpen] = useState(false); // Utils const theme = useTheme(); - const isAdmin = useIsAdmin(); const location = useLocation(); const navigate = useNavigate(); @@ -33,7 +32,6 @@ const PublicStatus = () => { const [deleteStatusPage, isDeleting] = useStatusPageDelete(fetchStatusPage, url); // Setup - const currentPath = location.pathname; let sx = { paddingLeft: theme.spacing(20), paddingRight: theme.spacing(20) }; let link = undefined; const isPublic = location.pathname.startsWith("/status/uptime/public"); diff --git a/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable/index.jsx b/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable/index.jsx index 7bee4be8f..6772dcdb7 100644 --- a/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable/index.jsx +++ b/src/Pages/StatusPage/StatusPages/Components/StatusPagesTable/index.jsx @@ -25,7 +25,7 @@ const StatusPagesTable = ({ data }) => { row.type === "distributed" ? `/status/distributed/public/${row.url}` : `/status/uptime/public/${row.url}`; - navigate(url); + window.open(url, "_blank", "noopener,noreferrer") } }, render: (row) => { diff --git a/src/Utils/Theme/globalTheme.js b/src/Utils/Theme/globalTheme.js index 6e05fa592..490a5baea 100644 --- a/src/Utils/Theme/globalTheme.js +++ b/src/Utils/Theme/globalTheme.js @@ -332,13 +332,13 @@ const baseTheme = (palette) => ({ color: palette.error.main, opacity: 0.8, fontSize: "var(--env-var-font-size-medium)", - marginLeft: 0, }, "& .MuiFormHelperText-root.Mui-error": { opacity: 0.8, fontSize: "var(--env-var-font-size-medium)", color: palette.error.main, + whiteSpace: 'nowrap', }, }), }, diff --git a/src/locales/gb.json b/src/locales/gb.json index cdb358ed2..735e1213c 100644 --- a/src/locales/gb.json +++ b/src/locales/gb.json @@ -188,7 +188,7 @@ "integrationsDiscordInfo": "Connect with Discord and view incidents directly in a channel", "integrationsZapier": "Zapier", "integrationsZapierInfo": "Send all incidents to Zapier, and then see them everywhere", - + "settingsGeneralSettings": "General settings", "settingsDisplayTimezone": "Display timezone", "settingsDisplayTimezoneDescription": "The timezone of the dashboard you publicly display.", @@ -230,37 +230,37 @@ "settingsFailedToAddDemoMonitors": "Failed to add demo monitors", "settingsMonitorsDeleted": "Successfully deleted all monitors", "settingsFailedToDeleteMonitors": "Failed to delete all monitors", - + "starPromptTitle": "Star Checkmate", + "starPromptDescription": "See the latest releases and help grow the community on GitHub", "notifications": { "enableNotifications": "Enable {{platform}} notifications", "testNotification": "Test notification", "addOrEditNotifications": "Add or edit notifications", "slack": { - "label": "Slack", - "description": "To enable Slack notifications, create a Slack app and enable incoming webhooks. After that, simply provide the webhook URL here.", - "webhookLabel": "Webhook URL", - "webhookPlaceholder": "https://hooks.slack.com/services/..." + "label": "Slack", + "description": "To enable Slack notifications, create a Slack app and enable incoming webhooks. After that, simply provide the webhook URL here.", + "webhookLabel": "Webhook URL", + "webhookPlaceholder": "https://hooks.slack.com/services/..." }, "discord": { - "label": "Discord", - "description": "To send data to a Discord channel from Checkmate via Discord notifications using webhooks, you can use Discord's incoming Webhooks feature.", - "webhookLabel": "Discord Webhook URL", - "webhookPlaceholder": "https://discord.com/api/webhooks/..." + "label": "Discord", + "description": "To send data to a Discord channel from Checkmate via Discord notifications using webhooks, you can use Discord's incoming Webhooks feature.", + "webhookLabel": "Discord Webhook URL", + "webhookPlaceholder": "https://discord.com/api/webhooks/..." }, "telegram": { - "label": "Telegram", - "description": "To enable Telegram notifications, create a Telegram bot using BotFather, an official bot for creating and managing Telegram bots. Then, get the API token and chat ID and write them down here.", - "tokenLabel": "Your bot token", - "tokenPlaceholder": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", - "chatIdLabel": "Your Chat ID", - "chatIdPlaceholder": "-1001234567890" + "label": "Telegram", + "description": "To enable Telegram notifications, create a Telegram bot using BotFather, an official bot for creating and managing Telegram bots. Then, get the API token and chat ID and write them down here.", + "tokenLabel": "Your bot token", + "tokenPlaceholder": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11", + "chatIdLabel": "Your Chat ID", + "chatIdPlaceholder": "-1001234567890" }, "webhook": { - "label": "Webhooks", - "description": "You can set up a custom webhook to receive notifications when incidents occur.", - "urlLabel": "Webhook URL", - "urlPlaceholder": "https://your-server.com/webhook" + "label": "Webhooks", + "description": "You can set up a custom webhook to receive notifications when incidents occur.", + "urlLabel": "Webhook URL", + "urlPlaceholder": "https://your-server.com/webhook" } } - } diff --git a/src/locales/tr.json b/src/locales/tr.json index abd358548..d93083871 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -101,5 +101,7 @@ "settingsDemoMonitorsAdded": "Demo monitörler başarıyla eklendi", "settingsFailedToAddDemoMonitors": "Demo monitörler eklenemedi", "settingsMonitorsDeleted": "Tüm monitörler başarıyla silindi", - "settingsFailedToDeleteMonitors": "Monitörler silinemedi" + "settingsFailedToDeleteMonitors": "Monitörler silinemedi", + "starPromptTitle": "Checkmate yıldızla değerlendirin", + "starPromptDescription": "En son sürümleri görün ve GitHub'daki topluluğun büyümesine yardımcı olun" }