mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
refactored a few properties into getters (#272)
This commit is contained in:
parent
0b79f112b9
commit
1968dbfee2
@ -35,9 +35,7 @@ export class AddEditComponent implements OnInit {
|
||||
|
||||
copyLink = false;
|
||||
disableSend = false;
|
||||
editMode: boolean = false;
|
||||
send: SendView;
|
||||
title: string;
|
||||
deletionDate: string;
|
||||
expirationDate: string;
|
||||
hasPassword: boolean;
|
||||
@ -94,15 +92,19 @@ export class AddEditComponent implements OnInit {
|
||||
await this.load();
|
||||
}
|
||||
|
||||
async load() {
|
||||
this.editMode = this.sendId != null;
|
||||
if (this.editMode) {
|
||||
this.editMode = true;
|
||||
this.title = this.i18nService.t('editSend');
|
||||
} else {
|
||||
this.title = this.i18nService.t('createSend');
|
||||
}
|
||||
get editMode(): boolean {
|
||||
return this.sendId != null;
|
||||
}
|
||||
|
||||
get title(): string {
|
||||
return this.i18nService.t(
|
||||
this.editMode ?
|
||||
'editSend' :
|
||||
'createSend'
|
||||
);
|
||||
}
|
||||
|
||||
async load() {
|
||||
const policies = await this.policyService.getAll(PolicyType.DisableSend);
|
||||
const organizations = await this.userService.getAllOrganizations();
|
||||
this.disableSend = organizations.some(o => {
|
||||
|
Loading…
Reference in New Issue
Block a user