mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
init functions
This commit is contained in:
@@ -26,16 +26,7 @@ export class FolderAddEditComponent implements OnInit {
|
||||
protected platformUtilsService: PlatformUtilsService) { }
|
||||
|
||||
async ngOnInit() {
|
||||
this.editMode = this.folderId != null;
|
||||
|
||||
if (this.editMode) {
|
||||
this.editMode = true;
|
||||
this.title = this.i18nService.t('editFolder');
|
||||
const folder = await this.folderService.get(this.folderId);
|
||||
this.folder = await folder.decrypt();
|
||||
} else {
|
||||
this.title = this.i18nService.t('addFolder');
|
||||
}
|
||||
await this.init();
|
||||
}
|
||||
|
||||
async submit(): Promise<boolean> {
|
||||
@@ -77,4 +68,17 @@ export class FolderAddEditComponent implements OnInit {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected async init() {
|
||||
this.editMode = this.folderId != null;
|
||||
|
||||
if (this.editMode) {
|
||||
this.editMode = true;
|
||||
this.title = this.i18nService.t('editFolder');
|
||||
const folder = await this.folderService.get(this.folderId);
|
||||
this.folder = await folder.decrypt();
|
||||
} else {
|
||||
this.title = this.i18nService.t('addFolder');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user