Add option to hide/show week days on calendar

Fixes Calendar Weekdays line #1091
This commit is contained in:
ajnart
2023-06-28 19:59:25 +09:00
parent 618f67459b
commit d008baa70a
2 changed files with 9 additions and 2 deletions

View File

@@ -12,7 +12,10 @@
}, },
"radarrReleaseType": { "radarrReleaseType": {
"label": "Radarr release type" "label": "Radarr release type"
},
"hideWeekDays": {
"label": "Hide week days"
} }
} }
} }
} }

View File

@@ -16,6 +16,10 @@ const definition = defineWidget({
id: 'calendar', id: 'calendar',
icon: IconCalendarTime, icon: IconCalendarTime,
options: { options: {
hideWeekDays: {
type: 'switch',
defaultValue: true,
},
useSonarrv4: { useSonarrv4: {
type: 'switch', type: 'switch',
defaultValue: false, defaultValue: false,
@@ -76,7 +80,7 @@ function CalendarTile({ widget }: CalendarTileProps) {
size="xs" size="xs"
locale={i18n?.resolvedLanguage ?? 'en'} locale={i18n?.resolvedLanguage ?? 'en'}
firstDayOfWeek={widget.properties.sundayStart ? 0 : 1} firstDayOfWeek={widget.properties.sundayStart ? 0 : 1}
hideWeekdays hideWeekdays={widget.properties.hideWeekDays ? true : false}
style={{ position: 'relative', top: -10 }} style={{ position: 'relative', top: -10 }}
date={month} date={month}
maxLevel="month" maxLevel="month"