feat: Unify scaling and apply to clock widget
This commit is contained in:
7 files changed
+53
-6
No files matched your search
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { Button, Group, Stack } from "@mantine/core";
|
||||
import { Button, Group, NumberInput, Stack } from "@mantine/core";
|
||||
|
||||
import { useForm } from "@homarr/form";
|
||||
import { createModal } from "@homarr/modals";
|
||||
@@ -30,6 +30,23 @@ export const WidgetAdvancedOptionsModal = createModal<InnerProps>(({ actions, in
|
||||
label={t("item.edit.field.customCssClasses.label")}
|
||||
{...form.getInputProps("customCssClasses")}
|
||||
/>
|
||||
<NumberInput
|
||||
label={t("item.edit.field.customTextSize.label")}
|
||||
min={0}
|
||||
max={10}
|
||||
step={0.1}
|
||||
defaultValue={1}
|
||||
{...form.getInputProps("customTextSize")}
|
||||
/>
|
||||
<NumberInput
|
||||
label={t("item.edit.field.customSpacing.label")}
|
||||
description={t("item.edit.field.customSpacing.description")}
|
||||
min={0}
|
||||
max={10}
|
||||
step={0.1}
|
||||
defaultValue={1}
|
||||
{...form.getInputProps("customSpacing")}
|
||||
/>
|
||||
<Group justify="end">
|
||||
<Button onClick={actions.closeModal} variant="subtle" color="gray">
|
||||
{t("common.action.cancel")}
|
||||
|
||||
@@ -60,6 +60,8 @@ export const WidgetEditModal = createModal<ModalProps<WidgetKind>>(({ actions, i
|
||||
integrationIds: z.array(z.string()),
|
||||
advancedOptions: z.object({
|
||||
customCssClasses: z.array(z.string()),
|
||||
customTextSize: z.number().min(0).max(10),
|
||||
customSpacing: z.number().min(0).max(10),
|
||||
}),
|
||||
}),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user