diff --git a/client/src/Pages/Settings/SettingsAbout.jsx b/client/src/Pages/Settings/SettingsAbout.jsx index 6acadd444..861d2f30c 100644 --- a/client/src/Pages/Settings/SettingsAbout.jsx +++ b/client/src/Pages/Settings/SettingsAbout.jsx @@ -16,7 +16,7 @@ const SettingsAbout = () => { component="h1" variant="h2" > - {t("settingsAbout")} + {t("settingsPage.aboutSettings.title")} @@ -24,7 +24,7 @@ const SettingsAbout = () => { {t("common.appName")} {2.1} - {t("settingsDevelopedBy")} + {t("settingsPage.aboutSettings.labelDevelopedBy")} - {t("settingsDemoMonitors")} + {t("settingsPage.demoMonitorsSettings.title")} + + + {t("settingsPage.demoMonitorsSettings.description")} - {t("settingsDemoMonitorsDescription")} @@ -56,10 +58,10 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, handleChange, isLoading }) = component="h1" variant="h2" > - {t("settingsSystemReset")} + {t("settingsPage.systemResetSettings.title")} - {t("settingsSystemResetDescription")} + {t("settingsPage.systemResetSettings.description")} @@ -70,15 +72,15 @@ const SettingsDemoMonitors = ({ isAdmin, HEADER_SX, handleChange, isLoading }) = onClick={() => setIsOpen(true)} sx={{ mt: theme.spacing(4) }} > - {t("settingsRemoveAllMonitorsButton")} + {t("settingsPage.systemResetSettings.buttonRemoveAllMonitors")} setIsOpen(false)} - confirmationButtonLabel={t("settingsRemoveAllMonitorsDialogConfirm")} + confirmationButtonLabel={t("settingsPage.systemResetSettings.dialogConfirm")} onConfirm={() => { const syntheticEvent = { target: { diff --git a/client/src/Pages/Settings/SettingsEmail.jsx b/client/src/Pages/Settings/SettingsEmail.jsx index 1ae4a1f02..6c527eaec 100644 --- a/client/src/Pages/Settings/SettingsEmail.jsx +++ b/client/src/Pages/Settings/SettingsEmail.jsx @@ -9,7 +9,7 @@ import TextLink from "../../Components/TextLink"; // Utils import { useTheme } from "@emotion/react"; import { PropTypes } from "prop-types"; -import { useState, useEffect } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornments"; import { useSendTestEmail } from "../../Hooks/useSendTestEmail"; @@ -111,14 +111,16 @@ const SettingsEmail = ({ component="h1" variant="h2" > - {t("settingsEmail")} + {t("settingsPage.emailSettings.title")} + + + {t("settingsPage.emailSettings.description")} - {t("settingsEmailDescription")} - {t("settingsEmailHost")} + {t("settingsPage.emailSettings.labelHost")} - {t("settingsEmailPort")} + {t("settingsPage.emailSettings.labelPort")} - {t("settingsEmailUser")} + {t("settingsPage.emailSettings.labelUser")} - {t("settingsEmailAddress")} + {t("settingsPage.emailSettings.labelAddress")} {(isEmailPasswordSet === false || emailPasswordHasBeenReset === true) && ( - {t("settingsEmailPassword")} + {t("settingsPage.emailSettings.labelPassword")} - {t("settingsEmailFieldResetLabel")} + {t("settingsPage.emailSettings.labelPasswordSet")} )} diff --git a/client/src/Pages/Settings/SettingsPagespeed.jsx b/client/src/Pages/Settings/SettingsPagespeed.jsx index 7d7cf0216..157c75dac 100644 --- a/client/src/Pages/Settings/SettingsPagespeed.jsx +++ b/client/src/Pages/Settings/SettingsPagespeed.jsx @@ -8,7 +8,7 @@ import { PasswordEndAdornment } from "../../Components/Inputs/TextInput/Adornmen // Utils import { useTheme } from "@emotion/react"; import { PropTypes } from "prop-types"; -import { useState, useEffect } from "react"; +import { useState } from "react"; import { useTranslation } from "react-i18next"; const SettingsPagespeed = ({ @@ -46,15 +46,17 @@ const SettingsPagespeed = ({ component="h1" variant="h2" > - {t("pageSpeedApiKeyFieldTitle")} + {t("settingsPage.pageSpeedSettings.title")} + + + {t("settingsPage.pageSpeedSettings.description")} - {t("pageSpeedApiKeyFieldDescription")} {(isApiKeySet === false || apiKeyHasBeenReset === true) && ( - {t("pageSpeedApiKeyFieldResetLabel")} + {t("settingsPage.pageSpeedSettings.labelApiKeySet")} setIsOpen(false)} - confirmationButtonLabel={t("settingsClearAllStatsDialogConfirm")} + confirmationButtonLabel={t( + "settingsPage.statsSettings.clearAllStatsDialogConfirm" + )} onConfirm={() => { const syntheticEvent = { target: { diff --git a/client/src/Pages/Settings/SettingsTimeZone.jsx b/client/src/Pages/Settings/SettingsTimeZone.jsx index 86fc72992..346e4e546 100644 --- a/client/src/Pages/Settings/SettingsTimeZone.jsx +++ b/client/src/Pages/Settings/SettingsTimeZone.jsx @@ -19,16 +19,17 @@ const SettingsTimeZone = ({ HEADING_SX, handleChange, timezone }) => { component="h1" variant="h2" > - {t("settingsGeneralSettings")} + {t("settingsPage.timezoneSettings.title")} - {t("settingsDisplayTimezone")}-{" "} - {t("settingsDisplayTimezoneDescription")} + + {t("settingsPage.timezoneSettings.description")} + { > diff --git a/client/src/Pages/Settings/index.jsx b/client/src/Pages/Settings/index.jsx index 0cd954e52..dae6bd680 100644 --- a/client/src/Pages/Settings/index.jsx +++ b/client/src/Pages/Settings/index.jsx @@ -157,7 +157,7 @@ const Settings = () => { return ( - Settings + {t("settingsPage.title")} { sx={{ px: theme.spacing(12), py: theme.spacing(8) }} onClick={handleSave} > - {t("settingsSave")} + {t("settingsPage.saveButtonLabel")} diff --git a/client/src/Utils/Theme/globalTheme.js b/client/src/Utils/Theme/globalTheme.js index ae014432d..eb827a907 100644 --- a/client/src/Utils/Theme/globalTheme.js +++ b/client/src/Utils/Theme/globalTheme.js @@ -36,6 +36,11 @@ const baseTheme = (palette) => ({ color: palette.primary.contrastTextTertiary, fontWeight: 400, }, + label: { + fontSize: "var(--env-var-font-size-medium)", + color: palette.primary.contrastTextSecondary, + fontWeight: 500, + }, }, /* TODO change to 4 */ spacing: 2, diff --git a/client/src/locales/en.json b/client/src/locales/en.json index 201c54782..b3cc23dca 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -587,10 +587,6 @@ "now": "Now", "os": "OS", "pageSpeedAddApiKey": "to add your API key.", - "pageSpeedApiKeyFieldDescription": "Enter your Google PageSpeed API key to enable pagespeed monitoring. Click Reset to update the key.", - "pageSpeedApiKeyFieldLabel": "PageSpeed API key", - "pageSpeedApiKeyFieldResetLabel": "API key is set. Click Reset to change it.", - "pageSpeedApiKeyFieldTitle": "Google PageSpeed API key", "pageSpeedConfigureSettingsDescription": "Here you can select the URL of the host, together with the type of monitor.", "pageSpeedDetailsPerformanceReport": "Values are estimated and may vary.", "pageSpeedDetailsPerformanceReportCalculator": "See calculator", @@ -664,74 +660,97 @@ "selectAll": "Select all", "sendTestNotifications": "Send test notifications", "seperateEmails": "You can separate multiple emails with a comma", - "settingURLDisabled": "Disabled", - "settingsAbout": "About", - "settingsAddDemoMonitorsButton": "Add demo monitors", - "settingsAppearance": "Appearance", - "settingsAppearanceDescription": "Switch between light and dark mode, or change user interface language", - "settingsClearAllStats": "Clear all stats. This is irreversible.", - "settingsClearAllStatsButton": "Clear all stats", - "settingsClearAllStatsDialogCancel": "Cancel", - "settingsClearAllStatsDialogConfirm": "Yes, clear all stats", - "settingsClearAllStatsDialogDescription": "Once removed, the monitoring history and stats cannot be retrieved.", - "settingsClearAllStatsDialogTitle": "Do you want to clear all stats?", - "settingsDemoMonitors": "Demo monitors", - "settingsDemoMonitorsAdded": "Successfully added demo monitors", - "settingsDemoMonitorsDescription": "Add sample monitors for demonstration purposes.", - "settingsDevelopedBy": "Developed by Bluewave Labs.", "settingsDisabled": "Disabled", - "settingsDisplayTimezone": "Display timezone", - "settingsDisplayTimezoneDescription": "Select the timezone used to display dates and times throughout the application.", - "settingsEmail": "Email", - "settingsEmailAddress": "Email address - Used for authentication", - "settingsEmailConnectionHost": "Email connection host - Hostname to use in the HELO/EHLO greeting", - "settingsEmailDescription": "Configure the email settings for your system. This is used to send notifications and alerts.", - "settingsEmailFieldResetLabel": "Password is set. Click Reset to change it.", - "settingsEmailHost": "Email host - Hostname or IP address to connect to", - "settingsEmailIgnoreTLS": "Ignore TLS - Disable STARTTLS", - "settingsEmailPassword": "Email password - Password for authentication", - "settingsEmailPool": "Pool - Enable connection pooling", - "settingsEmailPort": "Email port - Port to connect to", - "settingsEmailRejectUnauthorized": "Reject Unauthorized", - "settingsEmailRequireTLS": "Require TLS - Force STARTTLS", - "settingsEmailRequiredFields": "Email address, host, port and password are required", - "settingsEmailSecure": "Secure - Use SSL", - "settingsEmailTLSServername": "TLS Servername - Optional Hostname for TLS Validation when host is an IP", - "settingsEmailTransportLinkDescription": "This builds an SMTP transport for NodeMailer", - "settingsEmailTransportLinkText": "See specifications here", "settingsEmailUser": "Email user - Username for authentication, overrides email address if specified", - "settingsEnabled": "Enabled", "settingsFailedToAddDemoMonitors": "Failed to add demo monitors", "settingsFailedToClearStats": "Failed to clear stats", "settingsFailedToDeleteMonitors": "Failed to delete all monitors", "settingsFailedToSave": "Failed to save settings", - "settingsGeneralSettings": "General settings", - "settingsHistoryAndMonitoring": "History of monitoring", - "settingsHistoryAndMonitoringDescription": "Define how long you want to retain historical data. You can also clear all existing data.", - "settingsLanguage": "Language", "settingsMonitorsDeleted": "Successfully deleted all monitors", - "settingsRemoveAllMonitorsButton": "Remove all monitors", - "settingsRemoveAllMonitorsDialogConfirm": "Yes, remove all monitors", - "settingsRemoveAllMonitorsDialogTitle": "Do you want to remove all monitors?", - "settingsSave": "Save", + "settingsPage": { + "aboutSettings": { + "labelDevelopedBy": "Developed by Bluewave Labs", + "labelVersion": "Version", + "title": "About" + }, + "demoMonitorsSettings": { + "buttonAddMonitors": "Add demo monitors", + "description": "Add sample monitors for demonstration purposes.", + "title": "Demo monitors" + }, + "emailSettings": { + "buttonSendTestEmail": "Send test e-mail", + "description": "Configure the email settings for your system. This is used to send notifications and alerts.", + "descriptionTransport": "This builds an SMTP transport for NodeMailer", + "labelAddress": "Email address - Used for authentication", + "labelConnectionHost": "Email connection host - Hostname to use in the HELO/EHLO greeting", + "labelHost": "Email host - Hostname or IP address to connect to", + "labelIgnoreTLS": "Disable STARTTLS: Don't use TLS even if the server supports it", + "labelPassword": "Email password - Password for authentication", + "labelPasswordSet": "Password is set. Click Reset to change it.", + "labelPool": "Enable connection pooling: Reuse existing connections to improve performance", + "labelPort": "Email port - Port to connect to", + "labelRejectUnauthorized": "Reject invalid certificates: Reject connections with self-signed or untrusted certificates", + "labelRequireTLS": "Force STARTTLS: Require TLS upgrade, fail if not supported", + "labelSecure": "Use SSL (recommended): Encrypt the connection using SSL/TLS", + "labelTLSServername": "TLS Servername - Optional Hostname for TLS Validation when host is an IP", + "labelUser": "Email user - Username for authentication, overrides email address if specified", + "linkTransport": "See specifications here", + "placeholderUser": "Leave empty if not required", + "title": "Email" + }, + "pageSpeedSettings": { + "description": "Enter your Google PageSpeed API key to enable Google PageSpeed monitoring. Click Reset to update the key.", + "labelApiKeySet": "API key is set. Click Reset to change it.", + "labelApiKey": "PageSpeed API key", + "title": "Google PageSpeed API key" + }, + "saveButtonLabel": "Save", + "statsSettings": { + "clearAllStatsButton": "Clear all stats", + "clearAllStatsDescription": "Clear all stats. This is irreversible.", + "clearAllStatsDialogConfirm": "Yes, clear all stats", + "clearAllStatsDialogDescription": "Once removed, the monitoring history and stats cannot be retrieved.", + "clearAllStatsDialogTitle": "Do you want to clear all stats?", + "description": "Define how long you want to retain historical data. You can also clear all existing data.", + "labelTTL": "The days you want to keep monitoring history.", + "labelTTLOptional": "0 for infinite", + "title": "Monitor history" + }, + "systemResetSettings": { + "buttonRemoveAllMonitors": "Remove all monitors", + "description": "Remove all monitors from your system.", + "dialogConfirm": "Yes, remove all monitors", + "dialogDescription": "Once removed, the monitors cannot be retrieved.", + "dialogTitle": "Do you want to remove all monitors?", + "title": "System reset" + }, + "timezoneSettings": { + "description": "Select the timezone used to display dates and times throughout the application.", + "label": "Display timezone", + "title": "Display timezone" + }, + "title": "Settings", + "uiSettings": { + "description": "Switch between light and dark mode, or change user interface language.", + "labelLanguage": "Language", + "labelTheme": "Theme mode", + "title": "Appearance" + }, + "urlSettings": { + "description": "Display the IP address or URL of monitor on the public Status page. If it's disabled, only the monitor name will be shown to protect sensitive information.", + "label": "Display IP/URL on status page", + "selectDisabled": "Disabled", + "selectEnabled": "Enabled", + "title": "Monitor IP/URL on Status Page" + } + }, "settingsStatsCleared": "Stats cleared successfully", "settingsSuccessSaved": "Settings saved successfully", - "settingsSystemReset": "System reset", - "settingsSystemResetDescription": "Remove all monitors from your system.", - "settingsTTLLabel": "The days you want to keep monitoring history.", - "settingsTTLOptionalLabel": "0 for infinite", - "settingsTestEmail": "Send test e-mail", "settingsTestEmailFailed": "Failed to send test email", "settingsTestEmailFailedWithReason": "Failed to send test email: {{reason}}", "settingsTestEmailSuccess": "Test email sent successfully", "settingsTestEmailUnknownError": "Unknown error", - "settingsThemeMode": "Theme Mode", - "settingsThemeModeDark": "Dark", - "settingsThemeModeLight": "Light", - "settingsURLDescription": "Display the IP address or URL of monitor on the public Status page. If it's disabled, only the monitor name will be shown to protect sensitive information.", - "settingsURLEnabled": "Enabled", - "settingsURLSelectTitle": "Display IP/URL on status page", - "settingsURLTitle": "Monitor IP/URL on Status Page", "showAdminLoginLink": "Show \"Administrator? Login Here\" link on the status page", "showCharts": "Show charts", "showUptimePercentage": "Show uptime percentage",