From 543113292bca5ed8730e3e4306ff4d880f5f4fe8 Mon Sep 17 00:00:00 2001 From: ajnart Date: Mon, 17 Apr 2023 14:48:04 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Calendar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/calendar/CalendarDay.tsx | 4 +- src/widgets/calendar/CalendarTile.tsx | 77 ++++++++++++++------------- 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/src/widgets/calendar/CalendarDay.tsx b/src/widgets/calendar/CalendarDay.tsx index 86887e03a..7124e40e7 100644 --- a/src/widgets/calendar/CalendarDay.tsx +++ b/src/widgets/calendar/CalendarDay.tsx @@ -1,4 +1,4 @@ -import { Box, Indicator, IndicatorProps, Popover } from '@mantine/core'; +import { ActionIcon, Box, Button, Indicator, IndicatorProps, Popover } from '@mantine/core'; import { useDisclosure } from '@mantine/hooks'; import { isToday } from '../../tools/shared/time/date.tool'; import { MediaList } from './MediaList'; @@ -70,7 +70,7 @@ const DayIndicator = ({ color, medias, children, position }: DayIndicatorProps) if (medias.length === 0) return children; return ( - + {children} ); diff --git a/src/widgets/calendar/CalendarTile.tsx b/src/widgets/calendar/CalendarTile.tsx index 1d0008f04..e1cac7830 100644 --- a/src/widgets/calendar/CalendarTile.tsx +++ b/src/widgets/calendar/CalendarTile.tsx @@ -9,6 +9,7 @@ import { defineWidget } from '../helper'; import { IWidget } from '../widgets'; import { CalendarDay } from './CalendarDay'; import { MediasType } from './type'; +import { useColorTheme } from '../../tools/color'; const definition = defineWidget({ id: 'calendar', @@ -50,6 +51,7 @@ interface CalendarTileProps { function CalendarTile({ widget }: CalendarTileProps) { const { name: configName } = useConfigContext(); const [month, setMonth] = useState(new Date()); + const { secondaryColor } = useColorTheme(); const { data: medias } = useQuery({ queryKey: ['calendar/medias', { month: month.getMonth(), year: month.getFullYear() }], @@ -65,42 +67,45 @@ function CalendarTile({ widget }: CalendarTileProps) { }); return ( - - ( - - )} - /> - + ( + + )} + /> ); } From 252651c1fbc7cd73eb44821758e16fb24d5f0730 Mon Sep 17 00:00:00 2001 From: ajnart Date: Mon, 17 Apr 2023 15:07:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20Fix=20edit=20modal=20zIndex?= =?UTF-8?q?=20and=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dashboard/Tiles/Widgets/WidgetsMenu.tsx | 2 +- src/widgets/calendar/CalendarDay.tsx | 2 +- src/widgets/calendar/CalendarTile.tsx | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Dashboard/Tiles/Widgets/WidgetsMenu.tsx b/src/components/Dashboard/Tiles/Widgets/WidgetsMenu.tsx index 491ae346f..5d1e49023 100644 --- a/src/components/Dashboard/Tiles/Widgets/WidgetsMenu.tsx +++ b/src/components/Dashboard/Tiles/Widgets/WidgetsMenu.tsx @@ -70,7 +70,7 @@ export const WidgetsMenu = ({ integration, widget }: WidgetsMenuProps) => { // Cast as the right type for the correct widget widgetOptions: widgetDefinitionObject.options as any, }, - zIndex: 5, + zIndex: 250, }); }; diff --git a/src/widgets/calendar/CalendarDay.tsx b/src/widgets/calendar/CalendarDay.tsx index 7124e40e7..51616521f 100644 --- a/src/widgets/calendar/CalendarDay.tsx +++ b/src/widgets/calendar/CalendarDay.tsx @@ -1,4 +1,4 @@ -import { ActionIcon, Box, Button, Indicator, IndicatorProps, Popover } from '@mantine/core'; +import { Box, Indicator, IndicatorProps, Popover } from '@mantine/core'; import { useDisclosure } from '@mantine/hooks'; import { isToday } from '../../tools/shared/time/date.tool'; import { MediaList } from './MediaList'; diff --git a/src/widgets/calendar/CalendarTile.tsx b/src/widgets/calendar/CalendarTile.tsx index e1cac7830..93d207378 100644 --- a/src/widgets/calendar/CalendarTile.tsx +++ b/src/widgets/calendar/CalendarTile.tsx @@ -9,7 +9,6 @@ import { defineWidget } from '../helper'; import { IWidget } from '../widgets'; import { CalendarDay } from './CalendarDay'; import { MediasType } from './type'; -import { useColorTheme } from '../../tools/color'; const definition = defineWidget({ id: 'calendar', @@ -51,7 +50,6 @@ interface CalendarTileProps { function CalendarTile({ widget }: CalendarTileProps) { const { name: configName } = useConfigContext(); const [month, setMonth] = useState(new Date()); - const { secondaryColor } = useColorTheme(); const { data: medias } = useQuery({ queryKey: ['calendar/medias', { month: month.getMonth(), year: month.getFullYear() }],