mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
@@ -26,7 +26,7 @@ export class AddEditCustomFieldsComponent implements OnChanges {
|
||||
|
||||
constructor(
|
||||
private i18nService: I18nService,
|
||||
private eventCollectionService: EventCollectionService
|
||||
private eventCollectionService: EventCollectionService,
|
||||
) {
|
||||
this.addFieldTypeOptions = [
|
||||
{ name: i18nService.t("cfTypeText"), value: FieldType.Text },
|
||||
@@ -78,7 +78,7 @@ export class AddEditCustomFieldsComponent implements OnChanges {
|
||||
if (this.editMode && f.showValue) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledHiddenFieldVisible,
|
||||
this.cipher.id
|
||||
this.cipher.id,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ export class AddEditCustomFieldsComponent implements OnChanges {
|
||||
|
||||
const options: any = [];
|
||||
this.cipher.linkedFieldOptions.forEach((linkedFieldOption, id) =>
|
||||
options.push({ name: this.i18nService.t(linkedFieldOption.i18nKey), value: id })
|
||||
options.push({ name: this.i18nService.t(linkedFieldOption.i18nKey), value: id }),
|
||||
);
|
||||
this.linkedFieldOptions = options.sort(Utils.getSortFunction(this.i18nService, "name"));
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
protected passwordRepromptService: PasswordRepromptService,
|
||||
private organizationService: OrganizationService,
|
||||
protected sendApiService: SendApiService,
|
||||
protected dialogService: DialogService
|
||||
protected dialogService: DialogService,
|
||||
) {
|
||||
this.typeOptions = [
|
||||
{ name: i18nService.t("typeLogin"), value: CipherType.Login },
|
||||
@@ -171,7 +171,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.personalOwnershipPolicyAppliesToActiveUser = policyAppliesToActiveUser;
|
||||
await this.init();
|
||||
}),
|
||||
takeUntil(this.destroy$)
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
@@ -226,7 +226,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
if (this.editMode) {
|
||||
const cipher = await this.loadCipher();
|
||||
this.cipher = await cipher.decrypt(
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(cipher)
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(cipher),
|
||||
);
|
||||
|
||||
// Adjust Cipher Name if Cloning
|
||||
@@ -293,7 +293,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("nameRequired")
|
||||
this.i18nService.t("nameRequired"),
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("personalOwnershipSubmitError")
|
||||
this.i18nService.t("personalOwnershipSubmitError"),
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -342,7 +342,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
null,
|
||||
this.i18nService.t(this.editMode && !this.cloneMode ? "editedItem" : "addedItem")
|
||||
this.i18nService.t(this.editMode && !this.cloneMode ? "editedItem" : "addedItem"),
|
||||
);
|
||||
this.onSavedCipher.emit(this.cipher);
|
||||
this.messagingService.send(this.editMode && !this.cloneMode ? "editedCipher" : "addedCipher");
|
||||
@@ -424,11 +424,11 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
null,
|
||||
this.i18nService.t(this.cipher.isDeleted ? "permanentlyDeletedItem" : "deletedItem")
|
||||
this.i18nService.t(this.cipher.isDeleted ? "permanentlyDeletedItem" : "deletedItem"),
|
||||
);
|
||||
this.onDeletedCipher.emit(this.cipher);
|
||||
this.messagingService.send(
|
||||
this.cipher.isDeleted ? "permanentlyDeletedCipher" : "deletedCipher"
|
||||
this.cipher.isDeleted ? "permanentlyDeletedCipher" : "deletedCipher",
|
||||
);
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
@@ -495,7 +495,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
if (this.editMode && this.showPassword) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledPasswordVisible,
|
||||
this.cipherId
|
||||
this.cipherId,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -505,7 +505,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
if (this.showCardNumber) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledCardNumberVisible,
|
||||
this.cipherId
|
||||
this.cipherId,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -516,7 +516,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
if (this.editMode && this.showCardCode) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledCardCodeVisible,
|
||||
this.cipherId
|
||||
this.cipherId,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -537,7 +537,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
if (this.cipher.organizationId != null) {
|
||||
this.collections = this.writeableCollections.filter(
|
||||
(c) => c.organizationId === this.cipher.organizationId
|
||||
(c) => c.organizationId === this.cipher.organizationId,
|
||||
);
|
||||
const org = await this.organizationService.get(this.cipher.organizationId);
|
||||
if (org != null) {
|
||||
@@ -569,7 +569,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.platformUtilsService.showToast(
|
||||
"warning",
|
||||
null,
|
||||
this.i18nService.t("passwordExposed", matches.toString())
|
||||
this.i18nService.t("passwordExposed", matches.toString()),
|
||||
);
|
||||
} else {
|
||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("passwordSafe"));
|
||||
|
||||
@@ -41,7 +41,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
protected logService: LogService,
|
||||
protected stateService: StateService,
|
||||
protected fileDownloadService: FileDownloadService,
|
||||
protected dialogService: DialogService
|
||||
protected dialogService: DialogService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -55,7 +55,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("selectFile")
|
||||
this.i18nService.t("selectFile"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("maxFileSize")
|
||||
this.i18nService.t("maxFileSize"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -74,7 +74,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
this.formPromise = this.saveCipherAttachment(files[0]);
|
||||
this.cipherDomain = await this.formPromise;
|
||||
this.cipher = await this.cipherDomain.decrypt(
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain)
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain),
|
||||
);
|
||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("attachmentSaved"));
|
||||
this.onUploadedAttachment.emit();
|
||||
@@ -130,7 +130,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("premiumRequired"),
|
||||
this.i18nService.t("premiumRequiredDesc")
|
||||
this.i18nService.t("premiumRequiredDesc"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
const attachmentDownloadResponse = await this.apiService.getAttachmentData(
|
||||
this.cipher.id,
|
||||
attachment.id,
|
||||
this.emergencyAccessId
|
||||
this.emergencyAccessId,
|
||||
);
|
||||
url = attachmentDownloadResponse.url;
|
||||
} catch (e) {
|
||||
@@ -182,7 +182,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
protected async init() {
|
||||
this.cipherDomain = await this.loadCipher();
|
||||
this.cipher = await this.cipherDomain.decrypt(
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain)
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain),
|
||||
);
|
||||
|
||||
const canAccessPremium = await this.stateService.getCanAccessPremium();
|
||||
@@ -231,10 +231,10 @@ export class AttachmentsComponent implements OnInit {
|
||||
this.cipherDomain,
|
||||
attachment.fileName,
|
||||
decBuf,
|
||||
admin
|
||||
admin,
|
||||
);
|
||||
this.cipher = await this.cipherDomain.decrypt(
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain)
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain),
|
||||
);
|
||||
|
||||
// 3. Delete old
|
||||
@@ -251,7 +251,7 @@ export class AttachmentsComponent implements OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
null,
|
||||
this.i18nService.t("attachmentSaved")
|
||||
this.i18nService.t("attachmentSaved"),
|
||||
);
|
||||
this.onReuploadedAttachment.emit();
|
||||
} catch (e) {
|
||||
|
||||
@@ -33,7 +33,7 @@ export class FolderAddEditComponent implements OnInit {
|
||||
protected platformUtilsService: PlatformUtilsService,
|
||||
protected logService: LogService,
|
||||
protected dialogService: DialogService,
|
||||
protected formBuilder: FormBuilder
|
||||
protected formBuilder: FormBuilder,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -46,7 +46,7 @@ export class FolderAddEditComponent implements OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("errorOccurred"),
|
||||
this.i18nService.t("nameRequired")
|
||||
this.i18nService.t("nameRequired"),
|
||||
);
|
||||
return false;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ export class FolderAddEditComponent implements OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
null,
|
||||
this.i18nService.t(this.editMode ? "editedFolder" : "addedFolder")
|
||||
this.i18nService.t(this.editMode ? "editedFolder" : "addedFolder"),
|
||||
);
|
||||
this.onSavedFolder.emit(this.folder);
|
||||
return true;
|
||||
|
||||
@@ -35,7 +35,7 @@ export class IconComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
private environmentService: EnvironmentService,
|
||||
private settingsService: SettingsService
|
||||
private settingsService: SettingsService,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
|
||||
@@ -14,7 +14,7 @@ export class PasswordHistoryComponent implements OnInit {
|
||||
protected cipherService: CipherService,
|
||||
protected platformUtilsService: PlatformUtilsService,
|
||||
protected i18nService: I18nService,
|
||||
private win: Window
|
||||
private win: Window,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
@@ -27,14 +27,14 @@ export class PasswordHistoryComponent implements OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"info",
|
||||
null,
|
||||
this.i18nService.t("valueCopied", this.i18nService.t("password"))
|
||||
this.i18nService.t("valueCopied", this.i18nService.t("password")),
|
||||
);
|
||||
}
|
||||
|
||||
protected async init() {
|
||||
const cipher = await this.cipherService.get(this.cipherId);
|
||||
const decCipher = await cipher.decrypt(
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(cipher)
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(cipher),
|
||||
);
|
||||
this.history = decCipher.passwordHistory == null ? [] : decCipher.passwordHistory;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export class PremiumComponent implements OnInit {
|
||||
private logService: LogService,
|
||||
protected stateService: StateService,
|
||||
protected dialogService: DialogService,
|
||||
private environmentService: EnvironmentService
|
||||
private environmentService: EnvironmentService,
|
||||
) {
|
||||
this.cloudWebVaultUrl = this.environmentService.getCloudWebVaultUrl();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,10 @@ export class VaultItemsComponent {
|
||||
this._searchText = value;
|
||||
}
|
||||
|
||||
constructor(protected searchService: SearchService, protected cipherService: CipherService) {}
|
||||
constructor(
|
||||
protected searchService: SearchService,
|
||||
protected cipherService: CipherService,
|
||||
) {}
|
||||
|
||||
async load(filter: (cipher: CipherView) => boolean = null, deleted = false) {
|
||||
this.deleted = deleted ?? false;
|
||||
@@ -97,7 +100,7 @@ export class VaultItemsComponent {
|
||||
this.ciphers = await this.searchService.searchCiphers(
|
||||
this.searchText,
|
||||
[this.filter, this.deletedFilter],
|
||||
indexedCiphers
|
||||
indexedCiphers,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export class ViewCustomFieldsComponent {
|
||||
if (f.showValue) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledHiddenFieldVisible,
|
||||
this.cipher.id
|
||||
this.cipher.id,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
private logService: LogService,
|
||||
protected stateService: StateService,
|
||||
protected fileDownloadService: FileDownloadService,
|
||||
protected dialogService: DialogService
|
||||
protected dialogService: DialogService,
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -115,7 +115,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
|
||||
const cipher = await this.cipherService.get(this.cipherId);
|
||||
this.cipher = await cipher.decrypt(
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(cipher)
|
||||
await this.cipherService.getKeyForCipherKeyDecryption(cipher),
|
||||
);
|
||||
this.canAccessPremium = await this.stateService.getCanAccessPremium();
|
||||
this.showPremiumRequiredTotp =
|
||||
@@ -208,7 +208,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"success",
|
||||
null,
|
||||
this.i18nService.t(this.cipher.isDeleted ? "permanentlyDeletedItem" : "deletedItem")
|
||||
this.i18nService.t(this.cipher.isDeleted ? "permanentlyDeletedItem" : "deletedItem"),
|
||||
);
|
||||
this.onDeletedCipher.emit(this.cipher);
|
||||
} catch (e) {
|
||||
@@ -244,7 +244,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
if (this.showPassword) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledPasswordVisible,
|
||||
this.cipherId
|
||||
this.cipherId,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -266,7 +266,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
if (this.showCardNumber) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledCardNumberVisible,
|
||||
this.cipherId
|
||||
this.cipherId,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
if (this.showCardCode) {
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientToggledCardCodeVisible,
|
||||
this.cipherId
|
||||
this.cipherId,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -301,7 +301,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"warning",
|
||||
null,
|
||||
this.i18nService.t("passwordExposed", matches.toString())
|
||||
this.i18nService.t("passwordExposed", matches.toString()),
|
||||
);
|
||||
} else {
|
||||
this.platformUtilsService.showToast("success", null, this.i18nService.t("passwordSafe"));
|
||||
@@ -337,7 +337,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"info",
|
||||
null,
|
||||
this.i18nService.t("valueCopied", this.i18nService.t(typeI18nKey))
|
||||
this.i18nService.t("valueCopied", this.i18nService.t(typeI18nKey)),
|
||||
);
|
||||
|
||||
if (typeI18nKey === "password") {
|
||||
@@ -368,7 +368,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
this.platformUtilsService.showToast(
|
||||
"error",
|
||||
this.i18nService.t("premiumRequired"),
|
||||
this.i18nService.t("premiumRequiredDesc")
|
||||
this.i18nService.t("premiumRequiredDesc"),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -377,7 +377,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
try {
|
||||
const attachmentDownloadResponse = await this.apiService.getAttachmentData(
|
||||
this.cipher.id,
|
||||
attachment.id
|
||||
attachment.id,
|
||||
);
|
||||
url = attachmentDownloadResponse.url;
|
||||
} catch (e) {
|
||||
|
||||
@@ -30,7 +30,7 @@ export class VaultFilterService implements DeprecatedVaultFilterServiceAbstracti
|
||||
protected folderService: FolderService,
|
||||
protected cipherService: CipherService,
|
||||
protected collectionService: CollectionService,
|
||||
protected policyService: PolicyService
|
||||
protected policyService: PolicyService,
|
||||
) {}
|
||||
|
||||
async storeCollapsedFilterNodes(collapsedFilterNodes: Set<string>): Promise<void> {
|
||||
@@ -62,7 +62,7 @@ export class VaultFilterService implements DeprecatedVaultFilterServiceAbstracti
|
||||
const ciphers = await this.cipherService.getAllDecrypted();
|
||||
const orgCiphers = ciphers.filter((c) => c.organizationId == organizationId);
|
||||
folders = storedFolders.filter(
|
||||
(f) => orgCiphers.some((oc) => oc.folderId == f.id) || f.id == null
|
||||
(f) => orgCiphers.some((oc) => oc.folderId == f.id) || f.id == null,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class VaultFilterService implements DeprecatedVaultFilterServiceAbstracti
|
||||
};
|
||||
|
||||
return this.folderService.folderViews$.pipe(
|
||||
mergeMap((folders) => from(transformation(folders)))
|
||||
mergeMap((folders) => from(transformation(folders))),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -95,13 +95,13 @@ export class VaultFilterService implements DeprecatedVaultFilterServiceAbstracti
|
||||
|
||||
async checkForSingleOrganizationPolicy(): Promise<boolean> {
|
||||
return await firstValueFrom(
|
||||
this.policyService.policyAppliesToActiveUser$(PolicyType.SingleOrg)
|
||||
this.policyService.policyAppliesToActiveUser$(PolicyType.SingleOrg),
|
||||
);
|
||||
}
|
||||
|
||||
async checkForPersonalOwnershipPolicy(): Promise<boolean> {
|
||||
return await firstValueFrom(
|
||||
this.policyService.policyAppliesToActiveUser$(PolicyType.PersonalOwnership)
|
||||
this.policyService.policyAppliesToActiveUser$(PolicyType.PersonalOwnership),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ export class VaultFilterService implements DeprecatedVaultFilterServiceAbstracti
|
||||
|
||||
async getFolderNested(id: string): Promise<TreeNode<FolderView>> {
|
||||
const folders = await this.getAllFoldersNested(
|
||||
await firstValueFrom(this.folderService.folderViews$)
|
||||
await firstValueFrom(this.folderService.folderViews$),
|
||||
);
|
||||
return ServiceUtils.getTreeNodeObjectFromList(folders, id) as TreeNode<FolderView>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user