mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
Target to .NET 4.6.1, Update SignalR, Owin, Nancy (#84)
* Target .net 4.6.1 * Update to SignalR 2.2.2 * Fix Socks Reference in NZBDrone.Common * UI Fixes, Build Fixes * Update Nancy to 1.4.4 * Upgrade Microsoft Owin to 3.1.0 * Delete npm-shrinkwrap.json * Fix SignalR Messages
This commit is contained in:
parent
fbe6bfc78e
commit
f460f630c3
317 changed files with 9128 additions and 38017 deletions
|
@ -23,7 +23,6 @@ function AppUpdatedModal(props) {
|
|||
|
||||
AppUpdatedModal.propTypes = {
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
version: PropTypes.string.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { createSelector } from 'reselect';
|
||||
import AppUpdatedModal from './AppUpdatedModal';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
(state) => state.app.version,
|
||||
(version) => {
|
||||
return {
|
||||
version
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function createMapDispatchToProps(dispatch, props) {
|
||||
return {
|
||||
onModalClose() {
|
||||
|
@ -21,4 +9,4 @@ function createMapDispatchToProps(dispatch, props) {
|
|||
};
|
||||
}
|
||||
|
||||
export default connect(createMapStateToProps, createMapDispatchToProps)(AppUpdatedModal);
|
||||
export default connect(null, createMapDispatchToProps)(AppUpdatedModal);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { kinds } from 'Helpers/Props';
|
||||
import FieldSet from 'Components/FieldSet';
|
||||
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
|
||||
import Button from 'Components/Link/Button';
|
||||
import ModalContent from 'Components/Modal/ModalContent';
|
||||
|
@ -88,10 +87,9 @@ function AppUpdatedModalContent(props) {
|
|||
}
|
||||
|
||||
AppUpdatedModalContent.propTypes = {
|
||||
isOpen: PropTypes.bool.isRequired,
|
||||
version: PropTypes.string.isRequired,
|
||||
isPopulated: PropTypes.bool.isRequired,
|
||||
error: PropTypes.object.isRequired,
|
||||
error: PropTypes.object,
|
||||
items: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||||
onSeeChangesPress: PropTypes.func.isRequired,
|
||||
onModalClose: PropTypes.func.isRequired
|
||||
|
|
|
@ -43,10 +43,16 @@ class AppUpdatedModalContentConnector extends Component {
|
|||
//
|
||||
// Lifecycle
|
||||
|
||||
componentDidUpdate() {
|
||||
componentDidMount() {
|
||||
this.props.dispatchFetchUpdates();
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (prevProps.version !== this.props.version) {
|
||||
this.props.dispatchFetchUpdates();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Render
|
||||
|
||||
|
@ -63,6 +69,7 @@ class AppUpdatedModalContentConnector extends Component {
|
|||
}
|
||||
|
||||
AppUpdatedModalContentConnector.propTypes = {
|
||||
version: PropTypes.string.isRequired,
|
||||
dispatchFetchUpdates: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import $ from 'jquery';
|
||||
import 'signalr';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Component } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
@ -8,7 +9,6 @@ import { setAppValue, setVersion } from 'Store/Actions/appActions';
|
|||
import { update, updateItem, removeItem } from 'Store/Actions/baseActions';
|
||||
import { fetchHealth } from 'Store/Actions/systemActions';
|
||||
import { fetchQueue, fetchQueueDetails } from 'Store/Actions/queueActions';
|
||||
require('signalR');
|
||||
|
||||
function getState(status) {
|
||||
switch (status) {
|
||||
|
@ -59,7 +59,7 @@ class SignalRConnector extends Component {
|
|||
constructor(props, context) {
|
||||
super(props, context);
|
||||
|
||||
this.signalRconnectionOptions = { transport: ['longPolling'] };
|
||||
this.signalRconnectionOptions = { transport: ['webSockets', 'longPolling'] };
|
||||
this.signalRconnection = null;
|
||||
this.retryInterval = 5;
|
||||
this.retryTimeoutId = null;
|
||||
|
@ -230,7 +230,7 @@ class SignalRConnector extends Component {
|
|||
}
|
||||
|
||||
handleVersion = (body) => {
|
||||
const version = body.version;
|
||||
const version = body.Version;
|
||||
|
||||
this.props.setVersion({ version });
|
||||
}
|
||||
|
|
9842
frontend/src/JsLibraries/jquery.js
vendored
9842
frontend/src/JsLibraries/jquery.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
12
frontend/src/Shims/jquery.js
vendored
12
frontend/src/Shims/jquery.js
vendored
|
@ -1,8 +1,8 @@
|
|||
var jquery = require('JsLibraries/jquery');
|
||||
var ajax = require('jQuery/jquery.ajax');
|
||||
import $ from 'jquery';
|
||||
import ajax from 'jQuery/jquery.ajax';
|
||||
|
||||
ajax(jquery);
|
||||
ajax($);
|
||||
|
||||
window.$ = jquery;
|
||||
window.jQuery = jquery;
|
||||
module.exports = jquery;
|
||||
window.$ = $;
|
||||
window.jQuery = $;
|
||||
export default $;
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
require('jquery');
|
||||
const signalR = require('JsLibraries/jquery.signalR');
|
||||
|
||||
module.exports = signalR;
|
|
@ -1,4 +1,4 @@
|
|||
const $ = require('JsLibraries/jquery');
|
||||
import $ from 'jquery';
|
||||
|
||||
const absUrlRegex = /^(https?:)?\/\//i;
|
||||
const apiRoot = window.Sonarr.apiRoot;
|
||||
|
@ -34,9 +34,9 @@ function addApiKey(xhr) {
|
|||
xhr.headers['X-Api-Key'] = window.Sonarr.apiKey;
|
||||
}
|
||||
|
||||
module.exports = function(jQuery) {
|
||||
const originalAjax = jQuery.ajax;
|
||||
jQuery.ajax = function(xhr) {
|
||||
export default function() {
|
||||
const originalAjax = $.ajax;
|
||||
$.ajax = function(xhr) {
|
||||
if (xhr && isRelative(xhr)) {
|
||||
moveBodyToQuery(xhr);
|
||||
addRootUrl(xhr);
|
||||
|
@ -44,4 +44,4 @@ module.exports = function(jQuery) {
|
|||
}
|
||||
return originalAjax.apply(this, arguments);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
import 'Shims/jquery';
|
||||
|
||||
__webpack_public_path__ = `${window.Sonarr.urlBase}/`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue