|
|
|
@ -135977,6 +135977,16 @@ var ContextMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
|
"data-qa-file": "ContextMenu"
|
|
|
|
"data-qa-file": "ContextMenu"
|
|
|
|
}), remove_from_playlist);
|
|
|
|
}), remove_from_playlist);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 'user':
|
|
|
|
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
|
|
|
|
|
|
"data-qa-node": "div",
|
|
|
|
|
|
|
|
"data-qa-file": "ContextMenu"
|
|
|
|
|
|
|
|
}, _this.canBeInLibrary() && toggle_in_library, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
|
|
|
|
|
|
className: "context-menu__divider",
|
|
|
|
|
|
|
|
"data-qa-node": "div",
|
|
|
|
|
|
|
|
"data-qa-file": "ContextMenu"
|
|
|
|
|
|
|
|
}), copy_uris, refresh);
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
|
|
"data-qa-node": "div",
|
|
|
|
"data-qa-node": "div",
|
|
|
|
@ -158540,6 +158550,8 @@ function getCategory(uri) {
|
|
|
|
forceRefetch = _ref3.forceRefetch;
|
|
|
|
forceRefetch = _ref3.forceRefetch;
|
|
|
|
|
|
|
|
|
|
|
|
return function (dispatch, getState) {
|
|
|
|
return function (dispatch, getState) {
|
|
|
|
|
|
|
|
var loaderId = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["generateGuid"])();
|
|
|
|
|
|
|
|
dispatch(uiActions.startLoading(loaderId, "spotify_category_".concat(uri)));
|
|
|
|
var id = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["getFromUri"])('categoryid', uri);
|
|
|
|
var id = Object(_util_helpers__WEBPACK_IMPORTED_MODULE_2__["getFromUri"])('categoryid', uri);
|
|
|
|
var endpoint = "browse/categories/".concat(id);
|
|
|
|
var endpoint = "browse/categories/".concat(id);
|
|
|
|
endpoint += "?country=".concat(getState().spotify.country);
|
|
|
|
endpoint += "?country=".concat(getState().spotify.country);
|
|
|
|
@ -158574,6 +158586,7 @@ function getCategory(uri) {
|
|
|
|
playlists_uris: Object(_util_arrays__WEBPACK_IMPORTED_MODULE_1__["arrayOf"])('uri', playlists)
|
|
|
|
playlists_uris: Object(_util_arrays__WEBPACK_IMPORTED_MODULE_1__["arrayOf"])('uri', playlists)
|
|
|
|
})));
|
|
|
|
})));
|
|
|
|
dispatch(coreActions.itemsLoaded(playlists));
|
|
|
|
dispatch(coreActions.itemsLoaded(playlists));
|
|
|
|
|
|
|
|
dispatch(uiActions.stopLoading(loaderId));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -164448,25 +164461,14 @@ var Album = /*#__PURE__*/function (_React$Component) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "handleContextMenu", function (e) {
|
|
|
|
|
|
|
|
var _this$props2 = _this.props,
|
|
|
|
|
|
|
|
uri = _this$props2.uri,
|
|
|
|
|
|
|
|
showContextMenu = _this$props2.uiActions.showContextMenu;
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
var data = {
|
|
|
|
|
|
|
|
uris: [uri]
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
showContextMenu(e, data, 'album', 'click');
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (_ref) {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (_ref) {
|
|
|
|
var prevUri = _ref.uri,
|
|
|
|
var prevUri = _ref.uri,
|
|
|
|
prevAlbum = _ref.album;
|
|
|
|
prevAlbum = _ref.album;
|
|
|
|
var _this$props3 = _this.props,
|
|
|
|
var _this$props2 = _this.props,
|
|
|
|
uri = _this$props3.uri,
|
|
|
|
uri = _this$props2.uri,
|
|
|
|
album = _this$props3.album,
|
|
|
|
album = _this$props2.album,
|
|
|
|
loadAlbum = _this$props3.coreActions.loadAlbum,
|
|
|
|
loadAlbum = _this$props2.coreActions.loadAlbum,
|
|
|
|
getAlbum = _this$props3.lastfmActions.getAlbum;
|
|
|
|
getAlbum = _this$props2.lastfmActions.getAlbum;
|
|
|
|
|
|
|
|
|
|
|
|
if (uri !== prevUri) {
|
|
|
|
if (uri !== prevUri) {
|
|
|
|
loadAlbum(uri, {
|
|
|
|
loadAlbum(uri, {
|
|
|
|
@ -164486,9 +164488,9 @@ var Album = /*#__PURE__*/function (_React$Component) {
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "setWindowTitle", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "setWindowTitle", function () {
|
|
|
|
var album = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props.album;
|
|
|
|
var album = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props.album;
|
|
|
|
var _this$props4 = _this.props,
|
|
|
|
var _this$props3 = _this.props,
|
|
|
|
setWindowTitle = _this$props4.uiActions.setWindowTitle,
|
|
|
|
setWindowTitle = _this$props3.uiActions.setWindowTitle,
|
|
|
|
artists = _this$props4.artists;
|
|
|
|
artists = _this$props3.artists;
|
|
|
|
|
|
|
|
|
|
|
|
if (album) {
|
|
|
|
if (album) {
|
|
|
|
var artistNames = [];
|
|
|
|
var artistNames = [];
|
|
|
|
@ -164513,10 +164515,10 @@ var Album = /*#__PURE__*/function (_React$Component) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "handleContextMenu", function (e) {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "handleContextMenu", function (e) {
|
|
|
|
var _this$props5 = _this.props,
|
|
|
|
var _this$props4 = _this.props,
|
|
|
|
album = _this$props5.album,
|
|
|
|
album = _this$props4.album,
|
|
|
|
uri = _this$props5.uri,
|
|
|
|
uri = _this$props4.uri,
|
|
|
|
showContextMenu = _this$props5.uiActions.showContextMenu;
|
|
|
|
showContextMenu = _this$props4.uiActions.showContextMenu;
|
|
|
|
showContextMenu({
|
|
|
|
showContextMenu({
|
|
|
|
e: e,
|
|
|
|
e: e,
|
|
|
|
context: 'album',
|
|
|
|
context: 'album',
|
|
|
|
@ -164526,13 +164528,13 @@ var Album = /*#__PURE__*/function (_React$Component) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "loadMore", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "loadMore", function () {
|
|
|
|
var _this$props6 = _this.props,
|
|
|
|
var _this$props5 = _this.props,
|
|
|
|
getMore = _this$props6.spotifyActions.getMore,
|
|
|
|
getMore = _this$props5.spotifyActions.getMore,
|
|
|
|
_this$props6$album = _this$props6.album;
|
|
|
|
_this$props5$album = _this$props5.album;
|
|
|
|
_this$props6$album = _this$props6$album === void 0 ? {} : _this$props6$album;
|
|
|
|
_this$props5$album = _this$props5$album === void 0 ? {} : _this$props5$album;
|
|
|
|
var uri = _this$props6$album.uri,
|
|
|
|
var uri = _this$props5$album.uri,
|
|
|
|
name = _this$props6$album.name,
|
|
|
|
name = _this$props5$album.name,
|
|
|
|
tracks_more = _this$props6$album.tracks_more;
|
|
|
|
tracks_more = _this$props5$album.tracks_more;
|
|
|
|
getMore(tracks_more, {
|
|
|
|
getMore(tracks_more, {
|
|
|
|
parent_type: 'album',
|
|
|
|
parent_type: 'album',
|
|
|
|
parent_key: uri,
|
|
|
|
parent_key: uri,
|
|
|
|
@ -164546,19 +164548,19 @@ var Album = /*#__PURE__*/function (_React$Component) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "play", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "play", function () {
|
|
|
|
var _this$props7 = _this.props,
|
|
|
|
var _this$props6 = _this.props,
|
|
|
|
uri = _this$props7.uri,
|
|
|
|
uri = _this$props6.uri,
|
|
|
|
playURIs = _this$props7.mopidyActions.playURIs;
|
|
|
|
playURIs = _this$props6.mopidyActions.playURIs;
|
|
|
|
playURIs([uri], uri);
|
|
|
|
playURIs([uri], uri);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "onChangeSort", function (value) {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "onChangeSort", function (value) {
|
|
|
|
var _this$props8 = _this.props,
|
|
|
|
var _this$props7 = _this.props,
|
|
|
|
sort = _this$props8.sort,
|
|
|
|
sort = _this$props7.sort,
|
|
|
|
sort_reverse = _this$props8.sort_reverse,
|
|
|
|
sort_reverse = _this$props7.sort_reverse,
|
|
|
|
_this$props8$uiAction = _this$props8.uiActions,
|
|
|
|
_this$props7$uiAction = _this$props7.uiActions,
|
|
|
|
set = _this$props8$uiAction.set,
|
|
|
|
set = _this$props7$uiAction.set,
|
|
|
|
hideContextMenu = _this$props8$uiAction.hideContextMenu;
|
|
|
|
hideContextMenu = _this$props7$uiAction.hideContextMenu;
|
|
|
|
var reverse = false;
|
|
|
|
var reverse = false;
|
|
|
|
|
|
|
|
|
|
|
|
if (value !== null && sort === value) {
|
|
|
|
if (value !== null && sort === value) {
|
|
|
|
@ -164584,13 +164586,13 @@ var Album = /*#__PURE__*/function (_React$Component) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
|
|
var _this$props9 = _this.props,
|
|
|
|
var _this$props8 = _this.props,
|
|
|
|
uri = _this$props9.uri,
|
|
|
|
uri = _this$props8.uri,
|
|
|
|
album = _this$props9.album,
|
|
|
|
album = _this$props8.album,
|
|
|
|
loading = _this$props9.loading,
|
|
|
|
loading = _this$props8.loading,
|
|
|
|
slim_mode = _this$props9.slim_mode,
|
|
|
|
slim_mode = _this$props8.slim_mode,
|
|
|
|
sort = _this$props9.sort,
|
|
|
|
sort = _this$props8.sort,
|
|
|
|
sort_reverse = _this$props9.sort_reverse;
|
|
|
|
sort_reverse = _this$props8.sort_reverse;
|
|
|
|
var _this$props$album = _this.props.album;
|
|
|
|
var _this$props$album = _this.props.album;
|
|
|
|
_this$props$album = _this$props$album === void 0 ? {} : _this$props$album;
|
|
|
|
_this$props$album = _this$props$album === void 0 ? {} : _this$props$album;
|
|
|
|
var tracks = _this$props$album.tracks;
|
|
|
|
var tracks = _this$props$album.tracks;
|
|
|
|
@ -170277,6 +170279,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
/* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../util/helpers */ "./src/js/util/helpers.js");
|
|
|
|
/* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../util/helpers */ "./src/js/util/helpers.js");
|
|
|
|
/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../locale */ "./src/js/locale/index.js");
|
|
|
|
/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../locale */ "./src/js/locale/index.js");
|
|
|
|
/* harmony import */ var _util_selectors__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../util/selectors */ "./src/js/util/selectors.js");
|
|
|
|
/* harmony import */ var _util_selectors__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../util/selectors */ "./src/js/util/selectors.js");
|
|
|
|
|
|
|
|
/* harmony import */ var _components_ContextMenuTrigger__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../components/ContextMenuTrigger */ "./src/js/components/ContextMenuTrigger.js");
|
|
|
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
@ -170319,6 +170322,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var User = /*#__PURE__*/function (_React$Component) {
|
|
|
|
var User = /*#__PURE__*/function (_React$Component) {
|
|
|
|
_inherits(User, _React$Component);
|
|
|
|
_inherits(User, _React$Component);
|
|
|
|
|
|
|
|
|
|
|
|
@ -170353,6 +170357,19 @@ var User = /*#__PURE__*/function (_React$Component) {
|
|
|
|
if (!prevUser && user) _this.setWindowTitle(user);
|
|
|
|
if (!prevUser && user) _this.setWindowTitle(user);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "handleContextMenu", function (e) {
|
|
|
|
|
|
|
|
var _this$props2 = _this.props,
|
|
|
|
|
|
|
|
user = _this$props2.user,
|
|
|
|
|
|
|
|
uri = _this$props2.uri,
|
|
|
|
|
|
|
|
showContextMenu = _this$props2.uiActions.showContextMenu;
|
|
|
|
|
|
|
|
showContextMenu({
|
|
|
|
|
|
|
|
e: e,
|
|
|
|
|
|
|
|
context: 'user',
|
|
|
|
|
|
|
|
items: [user],
|
|
|
|
|
|
|
|
uris: [uri]
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "setWindowTitle", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "setWindowTitle", function () {
|
|
|
|
var user = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props.user;
|
|
|
|
var user = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props.user;
|
|
|
|
var setWindowTitle = _this.props.uiActions.setWindowTitle;
|
|
|
|
var setWindowTitle = _this.props.uiActions.setWindowTitle;
|
|
|
|
@ -170367,12 +170384,12 @@ var User = /*#__PURE__*/function (_React$Component) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "loadMore", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "loadMore", function () {
|
|
|
|
var _this$props2 = _this.props,
|
|
|
|
var _this$props3 = _this.props,
|
|
|
|
uri = _this$props2.uri,
|
|
|
|
uri = _this$props3.uri,
|
|
|
|
getMore = _this$props2.spotifyActions.getMore,
|
|
|
|
getMore = _this$props3.spotifyActions.getMore,
|
|
|
|
_this$props2$user = _this$props2.user;
|
|
|
|
_this$props3$user = _this$props3.user;
|
|
|
|
_this$props2$user = _this$props2$user === void 0 ? {} : _this$props2$user;
|
|
|
|
_this$props3$user = _this$props3$user === void 0 ? {} : _this$props3$user;
|
|
|
|
var playlists_more = _this$props2$user.playlists_more;
|
|
|
|
var playlists_more = _this$props3$user.playlists_more;
|
|
|
|
getMore(playlists_more, {
|
|
|
|
getMore(playlists_more, {
|
|
|
|
parent_type: 'user',
|
|
|
|
parent_type: 'user',
|
|
|
|
parent_key: uri,
|
|
|
|
parent_key: uri,
|
|
|
|
@ -170381,21 +170398,21 @@ var User = /*#__PURE__*/function (_React$Component) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "isMe", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "isMe", function () {
|
|
|
|
var _this$props3 = _this.props,
|
|
|
|
var _this$props4 = _this.props,
|
|
|
|
uri = _this$props3.uri,
|
|
|
|
uri = _this$props4.uri,
|
|
|
|
_this$props3$me = _this$props3.me;
|
|
|
|
_this$props4$me = _this$props4.me;
|
|
|
|
_this$props3$me = _this$props3$me === void 0 ? {} : _this$props3$me;
|
|
|
|
_this$props4$me = _this$props4$me === void 0 ? {} : _this$props4$me;
|
|
|
|
var id = _this$props3$me.id;
|
|
|
|
var id = _this$props4$me.id;
|
|
|
|
return id && id === Object(_util_helpers__WEBPACK_IMPORTED_MODULE_14__["getFromUri"])('userid', uri);
|
|
|
|
return id && id === Object(_util_helpers__WEBPACK_IMPORTED_MODULE_14__["getFromUri"])('userid', uri);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
|
|
var _this$props4 = _this.props,
|
|
|
|
var _this$props5 = _this.props,
|
|
|
|
uri = _this$props4.uri,
|
|
|
|
uri = _this$props5.uri,
|
|
|
|
loading = _this$props4.loading,
|
|
|
|
loading = _this$props5.loading,
|
|
|
|
user = _this$props4.user,
|
|
|
|
user = _this$props5.user,
|
|
|
|
playlists = _this$props4.playlists,
|
|
|
|
playlists = _this$props5.playlists,
|
|
|
|
slim_mode = _this$props4.slim_mode;
|
|
|
|
slim_mode = _this$props5.slim_mode;
|
|
|
|
|
|
|
|
|
|
|
|
if (loading) {
|
|
|
|
if (loading) {
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_Loader__WEBPACK_IMPORTED_MODULE_9__["default"], {
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_Loader__WEBPACK_IMPORTED_MODULE_9__["default"], {
|
|
|
|
@ -170477,6 +170494,10 @@ var User = /*#__PURE__*/function (_React$Component) {
|
|
|
|
uri: user.uri,
|
|
|
|
uri: user.uri,
|
|
|
|
"data-qa-node": "FollowButton",
|
|
|
|
"data-qa-node": "FollowButton",
|
|
|
|
"data-qa-file": "User"
|
|
|
|
"data-qa-file": "User"
|
|
|
|
|
|
|
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_ContextMenuTrigger__WEBPACK_IMPORTED_MODULE_17__["default"], {
|
|
|
|
|
|
|
|
onTrigger: _this.handleContextMenu,
|
|
|
|
|
|
|
|
"data-qa-node": "ContextMenuTrigger",
|
|
|
|
|
|
|
|
"data-qa-file": "User"
|
|
|
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2", {
|
|
|
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h2", {
|
|
|
|
"data-qa-node": "h2",
|
|
|
|
"data-qa-node": "h2",
|
|
|
|
"data-qa-file": "User"
|
|
|
|
"data-qa-file": "User"
|
|
|
|
@ -170548,9 +170569,9 @@ var User = /*#__PURE__*/function (_React$Component) {
|
|
|
|
_createClass(User, [{
|
|
|
|
_createClass(User, [{
|
|
|
|
key: "componentDidMount",
|
|
|
|
key: "componentDidMount",
|
|
|
|
value: function componentDidMount() {
|
|
|
|
value: function componentDidMount() {
|
|
|
|
var _this$props5 = this.props,
|
|
|
|
var _this$props6 = this.props,
|
|
|
|
uri = _this$props5.uri,
|
|
|
|
uri = _this$props6.uri,
|
|
|
|
loadUser = _this$props5.coreActions.loadUser;
|
|
|
|
loadUser = _this$props6.coreActions.loadUser;
|
|
|
|
this.setWindowTitle();
|
|
|
|
this.setWindowTitle();
|
|
|
|
loadUser(uri, {
|
|
|
|
loadUser(uri, {
|
|
|
|
full: true
|
|
|
|
full: true
|
|
|
|
@ -170617,6 +170638,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
/* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/helpers */ "./src/js/util/helpers.js");
|
|
|
|
/* harmony import */ var _util_helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../util/helpers */ "./src/js/util/helpers.js");
|
|
|
|
/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../locale */ "./src/js/locale/index.js");
|
|
|
|
/* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../locale */ "./src/js/locale/index.js");
|
|
|
|
/* harmony import */ var _util_arrays__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/arrays */ "./src/js/util/arrays.js");
|
|
|
|
/* harmony import */ var _util_arrays__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../util/arrays */ "./src/js/util/arrays.js");
|
|
|
|
|
|
|
|
/* harmony import */ var _util_selectors__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../util/selectors */ "./src/js/util/selectors.js");
|
|
|
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
|
|
|
|
|
|
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
@ -170654,6 +170676,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var DiscoverCategories = /*#__PURE__*/function (_React$Component) {
|
|
|
|
var DiscoverCategories = /*#__PURE__*/function (_React$Component) {
|
|
|
|
_inherits(DiscoverCategories, _React$Component);
|
|
|
|
_inherits(DiscoverCategories, _React$Component);
|
|
|
|
|
|
|
|
|
|
|
|
@ -170672,29 +170695,19 @@ var DiscoverCategories = /*#__PURE__*/function (_React$Component) {
|
|
|
|
|
|
|
|
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "render", function () {
|
|
|
|
var _this$props = _this.props,
|
|
|
|
var _this$props = _this.props,
|
|
|
|
load_queue = _this$props.load_queue,
|
|
|
|
loading = _this$props.loading,
|
|
|
|
categoriesProp = _this$props.categories,
|
|
|
|
categories = _this$props.categories,
|
|
|
|
uiActions = _this$props.uiActions;
|
|
|
|
uiActions = _this$props.uiActions;
|
|
|
|
|
|
|
|
|
|
|
|
if (Object(_util_helpers__WEBPACK_IMPORTED_MODULE_9__["isLoading"])(load_queue, ['spotify_browse/categories'])) {
|
|
|
|
if (loading) {
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_Loader__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
|
|
|
className: "view discover-categories-view",
|
|
|
|
|
|
|
|
"data-qa-node": "div",
|
|
|
|
|
|
|
|
"data-qa-file": "DiscoverCategories"
|
|
|
|
|
|
|
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_Header__WEBPACK_IMPORTED_MODULE_3__["default"], {
|
|
|
|
|
|
|
|
icon: "grid",
|
|
|
|
|
|
|
|
title: Object(_locale__WEBPACK_IMPORTED_MODULE_10__["i18n"])('discover.categories.title'),
|
|
|
|
|
|
|
|
"data-qa-node": "Header",
|
|
|
|
|
|
|
|
"data-qa-file": "DiscoverCategories"
|
|
|
|
|
|
|
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_components_Loader__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
|
|
|
|
|
|
|
body: true,
|
|
|
|
body: true,
|
|
|
|
loading: true,
|
|
|
|
loading: true,
|
|
|
|
"data-qa-node": "Loader",
|
|
|
|
"data-qa-node": "Loader",
|
|
|
|
"data-qa-file": "DiscoverCategories"
|
|
|
|
"data-qa-file": "DiscoverCategories"
|
|
|
|
}));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var categories = Object(_util_arrays__WEBPACK_IMPORTED_MODULE_11__["indexToArray"])(categoriesProp);
|
|
|
|
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
|
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
|
|
|
|
className: "view discover-categories-view",
|
|
|
|
className: "view discover-categories-view",
|
|
|
|
"data-qa-node": "div",
|
|
|
|
"data-qa-node": "div",
|
|
|
|
@ -170748,9 +170761,10 @@ var DiscoverCategories = /*#__PURE__*/function (_React$Component) {
|
|
|
|
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);
|
|
|
|
}(react__WEBPACK_IMPORTED_MODULE_0___default.a.Component);
|
|
|
|
|
|
|
|
|
|
|
|
var mapStateToProps = function mapStateToProps(state) {
|
|
|
|
var mapStateToProps = function mapStateToProps(state) {
|
|
|
|
|
|
|
|
var loadingSelector = Object(_util_selectors__WEBPACK_IMPORTED_MODULE_12__["makeLoadingSelector"])(['(.*)categories(.*)']);
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
categories: state.spotify.categories,
|
|
|
|
loading: loadingSelector(state),
|
|
|
|
load_queue: state.ui.load_queue
|
|
|
|
categories: Object(_util_arrays__WEBPACK_IMPORTED_MODULE_11__["indexToArray"])(state.spotify.categories)
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@ -170984,7 +170998,7 @@ var DiscoverCategory = /*#__PURE__*/function (_React$Component) {
|
|
|
|
|
|
|
|
|
|
|
|
var mapStateToProps = function mapStateToProps(state, ownProps) {
|
|
|
|
var mapStateToProps = function mapStateToProps(state, ownProps) {
|
|
|
|
var uri = decodeURIComponent(ownProps.match.params.uri);
|
|
|
|
var uri = decodeURIComponent(ownProps.match.params.uri);
|
|
|
|
var loadingSelector = Object(_util_selectors__WEBPACK_IMPORTED_MODULE_13__["makeLoadingSelector"])(["(.*)".concat(uri, "(.*)")]);
|
|
|
|
var loadingSelector = Object(_util_selectors__WEBPACK_IMPORTED_MODULE_13__["makeLoadingSelector"])(["spotify_category_".concat(uri)]);
|
|
|
|
var categorySelector = Object(_util_selectors__WEBPACK_IMPORTED_MODULE_13__["makeItemSelector"])(uri);
|
|
|
|
var categorySelector = Object(_util_selectors__WEBPACK_IMPORTED_MODULE_13__["makeItemSelector"])(uri);
|
|
|
|
var category = categorySelector(state);
|
|
|
|
var category = categorySelector(state);
|
|
|
|
var playlists = null;
|
|
|
|
var playlists = null;
|
|
|
|
|