From 5505b8c754f8f6440f4ff5af5c7b1571681563ca Mon Sep 17 00:00:00 2001 From: finxol Date: Fri, 5 Jun 2026 13:04:54 +0200 Subject: [PATCH] fix: pushover icon stroke + numeric priority edit compat - icon: add stroke=currentColor to match the icon-set convention - form: normalize persisted numeric priority to string so editing API-created notifiers doesn't break the Select / submit validation --- .../forms/notifications/form-pushover.tsx | 26 ++++++++++++------- packages/icons/src/pushover.tsx | 1 + 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/apps/dashboard/src/components/forms/notifications/form-pushover.tsx b/apps/dashboard/src/components/forms/notifications/form-pushover.tsx index b11e10b8..e40515b0 100644 --- a/apps/dashboard/src/components/forms/notifications/form-pushover.tsx +++ b/apps/dashboard/src/components/forms/notifications/form-pushover.tsx @@ -72,16 +72,22 @@ export function FormPushover({ }) { const form = useForm({ resolver: zodResolver(schema), - defaultValues: defaultValues ?? { - name: "", - provider: "pushover", - data: { - token: "", - user: "", - priority: "0", - }, - monitors: [], - }, + defaultValues: defaultValues + ? { + ...defaultValues, + data: { + ...defaultValues.data, + // priority may be persisted as a number (API-created); the Select + // and schema both expect a string. + priority: String(defaultValues.data.priority ?? "0"), + }, + } + : { + name: "", + provider: "pushover", + data: { token: "", user: "", priority: "0" }, + monitors: [], + }, }); const [isPending, startTransition] = useTransition(); const { setIsDirty } = useFormSheetDirty(); diff --git a/packages/icons/src/pushover.tsx b/packages/icons/src/pushover.tsx index 381cc4ee..e2591eea 100644 --- a/packages/icons/src/pushover.tsx +++ b/packages/icons/src/pushover.tsx @@ -4,6 +4,7 @@ export function PushoverIcon(props: React.ComponentProps<"svg">) { role="img" viewBox="0 0 600 600" xmlns="http://www.w3.org/2000/svg" + stroke="currentColor" fill="currentColor" fillRule="evenodd" {...props} -- 2.51.2