Merged
Conversation
Add documentation, fix bugs and optimize code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The purpose of this PR is to add a way to subscribe to the mottagning schedule. It does this by creating a new API route
/api/schema.icswhich serves an iCalendar file containing the events from the calendar. It also adds a new button on the schedule page which let's you subscribe this calendar file.Changelog
Below is a list of the changes in this pull request. The format is based on Keep a Changelog.
Added
/api/schema.icswhich server an iCalendar file containing the mottagning schedule. The file is generated by combining the calendars fetched from the_kalender[n]links. The calendar takes the name and other data from_kalender0and appends all the events of the other calendars. The calendar is cached and expires after a set time (see below) or if the calendar URLs are changed.CachedCalendarclass which holds a cached calendar body as a serialized string.CALENDAR_CACHE_EXPIRATION_TIMEwhich defines a time in minutes before a cached calendar will expire and need to be regenerated. The default is 3 hours.Modalcomponent, used for popup windows.CalendarSubscribeModal, a popup for subscribing to a calendar at a certain URL, defined by a prop./schemapage which opens aCalendarSubscribeModalfor subscribing to/api/schema.ics.iamcaldependency for editing calendars, used in the merging of calendars.Changed