diff --git a/CHANGELOG.md b/CHANGELOG.md index 47daf86437..b33d4c8993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Fix `torrents.verifyCert` config patch ignored warning ([#7501](https://github.com/pymedusa/Medusa/pull/7501)) - Fix dragging and saving Anime / Series list handles in Home - Poster layout ([#7502](https://github.com/pymedusa/Medusa/pull/7502)) - Fix adding Anime with white/black listed release groups ([#7507](https://github.com/pymedusa/Medusa/pull/7507)) +- Fix Schedule page and Forced Search on Schedule page ([#7512](https://github.com/pymedusa/Medusa/pull/#7512)) ----- diff --git a/themes-default/slim/src/components/schedule.vue b/themes-default/slim/src/components/schedule.vue index 8b8488e0b1..d3d3f4fd89 100644 --- a/themes-default/slim/src/components/schedule.vue +++ b/themes-default/slim/src/components/schedule.vue @@ -46,7 +46,7 @@ export default { mounted() { // $store.dispatch('getShows'); - this.$once('loaded', () => { + this.$root.$once('loaded', () => { const { scheduleLayout, stateLayout, themeSpinner } = this; const { comingEps } = stateLayout; if (scheduleLayout === 'list') { diff --git a/themes-default/slim/src/global-vue-shim.js b/themes-default/slim/src/global-vue-shim.js index 263204fa4d..d18f6d2282 100644 --- a/themes-default/slim/src/global-vue-shim.js +++ b/themes-default/slim/src/global-vue-shim.js @@ -147,7 +147,7 @@ export default () => { store.dispatch('getConfig'), store.dispatch('getStats') ]).then(([_, config]) => { - this.$emit('loaded'); + this.$root.$emit('loaded'); // Legacy - send config.main to jQuery (received by index.js) const event = new CustomEvent('medusa-config-loaded', { detail: config.main }); window.dispatchEvent(event); @@ -157,7 +157,7 @@ export default () => { }); } - this.$once('loaded', () => { + this.$root.$once('loaded', () => { this.$root.globalLoading = false; }); }, diff --git a/themes/dark/assets/js/medusa-runtime.js b/themes/dark/assets/js/medusa-runtime.js index e10a15adc2..5225e4f0d9 100644 --- a/themes/dark/assets/js/medusa-runtime.js +++ b/themes/dark/assets/js/medusa-runtime.js @@ -464,7 +464,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'schedule',\n template: '#schedule-template',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__[\"AppLink\"]\n },\n\n data() {\n return {\n layoutOptions: [{\n value: 'poster',\n text: 'Poster'\n }, {\n value: 'calendar',\n text: 'Calendar'\n }, {\n value: 'banner',\n text: 'Banner'\n }, {\n value: 'list',\n text: 'List'\n }]\n };\n },\n\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapState\"])({\n config: state => state.config,\n // Renamed because of the computed property 'layout'.\n stateLayout: state => state.layout\n }), {\n header() {\n return this.$route.meta.header;\n },\n\n scheduleLayout: {\n get() {\n const {\n stateLayout\n } = this;\n return stateLayout.schedule;\n },\n\n set(layout) {\n const {\n setLayout\n } = this;\n const page = 'schedule';\n setLayout({\n page,\n layout\n });\n }\n\n },\n\n themeSpinner() {\n const {\n stateLayout\n } = this;\n return stateLayout.themeName === 'dark' ? '-dark' : '';\n }\n\n }),\n\n mounted() {\n // $store.dispatch('getShows');\n this.$once('loaded', () => {\n const {\n scheduleLayout,\n stateLayout,\n themeSpinner\n } = this;\n const {\n comingEps\n } = stateLayout;\n\n if (scheduleLayout === 'list') {\n const sortCodes = {\n date: 0,\n show: 2,\n network: 5\n };\n const {\n sort\n } = comingEps;\n const sortList = sort in sortCodes ? [[sortCodes[sort], 0]] : [[0, 0]];\n $('#showListTable:has(tbody tr)').tablesorter({\n widgets: ['stickyHeaders', 'filter', 'columnSelector', 'saveSort'],\n sortList,\n textExtraction: {\n 0: node => $(node).find('time').attr('datetime'),\n 1: node => $(node).find('time').attr('datetime'),\n 7: node => $(node).find('span').text().toLowerCase(),\n 8: node => $(node).find('a[data-indexer-name]').attr('data-indexer-name')\n },\n headers: {\n 0: {\n sorter: 'realISODate'\n },\n 1: {\n sorter: 'realISODate'\n },\n 2: {\n sorter: 'loadingNames'\n },\n 4: {\n sorter: 'loadingNames'\n },\n 7: {\n sorter: 'quality'\n },\n 8: {\n sorter: 'text'\n },\n 9: {\n sorter: false,\n filter: false\n }\n },\n widgetOptions: {\n filter_columnFilters: true,\n // eslint-disable-line camelcase\n filter_hideFilters: true,\n // eslint-disable-line camelcase\n filter_saveFilters: true,\n // eslint-disable-line camelcase\n columnSelector_mediaquery: false // eslint-disable-line camelcase\n\n }\n });\n $.ajaxEpSearch();\n }\n\n if (['banner', 'poster'].includes(scheduleLayout)) {\n $.ajaxEpSearch({\n size: 16,\n loadingImage: \"loading16\".concat(themeSpinner, \".gif\")\n });\n $('.ep_summary').hide();\n $('.ep_summaryTrigger').on('click', function () {\n $(this).next('.ep_summary').slideToggle('normal', function () {\n $(this).prev('.ep_summaryTrigger').prop('src', function (i, src) {\n return $(this).next('.ep_summary').is(':visible') ? src.replace('plus', 'minus') : src.replace('minus', 'plus');\n });\n });\n });\n }\n\n $('#popover').popover({\n placement: 'bottom',\n html: true,\n // Required if content has HTML\n content: '
'\n }).on('shown.bs.popover', () => {\n // Bootstrap popover event triggered when the popover opens\n // call this function to copy the column selection code into the popover\n $.tablesorter.columnSelector.attachTo($('#showListTable'), '#popover-target');\n });\n });\n },\n\n methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapActions\"])({\n setLayout: 'setLayout'\n }))\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack:///./src/components/schedule.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'schedule',\n template: '#schedule-template',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__[\"AppLink\"]\n },\n\n data() {\n return {\n layoutOptions: [{\n value: 'poster',\n text: 'Poster'\n }, {\n value: 'calendar',\n text: 'Calendar'\n }, {\n value: 'banner',\n text: 'Banner'\n }, {\n value: 'list',\n text: 'List'\n }]\n };\n },\n\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapState\"])({\n config: state => state.config,\n // Renamed because of the computed property 'layout'.\n stateLayout: state => state.layout\n }), {\n header() {\n return this.$route.meta.header;\n },\n\n scheduleLayout: {\n get() {\n const {\n stateLayout\n } = this;\n return stateLayout.schedule;\n },\n\n set(layout) {\n const {\n setLayout\n } = this;\n const page = 'schedule';\n setLayout({\n page,\n layout\n });\n }\n\n },\n\n themeSpinner() {\n const {\n stateLayout\n } = this;\n return stateLayout.themeName === 'dark' ? '-dark' : '';\n }\n\n }),\n\n mounted() {\n // $store.dispatch('getShows');\n this.$root.$once('loaded', () => {\n const {\n scheduleLayout,\n stateLayout,\n themeSpinner\n } = this;\n const {\n comingEps\n } = stateLayout;\n\n if (scheduleLayout === 'list') {\n const sortCodes = {\n date: 0,\n show: 2,\n network: 5\n };\n const {\n sort\n } = comingEps;\n const sortList = sort in sortCodes ? [[sortCodes[sort], 0]] : [[0, 0]];\n $('#showListTable:has(tbody tr)').tablesorter({\n widgets: ['stickyHeaders', 'filter', 'columnSelector', 'saveSort'],\n sortList,\n textExtraction: {\n 0: node => $(node).find('time').attr('datetime'),\n 1: node => $(node).find('time').attr('datetime'),\n 7: node => $(node).find('span').text().toLowerCase(),\n 8: node => $(node).find('a[data-indexer-name]').attr('data-indexer-name')\n },\n headers: {\n 0: {\n sorter: 'realISODate'\n },\n 1: {\n sorter: 'realISODate'\n },\n 2: {\n sorter: 'loadingNames'\n },\n 4: {\n sorter: 'loadingNames'\n },\n 7: {\n sorter: 'quality'\n },\n 8: {\n sorter: 'text'\n },\n 9: {\n sorter: false,\n filter: false\n }\n },\n widgetOptions: {\n filter_columnFilters: true,\n // eslint-disable-line camelcase\n filter_hideFilters: true,\n // eslint-disable-line camelcase\n filter_saveFilters: true,\n // eslint-disable-line camelcase\n columnSelector_mediaquery: false // eslint-disable-line camelcase\n\n }\n });\n $.ajaxEpSearch();\n }\n\n if (['banner', 'poster'].includes(scheduleLayout)) {\n $.ajaxEpSearch({\n size: 16,\n loadingImage: \"loading16\".concat(themeSpinner, \".gif\")\n });\n $('.ep_summary').hide();\n $('.ep_summaryTrigger').on('click', function () {\n $(this).next('.ep_summary').slideToggle('normal', function () {\n $(this).prev('.ep_summaryTrigger').prop('src', function (i, src) {\n return $(this).next('.ep_summary').is(':visible') ? src.replace('plus', 'minus') : src.replace('minus', 'plus');\n });\n });\n });\n }\n\n $('#popover').popover({\n placement: 'bottom',\n html: true,\n // Required if content has HTML\n content: '
'\n }).on('shown.bs.popover', () => {\n // Bootstrap popover event triggered when the popover opens\n // call this function to copy the column selection code into the popover\n $.tablesorter.columnSelector.attachTo($('#showListTable'), '#popover-target');\n });\n });\n },\n\n methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapActions\"])({\n setLayout: 'setLayout'\n }))\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack:///./src/components/schedule.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -3310,7 +3310,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerGlobalComponents\", function() { return registerGlobalComponents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerPlugins\", function() { return registerPlugins; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var vue_async_computed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-async-computed */ \"./node_modules/vue-async-computed/dist/vue-async-computed.esm.js\");\n/* harmony import */ var vue_meta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-meta */ \"./node_modules/vue-meta/dist/vue-meta.esm.js\");\n/* harmony import */ var vue_snotify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-snotify */ \"./node_modules/vue-snotify/vue-snotify.esm.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-cookies */ \"./node_modules/vue-cookies/vue-cookies.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_cookies__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-js-modal */ \"./node_modules/vue-js-modal/dist/index.js\");\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_js_modal__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components */ \"./src/components/index.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./store */ \"./src/store/index.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/core */ \"./src/utils/core.js\");\n// @TODO: Remove this file before v1.0.0\n\n\n\n\n\n\n\n\n\n\n/**\n * Register global components and x-template components.\n */\n\nconst registerGlobalComponents = () => {\n // Start with the x-template components\n let {\n components = []\n } = window; // Add global components (in use by `main.mako`)\n // @TODO: These should be registered in an `App.vue` component when possible,\n // along with some of the `main.mako` template\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AppFooter\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppHeader\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ScrollButtons\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SubMenu\"]]); // Add global components (in use by pages/components that are not SFCs yet)\n // Use this when it's not possible to use `components: { ... }` in a component's definition.\n // If a component that uses any of these is a SFC, please use the `components` key when defining it.\n // @TODO: Instead of globally registering these,\n // they should be registered in each component that uses them\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AddShowOptions\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AnidbReleaseGroupUi\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppLink\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Asset\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Backstretch\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTemplate\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextbox\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextboxNumber\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigToggleSlider\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"FileBrowser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"LanguageSelect\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"PlotInfo\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityChooser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityPill\"], // @FIXME: (sharkykh) Used in a hack/workaround in `static/js/ajax-episode-search.js`\n _components__WEBPACK_IMPORTED_MODULE_7__[\"RootDirs\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SelectList\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ShowSelector\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"StateSwitch\"]]); // Add components for pages that use `pageComponent`\n // @TODO: These need to be converted to Vue SFCs\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"History\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Home\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ManualPostProcess\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Schedule\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SnatchSelection\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Status\"]]); // Register the components globally\n\n components.forEach(component => {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug(\"Registering \".concat(component.name));\n }\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].component(component.name, component);\n });\n};\n/**\n * Register plugins.\n */\n\nconst registerPlugins = () => {\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_async_computed__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_meta__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_snotify__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(v_tooltip__WEBPACK_IMPORTED_MODULE_6__[\"VTooltip\"]); // Set default cookie expire time\n\n vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a.config('10y');\n};\n/**\n * Apply the global Vue shim.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (() => {\n const warningTemplate = (name, state) => \"\".concat(name, \" is using the global Vuex '\").concat(state, \"' state, \") + \"please replace that with a local one using: mapState(['\".concat(state, \"'])\");\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mixin({\n data() {\n // These are only needed for the root Vue\n if (this.$root === this) {\n return {\n globalLoading: true,\n pageComponent: false\n };\n }\n\n return {};\n },\n\n mounted() {\n if (this.$root === this && !window.location.pathname.includes('/login')) {\n const {\n username\n } = window;\n Promise.all([\n /* This is used by the `app-header` component\n to only show the logout button if a username is set */\n _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('login', {\n username\n }), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getConfig'), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getStats')]).then(([_, config]) => {\n this.$emit('loaded'); // Legacy - send config.main to jQuery (received by index.js)\n\n const event = new CustomEvent('medusa-config-loaded', {\n detail: config.main\n });\n window.dispatchEvent(event);\n }).catch(error => {\n console.debug(error);\n alert('Unable to connect to Medusa!'); // eslint-disable-line no-alert\n });\n }\n\n this.$once('loaded', () => {\n this.$root.globalLoading = false;\n });\n },\n\n // Make auth and config accessible to all components\n // @TODO: Remove this completely\n computed: {\n // Deprecate the global `Vuex.mapState(['auth', 'config'])`\n auth() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'auth'));\n }\n\n return this.$store.state.auth;\n },\n\n config() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'config'));\n }\n\n return this.$store.state.config;\n }\n\n }\n });\n\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug('Loading local Vue');\n }\n\n registerPlugins();\n registerGlobalComponents();\n});\n\n//# sourceURL=webpack:///./src/global-vue-shim.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerGlobalComponents\", function() { return registerGlobalComponents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerPlugins\", function() { return registerPlugins; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var vue_async_computed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-async-computed */ \"./node_modules/vue-async-computed/dist/vue-async-computed.esm.js\");\n/* harmony import */ var vue_meta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-meta */ \"./node_modules/vue-meta/dist/vue-meta.esm.js\");\n/* harmony import */ var vue_snotify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-snotify */ \"./node_modules/vue-snotify/vue-snotify.esm.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-cookies */ \"./node_modules/vue-cookies/vue-cookies.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_cookies__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-js-modal */ \"./node_modules/vue-js-modal/dist/index.js\");\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_js_modal__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components */ \"./src/components/index.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./store */ \"./src/store/index.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/core */ \"./src/utils/core.js\");\n// @TODO: Remove this file before v1.0.0\n\n\n\n\n\n\n\n\n\n\n/**\n * Register global components and x-template components.\n */\n\nconst registerGlobalComponents = () => {\n // Start with the x-template components\n let {\n components = []\n } = window; // Add global components (in use by `main.mako`)\n // @TODO: These should be registered in an `App.vue` component when possible,\n // along with some of the `main.mako` template\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AppFooter\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppHeader\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ScrollButtons\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SubMenu\"]]); // Add global components (in use by pages/components that are not SFCs yet)\n // Use this when it's not possible to use `components: { ... }` in a component's definition.\n // If a component that uses any of these is a SFC, please use the `components` key when defining it.\n // @TODO: Instead of globally registering these,\n // they should be registered in each component that uses them\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AddShowOptions\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AnidbReleaseGroupUi\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppLink\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Asset\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Backstretch\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTemplate\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextbox\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextboxNumber\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigToggleSlider\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"FileBrowser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"LanguageSelect\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"PlotInfo\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityChooser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityPill\"], // @FIXME: (sharkykh) Used in a hack/workaround in `static/js/ajax-episode-search.js`\n _components__WEBPACK_IMPORTED_MODULE_7__[\"RootDirs\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SelectList\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ShowSelector\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"StateSwitch\"]]); // Add components for pages that use `pageComponent`\n // @TODO: These need to be converted to Vue SFCs\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"History\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Home\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ManualPostProcess\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Schedule\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SnatchSelection\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Status\"]]); // Register the components globally\n\n components.forEach(component => {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug(\"Registering \".concat(component.name));\n }\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].component(component.name, component);\n });\n};\n/**\n * Register plugins.\n */\n\nconst registerPlugins = () => {\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_async_computed__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_meta__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_snotify__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(v_tooltip__WEBPACK_IMPORTED_MODULE_6__[\"VTooltip\"]); // Set default cookie expire time\n\n vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a.config('10y');\n};\n/**\n * Apply the global Vue shim.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (() => {\n const warningTemplate = (name, state) => \"\".concat(name, \" is using the global Vuex '\").concat(state, \"' state, \") + \"please replace that with a local one using: mapState(['\".concat(state, \"'])\");\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mixin({\n data() {\n // These are only needed for the root Vue\n if (this.$root === this) {\n return {\n globalLoading: true,\n pageComponent: false\n };\n }\n\n return {};\n },\n\n mounted() {\n if (this.$root === this && !window.location.pathname.includes('/login')) {\n const {\n username\n } = window;\n Promise.all([\n /* This is used by the `app-header` component\n to only show the logout button if a username is set */\n _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('login', {\n username\n }), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getConfig'), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getStats')]).then(([_, config]) => {\n this.$root.$emit('loaded'); // Legacy - send config.main to jQuery (received by index.js)\n\n const event = new CustomEvent('medusa-config-loaded', {\n detail: config.main\n });\n window.dispatchEvent(event);\n }).catch(error => {\n console.debug(error);\n alert('Unable to connect to Medusa!'); // eslint-disable-line no-alert\n });\n }\n\n this.$root.$once('loaded', () => {\n this.$root.globalLoading = false;\n });\n },\n\n // Make auth and config accessible to all components\n // @TODO: Remove this completely\n computed: {\n // Deprecate the global `Vuex.mapState(['auth', 'config'])`\n auth() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'auth'));\n }\n\n return this.$store.state.auth;\n },\n\n config() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'config'));\n }\n\n return this.$store.state.config;\n }\n\n }\n });\n\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug('Loading local Vue');\n }\n\n registerPlugins();\n registerGlobalComponents();\n});\n\n//# sourceURL=webpack:///./src/global-vue-shim.js?"); /***/ }), diff --git a/themes/light/assets/js/medusa-runtime.js b/themes/light/assets/js/medusa-runtime.js index e10a15adc2..5225e4f0d9 100644 --- a/themes/light/assets/js/medusa-runtime.js +++ b/themes/light/assets/js/medusa-runtime.js @@ -464,7 +464,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(f /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'schedule',\n template: '#schedule-template',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__[\"AppLink\"]\n },\n\n data() {\n return {\n layoutOptions: [{\n value: 'poster',\n text: 'Poster'\n }, {\n value: 'calendar',\n text: 'Calendar'\n }, {\n value: 'banner',\n text: 'Banner'\n }, {\n value: 'list',\n text: 'List'\n }]\n };\n },\n\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapState\"])({\n config: state => state.config,\n // Renamed because of the computed property 'layout'.\n stateLayout: state => state.layout\n }), {\n header() {\n return this.$route.meta.header;\n },\n\n scheduleLayout: {\n get() {\n const {\n stateLayout\n } = this;\n return stateLayout.schedule;\n },\n\n set(layout) {\n const {\n setLayout\n } = this;\n const page = 'schedule';\n setLayout({\n page,\n layout\n });\n }\n\n },\n\n themeSpinner() {\n const {\n stateLayout\n } = this;\n return stateLayout.themeName === 'dark' ? '-dark' : '';\n }\n\n }),\n\n mounted() {\n // $store.dispatch('getShows');\n this.$once('loaded', () => {\n const {\n scheduleLayout,\n stateLayout,\n themeSpinner\n } = this;\n const {\n comingEps\n } = stateLayout;\n\n if (scheduleLayout === 'list') {\n const sortCodes = {\n date: 0,\n show: 2,\n network: 5\n };\n const {\n sort\n } = comingEps;\n const sortList = sort in sortCodes ? [[sortCodes[sort], 0]] : [[0, 0]];\n $('#showListTable:has(tbody tr)').tablesorter({\n widgets: ['stickyHeaders', 'filter', 'columnSelector', 'saveSort'],\n sortList,\n textExtraction: {\n 0: node => $(node).find('time').attr('datetime'),\n 1: node => $(node).find('time').attr('datetime'),\n 7: node => $(node).find('span').text().toLowerCase(),\n 8: node => $(node).find('a[data-indexer-name]').attr('data-indexer-name')\n },\n headers: {\n 0: {\n sorter: 'realISODate'\n },\n 1: {\n sorter: 'realISODate'\n },\n 2: {\n sorter: 'loadingNames'\n },\n 4: {\n sorter: 'loadingNames'\n },\n 7: {\n sorter: 'quality'\n },\n 8: {\n sorter: 'text'\n },\n 9: {\n sorter: false,\n filter: false\n }\n },\n widgetOptions: {\n filter_columnFilters: true,\n // eslint-disable-line camelcase\n filter_hideFilters: true,\n // eslint-disable-line camelcase\n filter_saveFilters: true,\n // eslint-disable-line camelcase\n columnSelector_mediaquery: false // eslint-disable-line camelcase\n\n }\n });\n $.ajaxEpSearch();\n }\n\n if (['banner', 'poster'].includes(scheduleLayout)) {\n $.ajaxEpSearch({\n size: 16,\n loadingImage: \"loading16\".concat(themeSpinner, \".gif\")\n });\n $('.ep_summary').hide();\n $('.ep_summaryTrigger').on('click', function () {\n $(this).next('.ep_summary').slideToggle('normal', function () {\n $(this).prev('.ep_summaryTrigger').prop('src', function (i, src) {\n return $(this).next('.ep_summary').is(':visible') ? src.replace('plus', 'minus') : src.replace('minus', 'plus');\n });\n });\n });\n }\n\n $('#popover').popover({\n placement: 'bottom',\n html: true,\n // Required if content has HTML\n content: '
'\n }).on('shown.bs.popover', () => {\n // Bootstrap popover event triggered when the popover opens\n // call this function to copy the column selection code into the popover\n $.tablesorter.columnSelector.attachTo($('#showListTable'), '#popover-target');\n });\n });\n },\n\n methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapActions\"])({\n setLayout: 'setLayout'\n }))\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack:///./src/components/schedule.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function($) {/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: 'schedule',\n template: '#schedule-template',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__[\"AppLink\"]\n },\n\n data() {\n return {\n layoutOptions: [{\n value: 'poster',\n text: 'Poster'\n }, {\n value: 'calendar',\n text: 'Calendar'\n }, {\n value: 'banner',\n text: 'Banner'\n }, {\n value: 'list',\n text: 'List'\n }]\n };\n },\n\n computed: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapState\"])({\n config: state => state.config,\n // Renamed because of the computed property 'layout'.\n stateLayout: state => state.layout\n }), {\n header() {\n return this.$route.meta.header;\n },\n\n scheduleLayout: {\n get() {\n const {\n stateLayout\n } = this;\n return stateLayout.schedule;\n },\n\n set(layout) {\n const {\n setLayout\n } = this;\n const page = 'schedule';\n setLayout({\n page,\n layout\n });\n }\n\n },\n\n themeSpinner() {\n const {\n stateLayout\n } = this;\n return stateLayout.themeName === 'dark' ? '-dark' : '';\n }\n\n }),\n\n mounted() {\n // $store.dispatch('getShows');\n this.$root.$once('loaded', () => {\n const {\n scheduleLayout,\n stateLayout,\n themeSpinner\n } = this;\n const {\n comingEps\n } = stateLayout;\n\n if (scheduleLayout === 'list') {\n const sortCodes = {\n date: 0,\n show: 2,\n network: 5\n };\n const {\n sort\n } = comingEps;\n const sortList = sort in sortCodes ? [[sortCodes[sort], 0]] : [[0, 0]];\n $('#showListTable:has(tbody tr)').tablesorter({\n widgets: ['stickyHeaders', 'filter', 'columnSelector', 'saveSort'],\n sortList,\n textExtraction: {\n 0: node => $(node).find('time').attr('datetime'),\n 1: node => $(node).find('time').attr('datetime'),\n 7: node => $(node).find('span').text().toLowerCase(),\n 8: node => $(node).find('a[data-indexer-name]').attr('data-indexer-name')\n },\n headers: {\n 0: {\n sorter: 'realISODate'\n },\n 1: {\n sorter: 'realISODate'\n },\n 2: {\n sorter: 'loadingNames'\n },\n 4: {\n sorter: 'loadingNames'\n },\n 7: {\n sorter: 'quality'\n },\n 8: {\n sorter: 'text'\n },\n 9: {\n sorter: false,\n filter: false\n }\n },\n widgetOptions: {\n filter_columnFilters: true,\n // eslint-disable-line camelcase\n filter_hideFilters: true,\n // eslint-disable-line camelcase\n filter_saveFilters: true,\n // eslint-disable-line camelcase\n columnSelector_mediaquery: false // eslint-disable-line camelcase\n\n }\n });\n $.ajaxEpSearch();\n }\n\n if (['banner', 'poster'].includes(scheduleLayout)) {\n $.ajaxEpSearch({\n size: 16,\n loadingImage: \"loading16\".concat(themeSpinner, \".gif\")\n });\n $('.ep_summary').hide();\n $('.ep_summaryTrigger').on('click', function () {\n $(this).next('.ep_summary').slideToggle('normal', function () {\n $(this).prev('.ep_summaryTrigger').prop('src', function (i, src) {\n return $(this).next('.ep_summary').is(':visible') ? src.replace('plus', 'minus') : src.replace('minus', 'plus');\n });\n });\n });\n }\n\n $('#popover').popover({\n placement: 'bottom',\n html: true,\n // Required if content has HTML\n content: '
'\n }).on('shown.bs.popover', () => {\n // Bootstrap popover event triggered when the popover opens\n // call this function to copy the column selection code into the popover\n $.tablesorter.columnSelector.attachTo($('#showListTable'), '#popover-target');\n });\n });\n },\n\n methods: _objectSpread({}, Object(vuex__WEBPACK_IMPORTED_MODULE_1__[\"mapActions\"])({\n setLayout: 'setLayout'\n }))\n});\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\")))\n\n//# sourceURL=webpack:///./src/components/schedule.vue?./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), @@ -3310,7 +3310,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerGlobalComponents\", function() { return registerGlobalComponents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerPlugins\", function() { return registerPlugins; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var vue_async_computed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-async-computed */ \"./node_modules/vue-async-computed/dist/vue-async-computed.esm.js\");\n/* harmony import */ var vue_meta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-meta */ \"./node_modules/vue-meta/dist/vue-meta.esm.js\");\n/* harmony import */ var vue_snotify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-snotify */ \"./node_modules/vue-snotify/vue-snotify.esm.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-cookies */ \"./node_modules/vue-cookies/vue-cookies.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_cookies__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-js-modal */ \"./node_modules/vue-js-modal/dist/index.js\");\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_js_modal__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components */ \"./src/components/index.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./store */ \"./src/store/index.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/core */ \"./src/utils/core.js\");\n// @TODO: Remove this file before v1.0.0\n\n\n\n\n\n\n\n\n\n\n/**\n * Register global components and x-template components.\n */\n\nconst registerGlobalComponents = () => {\n // Start with the x-template components\n let {\n components = []\n } = window; // Add global components (in use by `main.mako`)\n // @TODO: These should be registered in an `App.vue` component when possible,\n // along with some of the `main.mako` template\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AppFooter\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppHeader\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ScrollButtons\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SubMenu\"]]); // Add global components (in use by pages/components that are not SFCs yet)\n // Use this when it's not possible to use `components: { ... }` in a component's definition.\n // If a component that uses any of these is a SFC, please use the `components` key when defining it.\n // @TODO: Instead of globally registering these,\n // they should be registered in each component that uses them\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AddShowOptions\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AnidbReleaseGroupUi\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppLink\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Asset\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Backstretch\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTemplate\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextbox\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextboxNumber\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigToggleSlider\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"FileBrowser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"LanguageSelect\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"PlotInfo\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityChooser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityPill\"], // @FIXME: (sharkykh) Used in a hack/workaround in `static/js/ajax-episode-search.js`\n _components__WEBPACK_IMPORTED_MODULE_7__[\"RootDirs\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SelectList\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ShowSelector\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"StateSwitch\"]]); // Add components for pages that use `pageComponent`\n // @TODO: These need to be converted to Vue SFCs\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"History\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Home\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ManualPostProcess\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Schedule\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SnatchSelection\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Status\"]]); // Register the components globally\n\n components.forEach(component => {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug(\"Registering \".concat(component.name));\n }\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].component(component.name, component);\n });\n};\n/**\n * Register plugins.\n */\n\nconst registerPlugins = () => {\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_async_computed__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_meta__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_snotify__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(v_tooltip__WEBPACK_IMPORTED_MODULE_6__[\"VTooltip\"]); // Set default cookie expire time\n\n vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a.config('10y');\n};\n/**\n * Apply the global Vue shim.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (() => {\n const warningTemplate = (name, state) => \"\".concat(name, \" is using the global Vuex '\").concat(state, \"' state, \") + \"please replace that with a local one using: mapState(['\".concat(state, \"'])\");\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mixin({\n data() {\n // These are only needed for the root Vue\n if (this.$root === this) {\n return {\n globalLoading: true,\n pageComponent: false\n };\n }\n\n return {};\n },\n\n mounted() {\n if (this.$root === this && !window.location.pathname.includes('/login')) {\n const {\n username\n } = window;\n Promise.all([\n /* This is used by the `app-header` component\n to only show the logout button if a username is set */\n _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('login', {\n username\n }), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getConfig'), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getStats')]).then(([_, config]) => {\n this.$emit('loaded'); // Legacy - send config.main to jQuery (received by index.js)\n\n const event = new CustomEvent('medusa-config-loaded', {\n detail: config.main\n });\n window.dispatchEvent(event);\n }).catch(error => {\n console.debug(error);\n alert('Unable to connect to Medusa!'); // eslint-disable-line no-alert\n });\n }\n\n this.$once('loaded', () => {\n this.$root.globalLoading = false;\n });\n },\n\n // Make auth and config accessible to all components\n // @TODO: Remove this completely\n computed: {\n // Deprecate the global `Vuex.mapState(['auth', 'config'])`\n auth() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'auth'));\n }\n\n return this.$store.state.auth;\n },\n\n config() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'config'));\n }\n\n return this.$store.state.config;\n }\n\n }\n });\n\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug('Loading local Vue');\n }\n\n registerPlugins();\n registerGlobalComponents();\n});\n\n//# sourceURL=webpack:///./src/global-vue-shim.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerGlobalComponents\", function() { return registerGlobalComponents; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"registerPlugins\", function() { return registerPlugins; });\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.esm.js\");\n/* harmony import */ var vue_async_computed__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue-async-computed */ \"./node_modules/vue-async-computed/dist/vue-async-computed.esm.js\");\n/* harmony import */ var vue_meta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vue-meta */ \"./node_modules/vue-meta/dist/vue-meta.esm.js\");\n/* harmony import */ var vue_snotify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-snotify */ \"./node_modules/vue-snotify/vue-snotify.esm.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-cookies */ \"./node_modules/vue-cookies/vue-cookies.js\");\n/* harmony import */ var vue_cookies__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_cookies__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-js-modal */ \"./node_modules/vue-js-modal/dist/index.js\");\n/* harmony import */ var vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_js_modal__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* harmony import */ var _components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components */ \"./src/components/index.js\");\n/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./store */ \"./src/store/index.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/core */ \"./src/utils/core.js\");\n// @TODO: Remove this file before v1.0.0\n\n\n\n\n\n\n\n\n\n\n/**\n * Register global components and x-template components.\n */\n\nconst registerGlobalComponents = () => {\n // Start with the x-template components\n let {\n components = []\n } = window; // Add global components (in use by `main.mako`)\n // @TODO: These should be registered in an `App.vue` component when possible,\n // along with some of the `main.mako` template\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AppFooter\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppHeader\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ScrollButtons\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SubMenu\"]]); // Add global components (in use by pages/components that are not SFCs yet)\n // Use this when it's not possible to use `components: { ... }` in a component's definition.\n // If a component that uses any of these is a SFC, please use the `components` key when defining it.\n // @TODO: Instead of globally registering these,\n // they should be registered in each component that uses them\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"AddShowOptions\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AnidbReleaseGroupUi\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"AppLink\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Asset\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Backstretch\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTemplate\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextbox\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigTextboxNumber\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ConfigToggleSlider\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"FileBrowser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"LanguageSelect\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"PlotInfo\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityChooser\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"QualityPill\"], // @FIXME: (sharkykh) Used in a hack/workaround in `static/js/ajax-episode-search.js`\n _components__WEBPACK_IMPORTED_MODULE_7__[\"RootDirs\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SelectList\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ShowSelector\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"StateSwitch\"]]); // Add components for pages that use `pageComponent`\n // @TODO: These need to be converted to Vue SFCs\n\n components = components.concat([_components__WEBPACK_IMPORTED_MODULE_7__[\"History\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Home\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"ManualPostProcess\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Schedule\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"SnatchSelection\"], _components__WEBPACK_IMPORTED_MODULE_7__[\"Status\"]]); // Register the components globally\n\n components.forEach(component => {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug(\"Registering \".concat(component.name));\n }\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].component(component.name, component);\n });\n};\n/**\n * Register plugins.\n */\n\nconst registerPlugins = () => {\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_async_computed__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_meta__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_snotify__WEBPACK_IMPORTED_MODULE_3__[\"default\"]);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(vue_js_modal__WEBPACK_IMPORTED_MODULE_5___default.a);\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].use(v_tooltip__WEBPACK_IMPORTED_MODULE_6__[\"VTooltip\"]); // Set default cookie expire time\n\n vue_cookies__WEBPACK_IMPORTED_MODULE_4___default.a.config('10y');\n};\n/**\n * Apply the global Vue shim.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (() => {\n const warningTemplate = (name, state) => \"\".concat(name, \" is using the global Vuex '\").concat(state, \"' state, \") + \"please replace that with a local one using: mapState(['\".concat(state, \"'])\");\n\n vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"].mixin({\n data() {\n // These are only needed for the root Vue\n if (this.$root === this) {\n return {\n globalLoading: true,\n pageComponent: false\n };\n }\n\n return {};\n },\n\n mounted() {\n if (this.$root === this && !window.location.pathname.includes('/login')) {\n const {\n username\n } = window;\n Promise.all([\n /* This is used by the `app-header` component\n to only show the logout button if a username is set */\n _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('login', {\n username\n }), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getConfig'), _store__WEBPACK_IMPORTED_MODULE_8__[\"default\"].dispatch('getStats')]).then(([_, config]) => {\n this.$root.$emit('loaded'); // Legacy - send config.main to jQuery (received by index.js)\n\n const event = new CustomEvent('medusa-config-loaded', {\n detail: config.main\n });\n window.dispatchEvent(event);\n }).catch(error => {\n console.debug(error);\n alert('Unable to connect to Medusa!'); // eslint-disable-line no-alert\n });\n }\n\n this.$root.$once('loaded', () => {\n this.$root.globalLoading = false;\n });\n },\n\n // Make auth and config accessible to all components\n // @TODO: Remove this completely\n computed: {\n // Deprecate the global `Vuex.mapState(['auth', 'config'])`\n auth() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'auth'));\n }\n\n return this.$store.state.auth;\n },\n\n config() {\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"] && !this.__VUE_DEVTOOLS_UID__) {\n console.warn(warningTemplate(this._name, 'config'));\n }\n\n return this.$store.state.config;\n }\n\n }\n });\n\n if (_utils_core__WEBPACK_IMPORTED_MODULE_9__[\"isDevelopment\"]) {\n console.debug('Loading local Vue');\n }\n\n registerPlugins();\n registerGlobalComponents();\n});\n\n//# sourceURL=webpack:///./src/global-vue-shim.js?"); /***/ }),