mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Added toast config and messages when saving from vault. Persist scroll position when returning to vault from other pages.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
angular
|
||||
angular
|
||||
.module('bit.vault')
|
||||
|
||||
.controller('vaultEditSiteController', function ($scope, $state, $stateParams, siteService, folderService, cipherService, $q) {
|
||||
.controller('vaultEditSiteController', function ($scope, $state, $stateParams, siteService, folderService, cipherService, $q, toastr) {
|
||||
var returnScrollY = $stateParams.returnScrollY;
|
||||
|
||||
$scope.site = {
|
||||
folderId: null
|
||||
};
|
||||
@@ -44,8 +46,8 @@
|
||||
var site = new Site(siteModel, true);
|
||||
return site;
|
||||
}).then(function (site) {
|
||||
return saveSite(site, function (site) {
|
||||
alert('Saved ' + site.id + '!');
|
||||
return saveSite(site).then(function (site) {
|
||||
toastr.success('Edited site');
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -55,7 +57,7 @@
|
||||
$state.go('viewSite', { siteId: $stateParams.siteId, animation: 'out-slide-down' });
|
||||
}
|
||||
else {
|
||||
$state.go('tabs.vault', { animation: 'out-slide-down' });
|
||||
$state.go('tabs.vault', { animation: 'out-slide-down', scrollY: returnScrollY || 0 });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user