Major CSS cleanup and mobile detection system
CSS Improvements: - Remove all mobile responsive CSS (@media queries) - 348+ lines removed - Add comprehensive CSS variables for glass effects, control dimensions, transitions - Consolidate duplicate patterns (43+ transition, 37+ border-radius, 61+ padding instances) - Remove legacy week grid CSS section - Reduce total CSS from 4,197 to 3,828 lines (8.8% reduction) Sidebar Enhancements: - Remove unused sidebar-nav div and navigation link - Standardize all dropdown controls to consistent 40px height and styling - Reduce calendar item padding from 0.75rem to 0.5rem for more compact display - Unify theme-selector and style-selector styling with view-selector Mobile Detection: - Add MobileWarningModal component with device detection - Show helpful popup directing mobile users to native CalDAV apps - Add Navigator and DomTokenList web-sys features - Desktop-focused experience with appropriate mobile guidance 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
use crate::components::{
|
||||
CalendarContextMenu, ContextMenu, CreateCalendarModal, CreateEventModal, DeleteAction,
|
||||
EditAction, EventContextMenu, EventModal, EventCreationData, ExternalCalendarModal, RouteHandler,
|
||||
Sidebar, Theme, ViewMode,
|
||||
EditAction, EventContextMenu, EventModal, EventCreationData, ExternalCalendarModal,
|
||||
MobileWarningModal, RouteHandler, Sidebar, Theme, ViewMode,
|
||||
};
|
||||
use crate::components::mobile_warning_modal::is_mobile_device;
|
||||
use crate::components::sidebar::{Style};
|
||||
use crate::models::ical::VEvent;
|
||||
use crate::services::{calendar_service::{UserInfo, ExternalCalendar}, CalendarService};
|
||||
@@ -117,6 +118,9 @@ pub fn App() -> Html {
|
||||
// External calendar state
|
||||
let external_calendars = use_state(|| -> Vec<ExternalCalendar> { Vec::new() });
|
||||
let external_calendar_events = use_state(|| -> Vec<VEvent> { Vec::new() });
|
||||
|
||||
// Mobile warning state
|
||||
let mobile_warning_open = use_state(|| is_mobile_device());
|
||||
let external_calendar_modal_open = use_state(|| false);
|
||||
let refresh_interval = use_state(|| -> Option<Interval> { None });
|
||||
|
||||
@@ -274,6 +278,13 @@ pub fn App() -> Html {
|
||||
})
|
||||
};
|
||||
|
||||
let on_mobile_warning_close = {
|
||||
let mobile_warning_open = mobile_warning_open.clone();
|
||||
Callback::from(move |_| {
|
||||
mobile_warning_open.set(false);
|
||||
})
|
||||
};
|
||||
|
||||
let on_view_change = {
|
||||
let current_view = current_view.clone();
|
||||
Callback::from(move |new_view: ViewMode| {
|
||||
@@ -1676,6 +1687,12 @@ pub fn App() -> Html {
|
||||
}
|
||||
})}
|
||||
/>
|
||||
|
||||
// Mobile warning modal
|
||||
<MobileWarningModal
|
||||
is_open={*mobile_warning_open}
|
||||
on_close={on_mobile_warning_close}
|
||||
/>
|
||||
</div>
|
||||
</BrowserRouter>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user