From c6972f3e1c0fdf4a3fe1e7e52e6071ad37db7e10 Mon Sep 17 00:00:00 2001 From: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Date: Mon, 28 Aug 2023 11:03:01 -0400 Subject: [PATCH] [SM-877] Updating trash to have ability to copy UUID (#5986) * [SM-877] Updating trash to have ability to copy UUID * Fixing the ordering of Div's for trash secret UUID copying * moving ngif to div * merge fixs --- .../shared/secrets-list.component.html | 11 +++-------- .../app/secrets-manager/trash/trash.component.html | 1 + .../src/app/secrets-manager/trash/trash.component.ts | 9 +++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html index e065141e82..a6660b3d3a 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html @@ -65,16 +65,12 @@
-
-
+
{{ secret.name }}
{{ secret.id }}
-
{{ secret.name }}
diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.html b/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.html index e4990f0111..03dc17b98d 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.html +++ b/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.html @@ -9,4 +9,5 @@ (restoreSecretsEvent)="openRestoreSecret($event)" [secrets]="secrets$ | async" [trash]="true" + (copySecretUuidEvent)="copySecretUuid($event)" > diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.ts index 83f510ed56..e92a01ed27 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.ts @@ -2,10 +2,13 @@ import { Component, OnInit } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; import { combineLatestWith, Observable, startWith, switchMap } from "rxjs"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; +import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { DialogService } from "@bitwarden/components"; import { SecretListView } from "../models/view/secret-list.view"; import { SecretService } from "../secrets/secret.service"; +import { SecretsListComponent } from "../shared/secrets-list.component"; import { SecretHardDeleteDialogComponent, @@ -28,6 +31,8 @@ export class TrashComponent implements OnInit { constructor( private route: ActivatedRoute, private secretService: SecretService, + private platformUtilsService: PlatformUtilsService, + private i18nService: I18nService, private dialogService: DialogService ) {} @@ -65,4 +70,8 @@ export class TrashComponent implements OnInit { }, }); } + + copySecretUuid(id: string) { + SecretsListComponent.copySecretUuid(id, this.platformUtilsService, this.i18nService); + } }