calendar 40
This commit is contained in:
parent
c8effe3fa7
commit
c207f494c7
@ -1107,11 +1107,11 @@ export function CalendarClient({ initialCalendars, userId, userProfile }: Calend
|
|||||||
.filter(cal => visibleCalendarIds.includes(cal.id))
|
.filter(cal => visibleCalendarIds.includes(cal.id))
|
||||||
.flatMap(cal =>
|
.flatMap(cal =>
|
||||||
(cal.events || []).map(event => ({
|
(cal.events || []).map(event => ({
|
||||||
id: event.id,
|
id: event.id,
|
||||||
title: event.title,
|
title: event.title,
|
||||||
start: new Date(event.start),
|
start: new Date(event.start),
|
||||||
end: new Date(event.end),
|
end: new Date(event.end),
|
||||||
allDay: event.isAllDay,
|
allDay: event.isAllDay,
|
||||||
description: event.description,
|
description: event.description,
|
||||||
location: event.location,
|
location: event.location,
|
||||||
calendarId: event.calendarId,
|
calendarId: event.calendarId,
|
||||||
@ -1122,19 +1122,20 @@ export function CalendarClient({ initialCalendars, userId, userProfile }: Calend
|
|||||||
location: event.location,
|
location: event.location,
|
||||||
description: event.description,
|
description: event.description,
|
||||||
calendarId: event.calendarId,
|
calendarId: event.calendarId,
|
||||||
originalEvent: event
|
originalEvent: event,
|
||||||
|
color: cal.color
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
)}
|
)}
|
||||||
eventContent={(arg) => (
|
eventContent={(arg) => (
|
||||||
<div
|
<div
|
||||||
className="px-2 py-1 overflow-hidden w-full transition-all rounded-sm"
|
className="px-2 py-1 overflow-hidden w-full transition-all rounded-sm hover:brightness-110"
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: `${arg.event.backgroundColor}dd`, // Add transparency
|
backgroundColor: `${arg.event.backgroundColor}`,
|
||||||
boxShadow: `inset 0 0 0 1px ${arg.event.backgroundColor}, 0 1px 2px ${arg.event.backgroundColor}40`
|
boxShadow: `inset 0 0 0 1px ${arg.event.backgroundColor}, 0 1px 2px ${arg.event.backgroundColor}40`
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-1.5 text-xs">
|
<div className="flex items-center gap-1.5 text-xs text-white">
|
||||||
{!arg.event.allDay && (
|
{!arg.event.allDay && (
|
||||||
<span className="font-medium whitespace-nowrap">
|
<span className="font-medium whitespace-nowrap">
|
||||||
{new Date(arg.event.start).toLocaleTimeString('fr-FR', {
|
{new Date(arg.event.start).toLocaleTimeString('fr-FR', {
|
||||||
@ -1151,7 +1152,7 @@ export function CalendarClient({ initialCalendars, userId, userProfile }: Calend
|
|||||||
)}
|
)}
|
||||||
eventClassNames={(arg) => [
|
eventClassNames={(arg) => [
|
||||||
'hover:ring-2 hover:ring-offset-1',
|
'hover:ring-2 hover:ring-offset-1',
|
||||||
'transition-all duration-200',
|
'transition-all duration-150',
|
||||||
arg.event.allDay ? 'py-1' : ''
|
arg.event.allDay ? 'py-1' : ''
|
||||||
]}
|
]}
|
||||||
locale={frLocale}
|
locale={frLocale}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user