From c4dd34fa5e86cb74e5439a97c8a7bf3b9008bec8 Mon Sep 17 00:00:00 2001 From: sultanmyrza Date: Mon, 4 Apr 2022 21:20:43 +0800 Subject: [PATCH] feat: add icon to indicate capture with caption --- .../capture-item/capture-item.component.html | 31 ++++++++++++------- .../capture-item/capture-item.component.scss | 28 ++++++++++++----- .../capture-item/capture-item.component.ts | 9 +++++- 3 files changed, 49 insertions(+), 19 deletions(-) diff --git a/src/app/features/home/capture-tab/capture-item/capture-item.component.html b/src/app/features/home/capture-tab/capture-item/capture-item.component.html index adb4c2ea0..9bdf21344 100644 --- a/src/app/features/home/capture-tab/capture-item/capture-item.component.html +++ b/src/app/features/home/capture-tab/capture-item/capture-item.component.html @@ -6,17 +6,26 @@ name="hourglass-outline" class="collecting" > - - - + +
+ + + + +
+ this.diaBackendAssetRepository.fetchByProof$(proof)), + map(asset => asset.caption !== '') + ); + readonly isVideo$ = this.proof$.pipe( concatMap(proof => proof.getFirstAssetMeta()), map(meta => meta.mimeType.startsWith('video')) @@ -81,7 +87,8 @@ export class CaptureItemComponent { private readonly captureService: CaptureService, private readonly router: Router, private readonly route: ActivatedRoute, - private readonly sanitizer: DomSanitizer + private readonly sanitizer: DomSanitizer, + private readonly diaBackendAssetRepository: DiaBackendAssetRepository ) {} @HostListener('click')