diff --git a/frontend/src/components/week_view.rs b/frontend/src/components/week_view.rs index 45c9c4d..e147de7 100644 --- a/frontend/src/components/week_view.rs +++ b/frontend/src/components/week_view.rs @@ -915,7 +915,7 @@ pub fn week_view(props: &WeekViewProps) -> Html { // Event content
{event.summary.as_ref().unwrap_or(&"Untitled".to_string())}
- {if !is_all_day { + {if !is_all_day && duration_pixels > 30.0 { html! {
{time_display}
} } else { html! {} @@ -985,7 +985,11 @@ pub fn week_view(props: &WeekViewProps) -> Html { style={format!("top: {}px; height: {}px; background-color: {}; opacity: 0.7;", preview_position, duration_pixels, event_color)} >
{event.summary.as_ref().unwrap_or(&"Untitled".to_string())}
-
{format!("{} - {}", new_start_time.format("%I:%M %p"), new_end_time.format("%I:%M %p"))}
+ {if duration_pixels > 30.0 { + html! {
{format!("{} - {}", new_start_time.format("%I:%M %p"), new_end_time.format("%I:%M %p"))}
} + } else { + html! {} + }}
} }, @@ -1014,7 +1018,11 @@ pub fn week_view(props: &WeekViewProps) -> Html { style={format!("top: {}px; height: {}px; background-color: {}; opacity: 0.7;", new_start_pixels, new_height, event_color)} >
{event.summary.as_ref().unwrap_or(&"Untitled".to_string())}
-
{format!("{} - {}", new_start_time.format("%I:%M %p"), original_end.time().format("%I:%M %p"))}
+ {if new_height > 30.0 { + html! {
{format!("{} - {}", new_start_time.format("%I:%M %p"), original_end.time().format("%I:%M %p"))}
} + } else { + html! {} + }} } }, @@ -1037,7 +1045,11 @@ pub fn week_view(props: &WeekViewProps) -> Html { style={format!("top: {}px; height: {}px; background-color: {}; opacity: 0.7;", original_start_pixels, new_height, event_color)} >
{event.summary.as_ref().unwrap_or(&"Untitled".to_string())}
-
{format!("{} - {}", original_start.time().format("%I:%M %p"), new_end_time.format("%I:%M %p"))}
+ {if new_height > 30.0 { + html! {
{format!("{} - {}", original_start.time().format("%I:%M %p"), new_end_time.format("%I:%M %p"))}
} + } else { + html! {} + }} } }