From ff98bdcce4c64f2dfc73e59fe6595fef864d6f47 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Mon, 3 Aug 2020 22:12:31 -0400 Subject: [PATCH] moved some logic back to web project for cipher selection --- src/angular/components/ciphers.component.ts | 29 --------------------- 1 file changed, 29 deletions(-) diff --git a/src/angular/components/ciphers.component.ts b/src/angular/components/ciphers.component.ts index 674f9b3efe..50beab2f54 100644 --- a/src/angular/components/ciphers.component.ts +++ b/src/angular/components/ciphers.component.ts @@ -31,8 +31,6 @@ export class CiphersComponent { private pagedCiphersCount = 0; private refreshing = false; - private maxCheckedCount = 500; - constructor(protected searchService: SearchService) { } async load(filter: (cipher: CipherView) => boolean = null, deleted: boolean = false) { @@ -128,31 +126,4 @@ export class CiphersComponent { this.pagedCiphers = []; this.loadMore(); } - - selectAll(select: boolean) { - if (select) { - this.selectAll(false); - } - const selectCount = select && this.ciphers.length > this.maxCheckedCount - ? this.maxCheckedCount - : this.ciphers.length; - for (let i = 0; i < selectCount; i++) { - this.checkCipher(this.ciphers[i], select); - } - } - - checkCipher(c: CipherView, select?: boolean) { - (c as any).checked = select == null ? !(c as any).checked : select; - } - - getSelected(): CipherView[] { - if (this.ciphers == null) { - return []; - } - return this.ciphers.filter((c) => !!(c as any).checked); - } - - getSelectedIds(): string[] { - return this.getSelected().map((c) => c.id); - } }