1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

Delete site/folder

This commit is contained in:
Kyle Spearrin
2016-09-22 14:16:24 -04:00
parent f28b690a2a
commit 95ab611595
9 changed files with 93 additions and 18 deletions

View File

@@ -49,6 +49,25 @@ angular
});
};
$scope.delete = function () {
SweetAlert.swal({
title: 'Delete Site',
text: 'Are you sure you want to delete this site?',
showCancelButton: true,
confirmButtonText: 'Yes',
cancelButtonText: 'No'
}, function (confirmed) {
if (confirmed) {
$q.when(siteService.deleteWithServer(siteId)).then(function () {
toastr.success('Deleted site');
$state.go('tabs.vault', {
animation: 'out-slide-down'
});
});
}
});
};
$scope.close = function () {
if (fromView) {
$state.go('viewSite', {
@@ -70,7 +89,7 @@ angular
$scope.generatePassword = function () {
if ($scope.site.password) {
SweetAlert.swal({
title: 'Warning',
title: 'Overwrite Password',
text: 'Are you sure you want to overwrite the current password?',
showCancelButton: true,
confirmButtonText: 'Yes',