From d008baa70acd192da95ae49c9c68d93dc6f578b0 Mon Sep 17 00:00:00 2001 From: ajnart Date: Wed, 28 Jun 2023 19:59:25 +0900 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20option=20to=20hide/show=20wee?= =?UTF-8?q?k=20days=20on=20calendar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes Calendar Weekdays line #1091 --- public/locales/en/modules/calendar.json | 5 ++++- src/widgets/calendar/CalendarTile.tsx | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/public/locales/en/modules/calendar.json b/public/locales/en/modules/calendar.json index 5b3aefe0f..9460bcfa6 100644 --- a/public/locales/en/modules/calendar.json +++ b/public/locales/en/modules/calendar.json @@ -12,7 +12,10 @@ }, "radarrReleaseType": { "label": "Radarr release type" + }, + "hideWeekDays": { + "label": "Hide week days" } } } -} +} \ No newline at end of file diff --git a/src/widgets/calendar/CalendarTile.tsx b/src/widgets/calendar/CalendarTile.tsx index de320e212..705167bca 100644 --- a/src/widgets/calendar/CalendarTile.tsx +++ b/src/widgets/calendar/CalendarTile.tsx @@ -16,6 +16,10 @@ const definition = defineWidget({ id: 'calendar', icon: IconCalendarTime, options: { + hideWeekDays: { + type: 'switch', + defaultValue: true, + }, useSonarrv4: { type: 'switch', defaultValue: false, @@ -76,7 +80,7 @@ function CalendarTile({ widget }: CalendarTileProps) { size="xs" locale={i18n?.resolvedLanguage ?? 'en'} firstDayOfWeek={widget.properties.sundayStart ? 0 : 1} - hideWeekdays + hideWeekdays={widget.properties.hideWeekDays ? true : false} style={{ position: 'relative', top: -10 }} date={month} maxLevel="month"