From ef75dc735e343f407f43a010ba97f8d3fb7fa583 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 11 Jul 2018 15:47:54 -0400 Subject: [PATCH] search cipher id as well --- src/angular/pipes/search-ciphers.pipe.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/angular/pipes/search-ciphers.pipe.ts b/src/angular/pipes/search-ciphers.pipe.ts index 848f8519e7d..ba9c4549285 100644 --- a/src/angular/pipes/search-ciphers.pipe.ts +++ b/src/angular/pipes/search-ciphers.pipe.ts @@ -7,14 +7,16 @@ import { CipherView } from '../../models/view/cipherView'; import { PlatformUtilsService } from '../../abstractions/platformUtils.service'; +import { DeviceType } from '../../enums'; + @Pipe({ name: 'searchCiphers', }) export class SearchCiphersPipe implements PipeTransform { private onlySearchName = false; - constructor(private platformUtilsService: PlatformUtilsService) { - this.onlySearchName = platformUtilsService.isEdge(); + constructor(platformUtilsService: PlatformUtilsService) { + this.onlySearchName = platformUtilsService.getDevice() === DeviceType.EdgeExtension; } transform(ciphers: CipherView[], searchText: string): CipherView[] { @@ -34,6 +36,9 @@ export class SearchCiphersPipe implements PipeTransform { if (this.onlySearchName) { return false; } + if (c.id.substr(0, 8) === searchText) { + return true; + } if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(searchText) > -1) { return true; }