(feat) show small toast when preferences are saved to give user's feedback
parent
65525dd33b
commit
078ba95f8e
|
@ -7,8 +7,8 @@
|
|||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
PreferencesController.$inject = ['$state', '$mdDialog', 'Dialog', 'User', 'Mailbox', 'statePreferences', 'Authentication'];
|
||||
function PreferencesController($state, $mdDialog, Dialog, User, Mailbox, statePreferences, Authentication) {
|
||||
PreferencesController.$inject = ['$state', '$mdDialog', '$mdToast', 'Dialog', 'User', 'Mailbox', 'statePreferences', 'Authentication'];
|
||||
function PreferencesController($state, $mdDialog, $mdToast, Dialog, User, Mailbox, statePreferences, Authentication) {
|
||||
var vm = this;
|
||||
|
||||
vm.preferences = statePreferences;
|
||||
|
@ -212,7 +212,14 @@
|
|||
}
|
||||
|
||||
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() {
|
||||
|
|
Loading…
Reference in New Issue