1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00

cleanup and formatting

This commit is contained in:
Kyle Spearrin
2017-11-27 23:46:03 -05:00
parent 78c4ea7ecb
commit 8332e52a7b
19 changed files with 104 additions and 146 deletions

View File

@@ -9,7 +9,7 @@ class AddFolderController {
i18n: any;
constructor(private folderService: any, private $state: any, private toastr: any, utilsService: UtilsService,
private $analytics: any, private i18nService: any, $timeout: any) {
private $analytics: any, private i18nService: any, $timeout: any) {
$timeout(() => {
utilsService.initListSectionItemListeners(document, angular);
document.getElementById('name').focus();
@@ -26,17 +26,14 @@ class AddFolderController {
return;
}
this.savePromise = this.folderService
.encrypt(model)
.then((folderModel: any) => {
const folder = new Folder(folderModel, true);
return this.folderService.saveWithServer(folder);
})
.then((folder: any) => {
this.$analytics.eventTrack('Added Folder');
this.toastr.success(this.i18nService.addedFolder);
this.$state.go('^.list', { animation: 'out-slide-down' });
});
this.savePromise = this.folderService.encrypt(model).then((folderModel: any) => {
const folder = new Folder(folderModel, true);
return this.folderService.saveWithServer(folder);
}).then((folder: any) => {
this.$analytics.eventTrack('Added Folder');
this.toastr.success(this.i18nService.addedFolder);
this.$state.go('^.list', { animation: 'out-slide-down' });
});
}
}