(feat) show small toast when preferences are saved to give user's feedback
This commit is contained in:
parent
65525dd33b
commit
078ba95f8e
|
@ -7,8 +7,8 @@
|
||||||
/**
|
/**
|
||||||
* @ngInject
|
* @ngInject
|
||||||
*/
|
*/
|
||||||
PreferencesController.$inject = ['$state', '$mdDialog', 'Dialog', 'User', 'Mailbox', 'statePreferences', 'Authentication'];
|
PreferencesController.$inject = ['$state', '$mdDialog', '$mdToast', 'Dialog', 'User', 'Mailbox', 'statePreferences', 'Authentication'];
|
||||||
function PreferencesController($state, $mdDialog, Dialog, User, Mailbox, statePreferences, Authentication) {
|
function PreferencesController($state, $mdDialog, $mdToast, Dialog, User, Mailbox, statePreferences, Authentication) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.preferences = statePreferences;
|
vm.preferences = statePreferences;
|
||||||
|
@ -212,7 +212,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sendForm)
|
if (sendForm)
|
||||||
vm.preferences.$save();
|
vm.preferences.$save().then(function(data) {
|
||||||
|
$mdToast.show(
|
||||||
|
$mdToast.simple()
|
||||||
|
.content('Preferences saved!')
|
||||||
|
.position('top right')
|
||||||
|
.hideDelay(3000)
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function canChangePassword() {
|
function canChangePassword() {
|
||||||
|
|
Loading…
Reference in a new issue