Add visibility toggles for CalDAV calendars with event filtering
Users can now toggle visibility of CalDAV calendars using checkboxes in the sidebar, matching the behavior of external calendars. Events from hidden calendars are automatically filtered out of the calendar view. Changes: - Add is_visible field to CalendarInfo (frontend & backend) - Add visibility checkboxes to CalDAV calendar list items - Implement real-time event filtering based on calendar visibility - Add CSS styling matching external calendar checkboxes - Default new calendars to visible state 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1067,6 +1067,21 @@ pub fn App() -> Html {
|
||||
on_color_picker_toggle={on_color_picker_toggle}
|
||||
available_colors={(*available_colors).clone()}
|
||||
on_calendar_context_menu={on_calendar_context_menu}
|
||||
on_calendar_visibility_toggle={Callback::from({
|
||||
let user_info = user_info.clone();
|
||||
move |calendar_path: String| {
|
||||
let user_info = user_info.clone();
|
||||
wasm_bindgen_futures::spawn_local(async move {
|
||||
if let Some(mut info) = (*user_info).clone() {
|
||||
// Toggle the visibility
|
||||
if let Some(calendar) = info.calendars.iter_mut().find(|c| c.path == calendar_path) {
|
||||
calendar.is_visible = !calendar.is_visible;
|
||||
user_info.set(Some(info));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})}
|
||||
current_view={(*current_view).clone()}
|
||||
on_view_change={on_view_change}
|
||||
current_theme={(*current_theme).clone()}
|
||||
|
||||
Reference in New Issue
Block a user