From 14d546bdc3e326f90a2dfdde9b904aad2591cfa2 Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 10 Sep 2024 23:46:59 +0200 Subject: [PATCH] finalize todo --- src/model/personal/cal.rs | 6 +++++- templates/index.html.tera | 36 ++++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/model/personal/cal.rs b/src/model/personal/cal.rs index 194be34..88e6b7e 100644 --- a/src/model/personal/cal.rs +++ b/src/model/personal/cal.rs @@ -1,12 +1,16 @@ use std::io::Write; -use ics::ICalendar; +use ics::{components::Property, ICalendar}; use sqlx::SqlitePool; use crate::model::{event::Event, trip::Trip, user::User}; pub(crate) async fn get_personal_cal(db: &SqlitePool, user: &User) -> String { let mut calendar = ICalendar::new("2.0", "ics-rs"); + calendar.push(Property::new( + "X-WR-CALNAME", + "Donau Linz - Deine Ausfahrten", + )); let events = Event::all_with_user(db, user).await; for event in events { diff --git a/templates/index.html.tera b/templates/index.html.tera index 3345425..0d8200b 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -103,7 +103,7 @@