mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
New: Support for running from a sub folder (reverse proxy)
This commit is contained in:
@@ -6,8 +6,9 @@ define(
|
||||
'Settings/Indexers/ItemView',
|
||||
'Settings/Indexers/EditView',
|
||||
'Settings/Indexers/Collection',
|
||||
'System/StatusModel',
|
||||
'underscore'
|
||||
], function (AppLayout, Marionette, IndexerItemView, IndexerEditView, IndexerCollection, _) {
|
||||
], function (AppLayout, Marionette, IndexerItemView, IndexerEditView, IndexerCollection, StatusModel, _) {
|
||||
return Marionette.CompositeView.extend({
|
||||
itemView : IndexerItemView,
|
||||
itemViewContainer: '#x-indexers',
|
||||
@@ -29,10 +30,10 @@ define(
|
||||
var self = this;
|
||||
//TODO: Is there a better way to deal with changing URLs?
|
||||
var schemaCollection = new IndexerCollection();
|
||||
schemaCollection.url = '/api/indexer/schema';
|
||||
schemaCollection.url = StatusModel.get('urlBase') + '/api/indexer/schema';
|
||||
schemaCollection.fetch({
|
||||
success: function (collection) {
|
||||
collection.url = '/api/indexer';
|
||||
collection.url = './api/indexer';
|
||||
var model = _.first(collection.models);
|
||||
|
||||
model.set({
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
define([
|
||||
'AppLayout',
|
||||
'Settings/Notifications/Collection',
|
||||
'Settings/Notifications/AddView'
|
||||
], function (AppLayout, NotificationCollection, AddSelectionNotificationView) {
|
||||
'Settings/Notifications/AddView',
|
||||
'System/StatusModel'
|
||||
], function (AppLayout, NotificationCollection, AddSelectionNotificationView, StatusModel) {
|
||||
return ({
|
||||
|
||||
open: function (collection) {
|
||||
var schemaCollection = new NotificationCollection();
|
||||
schemaCollection.url = '/api/notification/schema';
|
||||
schemaCollection.url = StatusModel.get('urlBase') + '/api/notification/schema';
|
||||
schemaCollection.fetch();
|
||||
schemaCollection.url = '/api/notification';
|
||||
schemaCollection.url = StatusModel.get('urlBase') + '/api/notification';
|
||||
|
||||
var view = new AddSelectionNotificationView({ collection: schemaCollection, notificationCollection: collection});
|
||||
AppLayout.modalRegion.show(view);
|
||||
|
||||
Reference in New Issue
Block a user