Browse Source

[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
pull/6137/head
cd-bitwarden 2 years ago committed by GitHub
parent
commit
c6972f3e1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html
  2. 1
      bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.html
  3. 9
      bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.ts

11
bitwarden_license/bit-web/src/app/secrets-manager/shared/secrets-list.component.html

@ -65,16 +65,12 @@ @@ -65,16 +65,12 @@
<div class="tw-flex tw-items-center tw-gap-4 tw-break-all">
<i class="bwi bwi-key tw-text-muted" aria-hidden="true"></i>
<div>
<div>
<button
type="button"
bitLink
(click)="editSecretEvent.emit(secret.id)"
*ngIf="!trash"
>
<div *ngIf="!trash">
<button type="button" bitLink (click)="editSecretEvent.emit(secret.id)">
{{ secret.name }}
</button>
</div>
<div *ngIf="trash">{{ secret.name }}</div>
<div class="tw-text-sm tw-text-muted">
{{ secret.id }}
<button
@ -88,7 +84,6 @@ @@ -88,7 +84,6 @@
></button>
</div>
</div>
<div *ngIf="trash">{{ secret.name }}</div>
</div>
</td>
<td bitCell>

1
bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.html

@ -9,4 +9,5 @@ @@ -9,4 +9,5 @@
(restoreSecretsEvent)="openRestoreSecret($event)"
[secrets]="secrets$ | async"
[trash]="true"
(copySecretUuidEvent)="copySecretUuid($event)"
></sm-secrets-list>

9
bitwarden_license/bit-web/src/app/secrets-manager/trash/trash.component.ts

@ -2,10 +2,13 @@ import { Component, OnInit } from "@angular/core"; @@ -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 { @@ -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 { @@ -65,4 +70,8 @@ export class TrashComponent implements OnInit {
},
});
}
copySecretUuid(id: string) {
SecretsListComponent.copySecretUuid(id, this.platformUtilsService, this.i18nService);
}
}

Loading…
Cancel
Save