Handling artist tracks >10 in separate view, fixes #344

This commit is contained in:
James Barnsley
2019-02-03 11:01:00 +13:00
parent a90d6b7fe7
commit 39f8514098
8 changed files with 309 additions and 196 deletions

View File

@ -5601,7 +5601,7 @@ var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _helpers = __webpack_require__(1);
@ -5640,10 +5640,17 @@ var _class = function (_React$Component) {
}, {
key: 'isLinkActive',
value: function isLinkActive(link) {
// Decode both links
// This handles issues where one link is encoded and the other isn't,
// but they're otherwise identical
link = decodeURIComponent(link);
var current_link = decodeURIComponent(this.props.history.location.pathname);
if (this.props.exact) {
return this.props.history.location.pathname === link;
return current_link === link;
} else {
return this.props.history.location.pathname.startsWith(link);
return current_link.startsWith(link);
}
}
}, {
@ -19663,6 +19670,103 @@ exports.default = DropdownField;
/***/ }),
/* 28 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !==
'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
/***/ }),
/* 29 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -19725,7 +19829,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/***/ }),
/* 29 */
/* 30 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -19795,7 +19899,7 @@ module.exports = warning;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
/***/ }),
/* 30 */
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
@ -19830,7 +19934,7 @@ if (process.env.NODE_ENV !== 'production') {
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)))
/***/ }),
/* 31 */
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -19957,114 +20061,15 @@ var Parallax = function (_React$Component) {
exports.default = Parallax;
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !==
'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
/***/ }),
/* 33 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
if (process.env.NODE_ENV !== 'production') {
@ -20934,7 +20939,7 @@ var _reactDom = __webpack_require__(50);
var _reactDom2 = _interopRequireDefault(_reactDom);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _helpers = __webpack_require__(1);
@ -23145,7 +23150,7 @@ var createTransitionManager = function createTransitionManager() {
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
@ -23358,11 +23363,9 @@ function warn(s) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*
*/
@ -23400,11 +23403,9 @@ module.exports = emptyFunction;
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright (c) 2013-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
@ -23461,12 +23462,10 @@ module.exports = invariant;
"use strict";
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@ -23804,7 +23803,7 @@ var createTransitionManager = function createTransitionManager() {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@ -25057,7 +25056,7 @@ Link.contextTypes = {
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
@ -25269,12 +25268,10 @@ function trim(s) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
@ -26128,7 +26125,7 @@ var generatePath = function generatePath() {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(80);
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@ -27123,7 +27120,7 @@ var _reactRedux = __webpack_require__(4);
var _redux = __webpack_require__(2);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _bootstrap = __webpack_require__(175);
@ -27164,7 +27161,7 @@ _reactDom2.default.render(_react2.default.createElement(
* LICENSE file in the root directory of this source tree.
*/
var k=__webpack_require__(32),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,z=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.memo"):
var k=__webpack_require__(28),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.concurrent_mode"):60111,y=n?Symbol.for("react.forward_ref"):60112,z=n?Symbol.for("react.suspense"):60113,A=n?Symbol.for("react.memo"):
60115,B=n?Symbol.for("react.lazy"):60116,C="function"===typeof Symbol&&Symbol.iterator;function aa(a,b,e,c,d,g,h,f){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[e,c,d,g,h,f],m=0;a=Error(b.replace(/%s/g,function(){return l[m++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
function D(a){for(var b=arguments.length-1,e="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)e+="&args[]="+encodeURIComponent(arguments[c+1]);aa(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F={};
function G(a,b,e){this.props=a;this.context=b;this.refs=F;this.updater=e||E}G.prototype.isReactComponent={};G.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?D("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};G.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function H(){}H.prototype=G.prototype;function I(a,b,e){this.props=a;this.context=b;this.refs=F;this.updater=e||E}var J=I.prototype=new H;
@ -27203,7 +27200,7 @@ if (process.env.NODE_ENV !== "production") {
(function() {
'use strict';
var _assign = __webpack_require__(32);
var _assign = __webpack_require__(28);
var checkPropTypes = __webpack_require__(118);
// TODO: this is special because it gets imported during build.
@ -29207,7 +29204,7 @@ module.exports = ReactPropTypesSecret;
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
var aa=__webpack_require__(0),n=__webpack_require__(32),ba=__webpack_require__(86);function ca(a,b,c,d,e,f,g,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[c,d,e,f,g,h],l=0;a=Error(b.replace(/%s/g,function(){return k[l++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
var aa=__webpack_require__(0),n=__webpack_require__(28),ba=__webpack_require__(86);function ca(a,b,c,d,e,f,g,h){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var k=[c,d,e,f,g,h],l=0;a=Error(b.replace(/%s/g,function(){return k[l++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
function t(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);ca(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}aa?void 0:t("227");function da(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}
var ea=!1,fa=null,ha=!1,ia=null,ja={onError:function(a){ea=!0;fa=a}};function ka(a,b,c,d,e,f,g,h,k){ea=!1;fa=null;da.apply(ja,arguments)}function la(a,b,c,d,e,f,g,h,k){ka.apply(this,arguments);if(ea){if(ea){var l=fa;ea=!1;fa=null}else t("198"),l=void 0;ha||(ha=!0,ia=l)}}var ma=null,na={};
function oa(){if(ma)for(var a in na){var b=na[a],c=ma.indexOf(a);-1<c?void 0:t("96",a);if(!pa[c]){b.extractEvents?void 0:t("97",a);pa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;qa.hasOwnProperty(h)?t("99",h):void 0;qa[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ra(k[e],g,h);e=!0}else f.registrationName?(ra(f.registrationName,g,h),e=!0):e=!1;e?void 0:t("98",d,a)}}}}
@ -30209,7 +30206,7 @@ if (process.env.NODE_ENV !== "production") {
'use strict';
var React = __webpack_require__(0);
var _assign = __webpack_require__(32);
var _assign = __webpack_require__(28);
var checkPropTypes = __webpack_require__(124);
var scheduler = __webpack_require__(86);
var tracing = __webpack_require__(126);
@ -51014,7 +51011,7 @@ if (process.env.NODE_ENV !== 'production') {
var assign = __webpack_require__(32);
var assign = __webpack_require__(28);
var ReactPropTypesSecret = __webpack_require__(58);
var checkPropTypes = __webpack_require__(132);
@ -52631,7 +52628,7 @@ function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, dis
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
@ -52706,7 +52703,7 @@ BrowserRouter.propTypes = {
var assign = __webpack_require__(32);
var assign = __webpack_require__(28);
var ReactPropTypesSecret = __webpack_require__(62);
var checkPropTypes = __webpack_require__(152);
@ -54218,7 +54215,7 @@ var createMemoryHistory = function createMemoryHistory() {
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
@ -54294,7 +54291,7 @@ HashRouter.propTypes = {
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
@ -54572,7 +54569,7 @@ Prompt.contextTypes = {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
@ -54708,7 +54705,7 @@ Redirect.contextTypes = {
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
@ -54889,7 +54886,7 @@ StaticRouter.childContextTypes = {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(29);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant__ = __webpack_require__(25);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_invariant__);
@ -58194,12 +58191,10 @@ _defineProperty(OutboundLink, "defaultProps", {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@ -58207,6 +58202,7 @@ _defineProperty(OutboundLink, "defaultProps", {
var emptyFunction = __webpack_require__(70);
var invariant = __webpack_require__(71);
var warning = __webpack_require__(99);
var assign = __webpack_require__(28);
var ReactPropTypesSecret = __webpack_require__(72);
var checkPropTypes = __webpack_require__(196);
@ -58305,7 +58301,8 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
objectOf: createObjectOfTypeChecker,
oneOf: createEnumTypeChecker,
oneOfType: createUnionTypeChecker,
shape: createShapeTypeChecker
shape: createShapeTypeChecker,
exact: createStrictShapeTypeChecker,
};
/**
@ -58520,7 +58517,7 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
if (typeof checker !== 'function') {
warning(
false,
'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
'received %s at index %s.',
getPostfixForTypeWarning(checker),
i
@ -58574,6 +58571,36 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
return createChainableTypeChecker(validate);
}
function createStrictShapeTypeChecker(shapeTypes) {
function validate(props, propName, componentName, location, propFullName) {
var propValue = props[propName];
var propType = getPropType(propValue);
if (propType !== 'object') {
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
}
// We need to check all keys in case some are required but missing from
// props.
var allKeys = assign({}, props[propName], shapeTypes);
for (var key in allKeys) {
var checker = shapeTypes[key];
if (!checker) {
return new PropTypeError(
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
);
}
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
if (error) {
return error;
}
}
return null;
}
return createChainableTypeChecker(validate);
}
function isNode(propValue) {
switch (typeof propValue) {
case 'number':
@ -58714,12 +58741,10 @@ module.exports = function(isValidElement, throwOnDirectAccess) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@ -58753,7 +58778,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
try {
// This is intentionally an invariant that gets caught. It's the same
// behavior as without this statement except with a better message.
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
} catch (ex) {
error = ex;
@ -58783,12 +58808,10 @@ module.exports = checkPropTypes;
"use strict";
/**
* Copyright 2013-present, Facebook, Inc.
* All rights reserved.
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
@ -58833,7 +58856,8 @@ module.exports = function() {
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim
shape: getShim,
exact: getShim
};
ReactPropTypes.checkPropTypes = emptyFunction;
@ -61634,7 +61658,7 @@ var MopidyMiddleware = function () {
var artist = Object.assign({}, response ? response[0].artists[0] : {}, {
is_mopidy: true,
albums_uris: helpers.arrayOf('uri', albums),
tracks: response.slice(0, 10)
tracks: response
});
store.dispatch(coreActions.artistLoaded(artist));
@ -66210,7 +66234,7 @@ var _reactDom2 = _interopRequireDefault(_reactDom);
var _redux = __webpack_require__(2);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _reactRedux = __webpack_require__(4);
@ -67144,7 +67168,7 @@ exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_history__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(79);
@ -67215,7 +67239,7 @@ MemoryRouter.propTypes = {
var assign = __webpack_require__(32);
var assign = __webpack_require__(28);
var ReactPropTypesSecret = __webpack_require__(75);
var checkPropTypes = __webpack_require__(229);
@ -68729,7 +68753,7 @@ var createMemoryHistory = function createMemoryHistory() {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant__ = __webpack_require__(40);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_invariant__);
@ -68820,7 +68844,7 @@ Prompt.contextTypes = {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
@ -68953,7 +68977,7 @@ Redirect.contextTypes = {
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_history__ = __webpack_require__(76);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Router__ = __webpack_require__(79);
@ -69115,7 +69139,7 @@ StaticRouter.childContextTypes = {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(38);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
@ -69207,7 +69231,7 @@ Switch.propTypes = {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(30);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types__ = __webpack_require__(31);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_prop_types__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__ = __webpack_require__(239);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_hoist_non_react_statics__);
@ -73097,7 +73121,7 @@ var _Thumbnail = __webpack_require__(11);
var _Thumbnail2 = _interopRequireDefault(_Thumbnail);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -73422,7 +73446,7 @@ var _redux = __webpack_require__(2);
var _reactRouter = __webpack_require__(44);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _ErrorMessage = __webpack_require__(34);
@ -73452,7 +73476,7 @@ var _Thumbnail = __webpack_require__(11);
var _Thumbnail2 = _interopRequireDefault(_Thumbnail);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -73674,7 +73698,7 @@ var Artist = function (_React$Component) {
_react2.default.createElement(
'div',
{ className: 'list-wrapper' },
_react2.default.createElement(_TrackList2.default, { className: 'artist-track-list', uri: artist.uri, tracks: artist.tracks }),
_react2.default.createElement(_TrackList2.default, { className: 'artist-track-list', uri: artist.uri, tracks: artist.tracks ? artist.tracks.splice(0, 10) : [] }),
_react2.default.createElement(_LazyLoadListener2.default, { showLoader: is_loading_tracks })
)
),
@ -73741,6 +73765,31 @@ var Artist = function (_React$Component) {
) : null
);
}
}, {
key: 'renderTracks',
value: function renderTracks() {
var artist = helpers.collate(this.props.artist, {
artists: this.props.artists,
tracks: this.props.tracks
});
if (!artist.tracks_uris || artist.tracks_uris && !artist.tracks || artist.tracks_uris.length !== artist.tracks.length) {
var is_loading_tracks = true;
} else {
var is_loading_tracks = false;
}
return _react2.default.createElement(
'div',
{ className: 'body related-artists' },
_react2.default.createElement(
'section',
{ className: 'list-wrapper no-top-padding' },
_react2.default.createElement(_TrackList2.default, { className: 'artist-track-list', uri: artist.uri, tracks: artist.tracks }),
_react2.default.createElement(_LazyLoadListener2.default, { showLoader: is_loading_tracks })
)
);
}
}, {
key: 'renderRelatedArtists',
value: function renderRelatedArtists() {
@ -73970,6 +74019,21 @@ var Artist = function (_React$Component) {
'Overview'
)
),
this.props.artist.tracks_uris && this.props.artist.tracks_uris.length > 10 ? _react2.default.createElement(
_Link2.default,
{
exact: true,
history: this.props.history,
activeClassName: 'sub-views__option--active',
className: 'sub-views__option',
to: '/artist/' + encodeURIComponent(this.props.uri) + '/tracks',
scrollTo: 'sub-views-menu' },
_react2.default.createElement(
'h4',
null,
'Tracks'
)
) : null,
this.props.artist.related_artists_uris ? _react2.default.createElement(
_Link2.default,
{
@ -74014,6 +74078,11 @@ var Artist = function (_React$Component) {
{ exact: true, path: '/artist/:id/related-artists' },
this.renderRelatedArtists()
),
_react2.default.createElement(
_reactRouterDom.Route,
{ exact: true, path: '/artist/:id/tracks' },
this.renderTracks()
),
_react2.default.createElement(
_reactRouterDom.Route,
{ exact: true, path: '/artist/:id/about' },
@ -74677,7 +74746,7 @@ var _Thumbnail = __webpack_require__(11);
var _Thumbnail2 = _interopRequireDefault(_Thumbnail);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -75164,7 +75233,7 @@ var _LazyLoadListener = __webpack_require__(22);
var _LazyLoadListener2 = _interopRequireDefault(_LazyLoadListener);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -76064,7 +76133,7 @@ var _Icon = __webpack_require__(5);
var _Icon2 = _interopRequireDefault(_Icon);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -77107,7 +77176,7 @@ var _reactRedux = __webpack_require__(4);
var _redux = __webpack_require__(2);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _Link = __webpack_require__(9);
@ -77878,7 +77947,7 @@ var _reactRedux = __webpack_require__(4);
var _redux = __webpack_require__(2);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _ConfirmationButton = __webpack_require__(111);
@ -83211,7 +83280,7 @@ var _Thumbnail = __webpack_require__(11);
var _Thumbnail2 = _interopRequireDefault(_Thumbnail);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -86309,7 +86378,7 @@ var _Icon = __webpack_require__(5);
var _Icon2 = _interopRequireDefault(_Icon);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -86932,7 +87001,7 @@ var _AlbumGrid = __webpack_require__(47);
var _AlbumGrid2 = _interopRequireDefault(_AlbumGrid);
var _Parallax = __webpack_require__(31);
var _Parallax = __webpack_require__(32);
var _Parallax2 = _interopRequireDefault(_Parallax);
@ -88784,7 +88853,7 @@ var _reactRedux = __webpack_require__(4);
var _redux = __webpack_require__(2);
var _reactRouterDom = __webpack_require__(28);
var _reactRouterDom = __webpack_require__(29);
var _Link = __webpack_require__(9);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -98,7 +98,7 @@
// Release details
// These are automatically injected to built HTML
var build = "1548988464";
var build = "1549144758";
var version = "3.32.1";
// Construct the script tag

View File

@ -21,10 +21,17 @@ export default class extends React.Component{
}
isLinkActive(link){
// Decode both links
// This handles issues where one link is encoded and the other isn't,
// but they're otherwise identical
link = decodeURIComponent(link);
var current_link = decodeURIComponent(this.props.history.location.pathname);
if (this.props.exact){
return this.props.history.location.pathname === link;
return current_link === link;
} else {
return this.props.history.location.pathname.startsWith(link);
return current_link.startsWith(link);
}
}

View File

@ -2066,7 +2066,7 @@ const MopidyMiddleware = (function(){
{
is_mopidy: true,
albums_uris: helpers.arrayOf('uri',albums),
tracks: response.slice(0,10)
tracks: response
}
);
store.dispatch(coreActions.artistLoaded(artist));

View File

@ -31,7 +31,7 @@ import * as spotifyActions from '../services/spotify/actions'
class Artist extends React.Component{
constructor(props){
super(props)
super(props);
}
componentDidMount(){
@ -175,7 +175,7 @@ class Artist extends React.Component{
<div className={"top-tracks col col--w"+(artist.related_artists && artist.related_artists.length > 0 ? "70" : "100")}>
{artist.tracks ? <h4>Top tracks</h4> : null}
<div className="list-wrapper">
<TrackList className="artist-track-list" uri={artist.uri} tracks={artist.tracks} />
<TrackList className="artist-track-list" uri={artist.uri} tracks={artist.tracks ? artist.tracks.splice(0,10) : []} />
<LazyLoadListener showLoader={is_loading_tracks} />
</div>
</div>
@ -219,6 +219,31 @@ class Artist extends React.Component{
);
}
renderTracks(){
var artist = helpers.collate(
this.props.artist,
{
artists: this.props.artists,
tracks: this.props.tracks
}
);
if (!artist.tracks_uris || (artist.tracks_uris && !artist.tracks) || (artist.tracks_uris.length !== artist.tracks.length)){
var is_loading_tracks = true;
} else {
var is_loading_tracks = false;
}
return (
<div className="body related-artists">
<section className="list-wrapper no-top-padding">
<TrackList className="artist-track-list" uri={artist.uri} tracks={artist.tracks} />
<LazyLoadListener showLoader={is_loading_tracks} />
</section>
</div>
)
}
renderRelatedArtists(){
var artist = helpers.collate(
this.props.artist,
@ -337,6 +362,15 @@ class Artist extends React.Component{
scrollTo="sub-views-menu">
<h4>Overview</h4>
</Link>
{this.props.artist.tracks_uris && this.props.artist.tracks_uris.length > 10 ? <Link
exact
history={this.props.history}
activeClassName="sub-views__option--active"
className="sub-views__option"
to={'/artist/'+encodeURIComponent(this.props.uri)+'/tracks'}
scrollTo="sub-views-menu">
<h4>Tracks</h4>
</Link> : null}
{this.props.artist.related_artists_uris ? <Link
exact
history={this.props.history}
@ -363,6 +397,9 @@ class Artist extends React.Component{
<Route exact path="/artist/:id/related-artists">
{this.renderRelatedArtists()}
</Route>
<Route exact path="/artist/:id/tracks">
{this.renderTracks()}
</Route>
<Route exact path="/artist/:id/about">
{this.renderAbout()}
</Route>