Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dragging and saving Anime / Series list handles in Home - Poste… #7502

Merged
merged 2 commits into from
Dec 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.