mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Bug fixes and enhancements
This commit is contained in:
parent
739a447ce9
commit
8a247e1ed7
3 changed files with 14 additions and 13 deletions
|
@ -73,7 +73,10 @@
|
|||
|
||||
this.hideOverlay();
|
||||
|
||||
// Ask for user's notificatio permission.
|
||||
// Load the default view.
|
||||
this.loadMainView('queue');
|
||||
|
||||
// Ask for user's notification permission.
|
||||
this.requestNotifPermission();
|
||||
|
||||
// Let all other compoenents know we're ready.
|
||||
|
|
|
@ -43,18 +43,16 @@
|
|||
this.$root.showOverlay();
|
||||
|
||||
settingStore.update(() => {
|
||||
// Data changed.
|
||||
// Everything changed.
|
||||
// It's the time of the oath.
|
||||
// We need refresh the page.
|
||||
// Goodbye.
|
||||
document.location.reload();
|
||||
}, (error, status) => {
|
||||
if (status === 422) {
|
||||
error = utils.parseValidationError(error)[0];
|
||||
// Re-init the app.
|
||||
this.$root.init();
|
||||
}, (error) => {
|
||||
var msg = 'Unknown error.';
|
||||
|
||||
if (error.status === 422) {
|
||||
msg = utils.parseValidationError(error.data)[0];
|
||||
}
|
||||
|
||||
this.$root.showOverlay(`Error: ${error}`, 'error', true);
|
||||
this.$root.showOverlay(`Error: ${msg}`, 'error', true);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@ export default {
|
|||
return this.state.settings;
|
||||
},
|
||||
|
||||
update(cb = null, error = null) {
|
||||
http.post('settings', this.all(), cb, error);
|
||||
update(successCb = null, errorCb = null) {
|
||||
http.post('settings', this.all(), successCb, errorCb);
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue