Implement complete CalDAV events integration
Added full CalDAV integration to display real calendar events from Baikal server: Backend changes: - Added CalDAV client with iCalendar parsing and XML handling - Created /api/calendar/events endpoint with authentication - Fixed multiline regex patterns for namespace-prefixed XML tags - Added proper calendar path discovery and event filtering Frontend changes: - Created CalendarService for API communication - Updated calendar UI to display events as blue boxes with titles - Added loading states and error handling - Integrated real-time event fetching on calendar load Now successfully displays 3 test events from the Baikal server with proper date formatting and responsive design. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -89,13 +89,23 @@ pub fn Calendar(props: &CalendarProps) -> Html {
|
||||
html! {
|
||||
<div class="event-indicators">
|
||||
{
|
||||
events.iter().take(3).map(|event| {
|
||||
html! { <div class="event-dot" title={event.clone()}></div> }
|
||||
events.iter().take(2).map(|event| {
|
||||
html! {
|
||||
<div class="event-box" title={event.clone()}>
|
||||
{
|
||||
if event.len() > 15 {
|
||||
format!("{}...", &event[..12])
|
||||
} else {
|
||||
event.clone()
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}).collect::<Html>()
|
||||
}
|
||||
{
|
||||
if events.len() > 3 {
|
||||
html! { <div class="more-events">{format!("+{}", events.len() - 3)}</div> }
|
||||
if events.len() > 2 {
|
||||
html! { <div class="more-events">{format!("+{} more", events.len() - 2)}</div> }
|
||||
} else {
|
||||
html! {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user