Compare commits
3 Commits
8bc4b5a66c
...
845a2d377c
Author | SHA1 | Date |
---|---|---|
Asaf Gartner | 845a2d377c | |
Asaf Gartner | 79dcef9b7f | |
Asaf Gartner | d347b42e44 |
|
@ -363,6 +363,10 @@ func newHMNCalendar() *ical.Calendar {
|
||||||
version.SetText("1.0")
|
version.SetText("1.0")
|
||||||
cal.Props.Set(version)
|
cal.Props.Set(version)
|
||||||
|
|
||||||
|
name := ical.NewProp("X-WR-CALNAME")
|
||||||
|
name.SetText("Handmade Network")
|
||||||
|
cal.Props.Set(name)
|
||||||
|
|
||||||
return cal
|
return cal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,6 +375,7 @@ func emptyCalendarString() []byte {
|
||||||
empty := `BEGIN:VCALENDAR
|
empty := `BEGIN:VCALENDAR
|
||||||
VERSION:1.0
|
VERSION:1.0
|
||||||
PRODID:Handmade Network
|
PRODID:Handmade Network
|
||||||
|
X-WR-CALNAME:Handmade Network
|
||||||
END:VCALENDAR
|
END:VCALENDAR
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|
|
@ -178,11 +178,11 @@ func BuildCalendarIndex() string {
|
||||||
return Url("/calendar", nil)
|
return Url("/calendar", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
var RegexCalendarICal = regexp.MustCompile("^/calendar.ical$")
|
var RegexCalendarICal = regexp.MustCompile("^/Handmade Network.ical$")
|
||||||
|
|
||||||
func BuildCalendarICal() string {
|
func BuildCalendarICal() string {
|
||||||
defer CatchPanic()
|
defer CatchPanic()
|
||||||
return Url("/calendar.ical", nil)
|
return Url("/Handmade Network.ical", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// QUESTION(ben): Can we change these routes?
|
// QUESTION(ben): Can we change these routes?
|
||||||
|
|
|
@ -63,8 +63,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
icalLink.disabled = false;
|
||||||
if (hasAll) {
|
if (hasAll) {
|
||||||
icalLink.href = baseICalUrl;
|
icalLink.href = baseICalUrl;
|
||||||
|
} else if (icalFilter.length == 0) {
|
||||||
|
icalLink.removeAttribute("href");
|
||||||
} else {
|
} else {
|
||||||
icalFilter.sort();
|
icalFilter.sort();
|
||||||
let url = new URL(baseICalUrl);
|
let url = new URL(baseICalUrl);
|
||||||
|
|
Loading…
Reference in New Issue