Skip to content

Commit

Permalink
Fixed dragging and saving Anime / Series list handles in Home - Poste… (
Browse files Browse the repository at this point in the history
#7502)

* Fixed dragging and saving Anime / Series list handles in Home - Poster layout
* Also shows notify now.

* Update CHANGELOG.md
  • Loading branch information
p0psicles authored and medariox committed Dec 16, 2019
1 parent 57c0df1 commit ead86ad
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Fix Emby notifier error on Python 3 ([#7497](https://github.com/pymedusa/Medusa/pull/7497))
- Fix more qBittorrent authentication bugs ([#7501](https://github.com/pymedusa/Medusa/pull/7501))
- 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))

-----

Expand Down
26 changes: 16 additions & 10 deletions themes-default/slim/src/components/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
});
},
mounted() {
const { config, stateLayout, setConfig } = this;
const { $snotify, config, stateLayout, setConfig } = this;
// Resets the tables sorting, needed as we only use a single call for both tables in tablesorter
$(document.body).on('click', '.resetsorting', () => {
$('table').trigger('filterReset');
Expand Down Expand Up @@ -450,7 +450,7 @@ export default {
}
}
},
update(event) {
async update(event) {
const showListOrder = $(event.target.children).map((index, el) => {
return $(el).data('list');
});
Expand All @@ -460,14 +460,20 @@ export default {
showListOrder: showListOrder.toArray()
}
};
const section = 'layout';
setConfig({ section, config: { layout } })
.then(response => {
console.info(response);
})
.catch(error => {
console.error(error);
});
try {
await setConfig({ section: 'main', config: { layout } });
$snotify.success(
'Saved Home poster list type order',
'Saved',
{ timeout: 5000 }
);
} catch (error) {
$snotify.error(
'Error while trying to save home poster list type order',
'Error'
);
}
}
});
}; // END initializePage()
Expand Down
1 change: 1 addition & 0 deletions themes-default/slim/views/home.mako
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<script type="text/x-template" id="home-template">
<div>
<backstretch :slug="config.randomShowSlug"></backstretch>
<vue-snotify></vue-snotify>
<div class="row" v-if="layout === 'poster'">
<div class="col-lg-9 col-md-12 col-sm-12 col-xs-12 pull-right">
Expand Down
2 changes: 1 addition & 1 deletion themes/dark/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions themes/dark/templates/home.mako

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion themes/light/assets/js/medusa-runtime.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions themes/light/templates/home.mako

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ead86ad

Please sign in to comment.