mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 05:45:31 +02:00
Added iCal feed for the calendar, reachable through
/feed/calendar/NzbDrone.ics or through the calendar page.
This commit is contained in:
16
src/UI/Calendar/CalendarFeedView.js
Normal file
16
src/UI/Calendar/CalendarFeedView.js
Normal file
@@ -0,0 +1,16 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
], function (Marionette) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Calendar/CalendarFeedViewTemplate',
|
||||
|
||||
onRender: function() {
|
||||
// hackish way to determine the correct url, as using urlBase seems to only work for reverse proxies or so
|
||||
var ics = '//' + window.location.host + '/feed/calendar/NzbDrone.ics';
|
||||
this.$('#ical-url').val(window.location.protocol + ics);
|
||||
this.$('#ical-subscribe-button').attr('href', 'webcal:' + ics);
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user