Fixes for the time grid for late night events #8

Merged
connor merged 3 commits from bugfix/week-view-time-grid into main 2025-09-02 10:39:24 -04:00
4 changed files with 4 additions and 9 deletions
Showing only changes of commit 970b0a07da - Show all commits

View File

@@ -2,7 +2,6 @@ use axum::{extract::State, http::HeaderMap, response::Json};
use std::sync::Arc;
use crate::calendar::CalDAVClient;
use crate::config::CalDAVConfig;
use crate::{
models::{ApiError, AuthResponse, CalDAVLoginRequest, CalendarInfo, UserInfo},
AppState,

View File

@@ -81,12 +81,6 @@ impl Style {
}
}
pub fn display_name(&self) -> &'static str {
match self {
Style::Default => "Default",
Style::Google => "Google Calendar",
}
}
pub fn stylesheet_path(&self) -> Option<&'static str> {
match self {

View File

@@ -2,4 +2,3 @@ pub mod calendar_service;
pub mod preferences;
pub use calendar_service::CalendarService;
pub use preferences::PreferencesService;

View File

@@ -15,6 +15,7 @@ pub struct UserPreferences {
}
#[derive(Debug, Serialize)]
#[allow(dead_code)]
pub struct UpdatePreferencesRequest {
pub calendar_selected_date: Option<String>,
pub calendar_time_increment: Option<i32>,
@@ -23,10 +24,12 @@ pub struct UpdatePreferencesRequest {
pub calendar_colors: Option<String>,
}
#[allow(dead_code)]
pub struct PreferencesService {
base_url: String,
}
#[allow(dead_code)]
impl PreferencesService {
pub fn new() -> Self {
let base_url = option_env!("BACKEND_API_URL")
@@ -147,7 +150,7 @@ impl PreferencesService {
let session_token = LocalStorage::get::<String>("session_token")
.map_err(|_| "No session token found".to_string())?;
let mut request = UpdatePreferencesRequest {
let request = UpdatePreferencesRequest {
calendar_selected_date: LocalStorage::get::<String>("calendar_selected_date").ok(),
calendar_time_increment: LocalStorage::get::<u32>("calendar_time_increment").ok().map(|i| i as i32),
calendar_view_mode: LocalStorage::get::<String>("calendar_view_mode").ok(),