add link text

This commit is contained in:
Alex Holliday committed 2026-02-20 17:20:43 +00:00
1 parent b64cf3f6b6
commit b78b584844
3 files changed
+50 -39

No files matched your search

@@ -10,7 +10,7 @@ interface TextLinkProps extends StackProps {
text: string; text: string;
linkText: string; linkText: string;
href: string; href: string;
target?: string; target?: "_self" | "_blank" | "_parent" | "_top";
} }
export const TextLink = ({ export const TextLink = ({
@@ -34,6 +34,7 @@ export const TextLink = ({
to={href} to={href}
component={RouterLink} component={RouterLink}
target={target} target={target}
{...(target === "_blank" && { rel: "noopener noreferrer" })}
> >
{linkText} {linkText}
</Link> </Link>
+46 -38
View File
@@ -1,4 +1,4 @@
import { BasePage, ConfigBox } from "@/Components/v2/design-elements"; import { BasePage, ConfigBox, TextLink } from "@/Components/v2/design-elements";
import { Autocomplete, Select, Dialog, SwitchComponent } from "@/Components/v2/inputs"; import { Autocomplete, Select, Dialog, SwitchComponent } from "@/Components/v2/inputs";
import { Stack, useTheme, MenuItem, type SelectChangeEvent } from "@mui/material"; import { Stack, useTheme, MenuItem, type SelectChangeEvent } from "@mui/material";
import { useEffect } from "react"; import { useEffect } from "react";
@@ -518,44 +518,52 @@ export const SettingsPage = () => {
title={t("pages.settings.form.email.title")} title={t("pages.settings.form.email.title")}
subtitle={t("pages.settings.form.email.description")} subtitle={t("pages.settings.form.email.description")}
leftContent={ leftContent={
<Box <Stack gap={theme.spacing(8)}>
component="pre" <TextLink
sx={{ text={t("pages.settings.form.email.descriptionTransport")}
fontFamily: "monospace", linkText={t("pages.settings.form.email.descriptionTransportLink")}
p: 2, href="https://nodemailer.com/smtp/"
borderRadius: 1, target="_top"
overflow: "auto", />
backgroundColor: theme.palette.mode === "dark" ? "#1e1e1e" : "#f5f5f5", <Box
}} component="pre"
> sx={{
<code> fontFamily: "monospace",
{JSON.stringify( p: 2,
{ borderRadius: 1,
host: form.watch("systemEmailHost") || "", overflow: "auto",
port: form.watch("systemEmailPort") || "", backgroundColor: theme.palette.mode === "dark" ? "#1e1e1e" : "#f5f5f5",
secure: form.watch("systemEmailSecure") ?? false, }}
auth: { >
user: <code>
form.watch("systemEmailUser") || {JSON.stringify(
form.watch("systemEmailAddress") || {
"", host: form.watch("systemEmailHost") || "",
pass: "<your_password>", port: form.watch("systemEmailPort") || "",
secure: form.watch("systemEmailSecure") ?? false,
auth: {
user:
form.watch("systemEmailUser") ||
form.watch("systemEmailAddress") ||
"",
pass: "<your_password>",
},
name: form.watch("systemEmailConnectionHost") || "localhost",
pool: form.watch("systemEmailPool") ?? false,
tls: {
rejectUnauthorized:
form.watch("systemEmailRejectUnauthorized") ?? true,
ignoreTLS: form.watch("systemEmailIgnoreTLS") ?? false,
requireTLS: form.watch("systemEmailRequireTLS") ?? false,
servername: form.watch("systemEmailTLSServername") || "",
},
}, },
name: form.watch("systemEmailConnectionHost") || "localhost", null,
pool: form.watch("systemEmailPool") ?? false, 2
tls: { )}
rejectUnauthorized: </code>
form.watch("systemEmailRejectUnauthorized") ?? true, </Box>
ignoreTLS: form.watch("systemEmailIgnoreTLS") ?? false, </Stack>
requireTLS: form.watch("systemEmailRequireTLS") ?? false,
servername: form.watch("systemEmailTLSServername") || "",
},
},
null,
2
)}
</code>
</Box>
} }
rightContent={ rightContent={
<Stack gap={theme.spacing(10)}> <Stack gap={theme.spacing(10)}>
+2
View File
@@ -1023,6 +1023,8 @@
"email": { "email": {
"title": "Email settings", "title": "Email settings",
"description": "Configure the email settings for your system. This is used to send notifications and alerts.", "description": "Configure the email settings for your system. This is used to send notifications and alerts.",
"descriptionTransport": "This builds an SMTP transport for NodeMailer",
"descriptionTransportLink": "See specifications here",
"option": { "option": {
"host": { "host": {
"label": "Email host - Hostname or IP address to connect to", "label": "Email host - Hostname or IP address to connect to",