Compare commits

...

2 Commits

Author SHA1 Message Date
henrygd
c1c1cd1bcb ui: fix temperature chart filtering 2026-04-20 20:45:16 -04:00
Yvan Wang
cd9ea51039 fix(hub): use rfcEmail validator to allow IDN/Punycode email addresses (#1935)
valibot's email() action uses a domain-label regex that disallows the
-- sequence, so Punycode ACE labels like xn--mnchen-3ya.de (the ASCII
form of münchen.de) are incorrectly rejected.

Switching to rfcEmail() applies the RFC 5321 domain-label pattern,
which allows hyphens within labels and therefore accepts both standard
and internationalized domain names.
2026-04-18 12:23:14 -04:00
4 changed files with 7 additions and 5 deletions

View File

@@ -104,7 +104,7 @@ export default function LineChartDefault({
isAnimationActive={false} isAnimationActive={false}
// stackId={dataPoint.stackId} // stackId={dataPoint.stackId}
order={dataPoint.order || i} order={dataPoint.order || i}
// activeDot={dataPoint.activeDot ?? true} activeDot={dataPoint.activeDot ?? true}
/> />
) )
}) })

View File

@@ -17,7 +17,7 @@ import { toast } from "../ui/use-toast"
import { OtpInputForm } from "./otp-forms" import { OtpInputForm } from "./otp-forms"
const honeypot = v.literal("") const honeypot = v.literal("")
const emailSchema = v.pipe(v.string(), v.email(t`Invalid email address.`)) const emailSchema = v.pipe(v.string(), v.rfcEmail(t`Invalid email address.`))
const passwordSchema = v.pipe( const passwordSchema = v.pipe(
v.string(), v.string(),
v.minLength(8, t`Password must be at least 8 characters.`), v.minLength(8, t`Password must be at least 8 characters.`),

View File

@@ -24,7 +24,7 @@ interface ShoutrrrUrlCardProps {
} }
const NotificationSchema = v.object({ const NotificationSchema = v.object({
emails: v.array(v.pipe(v.string(), v.email())), emails: v.array(v.pipe(v.string(), v.rfcEmail())),
webhooks: v.array(v.pipe(v.string(), v.url())), webhooks: v.array(v.pipe(v.string(), v.url())),
}) })

View File

@@ -120,7 +120,8 @@ export function TemperatureChart({
label: key, label: key,
dataKey: dataKeys[key], dataKey: dataKeys[key],
color: colorMap[key], color: colorMap[key],
opacity: strokeOpacity, strokeOpacity,
activeDot: !filtered,
} }
}) })
}, [sortedKeys, filter, dataKeys, colorMap]) }, [sortedKeys, filter, dataKeys, colorMap])
@@ -134,7 +135,7 @@ export function TemperatureChart({
// label: `Test ${++i}`, // label: `Test ${++i}`,
// dataKey: () => 0, // dataKey: () => 0,
// color: "red", // color: "red",
// opacity: 1, // strokeOpacity: 1,
// }) // })
// } // }
// } // }
@@ -202,6 +203,7 @@ export function TemperatureChart({
return `${decimalString(value)} ${unit}` return `${decimalString(value)} ${unit}`
}} }}
dataPoints={dataPoints} dataPoints={dataPoints}
filter={filter}
></LineChartDefault> ></LineChartDefault>
</ChartCard> </ChartCard>
</div> </div>