mirror of
https://github.com/bitwarden/web
synced 2026-01-06 02:24:02 +00:00
Fix glob processing in npm. Ban single param parens (#818)
This commit is contained in:
@@ -41,10 +41,10 @@ export class BulkShareComponent implements OnInit {
|
||||
private collectionService: CollectionService, private userService: UserService) { }
|
||||
|
||||
async ngOnInit() {
|
||||
this.shareableCiphers = this.ciphers.filter((c) => !c.hasOldAttachments && c.organizationId == null);
|
||||
this.shareableCiphers = this.ciphers.filter(c => !c.hasOldAttachments && c.organizationId == null);
|
||||
this.nonShareableCount = this.ciphers.length - this.shareableCiphers.length;
|
||||
const allCollections = await this.collectionService.getAllDecrypted();
|
||||
this.writeableCollections = allCollections.filter((c) => !c.readOnly);
|
||||
this.writeableCollections = allCollections.filter(c => !c.readOnly);
|
||||
this.organizations = await this.userService.getAllOrganizations();
|
||||
if (this.organizationId == null && this.organizations.length > 0) {
|
||||
this.organizationId = this.organizations[0].id;
|
||||
@@ -61,12 +61,12 @@ export class BulkShareComponent implements OnInit {
|
||||
if (this.organizationId == null || this.writeableCollections.length === 0) {
|
||||
this.collections = [];
|
||||
} else {
|
||||
this.collections = this.writeableCollections.filter((c) => c.organizationId === this.organizationId);
|
||||
this.collections = this.writeableCollections.filter(c => c.organizationId === this.organizationId);
|
||||
}
|
||||
}
|
||||
|
||||
async submit() {
|
||||
const checkedCollectionIds = this.collections.filter((c) => (c as any).checked).map((c) => c.id);
|
||||
const checkedCollectionIds = this.collections.filter(c => (c as any).checked).map(c => c.id);
|
||||
try {
|
||||
this.formPromise = this.cipherService.shareManyWithServer(this.shareableCiphers, this.organizationId,
|
||||
checkedCollectionIds);
|
||||
@@ -83,7 +83,7 @@ export class BulkShareComponent implements OnInit {
|
||||
|
||||
selectAll(select: boolean) {
|
||||
const collections = select ? this.collections : this.writeableCollections;
|
||||
collections.forEach((c) => this.check(c, select));
|
||||
collections.forEach(c => this.check(c, select));
|
||||
}
|
||||
|
||||
get canSave() {
|
||||
|
||||
@@ -163,11 +163,11 @@ export class CiphersComponent extends BaseCiphersComponent implements OnDestroy
|
||||
if (this.ciphers == null) {
|
||||
return [];
|
||||
}
|
||||
return this.ciphers.filter((c) => !!(c as any).checked);
|
||||
return this.ciphers.filter(c => !!(c as any).checked);
|
||||
}
|
||||
|
||||
getSelectedIds(): string[] {
|
||||
return this.getSelected().map((c) => c.id);
|
||||
return this.getSelected().map(c => c.id);
|
||||
}
|
||||
|
||||
displayTotpCopyButton(cipher: CipherView) {
|
||||
|
||||
@@ -31,6 +31,6 @@ export class CollectionsComponent extends BaseCollectionsComponent implements On
|
||||
}
|
||||
|
||||
selectAll(select: boolean) {
|
||||
this.collections.forEach((c) => this.check(c, select));
|
||||
this.collections.forEach(c => this.check(c, select));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,6 @@ export class ShareComponent extends BaseShareComponent implements OnDestroy {
|
||||
|
||||
selectAll(select: boolean) {
|
||||
const collections = select ? this.collections : this.writeableCollections;
|
||||
collections.forEach((c) => this.check(c, select));
|
||||
collections.forEach(c => this.check(c, select));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.showVerifyEmail = !(await this.tokenService.getEmailVerified());
|
||||
this.showBrowserOutdated = window.navigator.userAgent.indexOf('MSIE') !== -1;
|
||||
|
||||
const queryParamsSub = this.route.queryParams.subscribe(async (params) => {
|
||||
const queryParamsSub = this.route.queryParams.subscribe(async params => {
|
||||
await this.syncService.fullSync(false);
|
||||
|
||||
this.showUpdateKey = !(await this.cryptoService.hasEncKey());
|
||||
@@ -158,7 +158,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
async filterFavorites() {
|
||||
this.ciphersComponent.showAddNew = true;
|
||||
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchFavorites');
|
||||
await this.ciphersComponent.reload((c) => c.favorite);
|
||||
await this.ciphersComponent.reload(c => c.favorite);
|
||||
this.clearFilters();
|
||||
this.favorites = true;
|
||||
this.go();
|
||||
@@ -177,7 +177,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
async filterCipherType(type: CipherType) {
|
||||
this.ciphersComponent.showAddNew = true;
|
||||
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchType');
|
||||
await this.ciphersComponent.reload((c) => c.type === type);
|
||||
await this.ciphersComponent.reload(c => c.type === type);
|
||||
this.clearFilters();
|
||||
this.type = type;
|
||||
this.go();
|
||||
@@ -187,7 +187,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.ciphersComponent.showAddNew = true;
|
||||
folderId = folderId === 'none' ? null : folderId;
|
||||
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchFolder');
|
||||
await this.ciphersComponent.reload((c) => c.folderId === folderId);
|
||||
await this.ciphersComponent.reload(c => c.folderId === folderId);
|
||||
this.clearFilters();
|
||||
this.folderId = folderId == null ? 'none' : folderId;
|
||||
this.go();
|
||||
@@ -196,7 +196,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
async filterCollection(collectionId: string) {
|
||||
this.ciphersComponent.showAddNew = true;
|
||||
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchCollection');
|
||||
await this.ciphersComponent.reload((c) => c.collectionIds != null &&
|
||||
await this.ciphersComponent.reload(c => c.collectionIds != null &&
|
||||
c.collectionIds.indexOf(collectionId) > -1);
|
||||
this.clearFilters();
|
||||
this.collectionId = collectionId;
|
||||
@@ -337,7 +337,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
component.type = this.type;
|
||||
component.folderId = this.folderId === 'none' ? null : this.folderId;
|
||||
if (this.collectionId != null) {
|
||||
const collection = this.groupingsComponent.collections.filter((c) => c.id === this.collectionId);
|
||||
const collection = this.groupingsComponent.collections.filter(c => c.id === this.collectionId);
|
||||
if (collection.length > 0) {
|
||||
component.organizationId = collection[0].organizationId;
|
||||
component.collectionIds = [this.collectionId];
|
||||
|
||||
Reference in New Issue
Block a user