1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[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
This commit is contained in:
cd-bitwarden
2023-08-28 11:03:01 -04:00
committed by GitHub
parent 76888d6fd7
commit c6972f3e1c
3 changed files with 13 additions and 8 deletions

View File

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

View File

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

View File

@@ -2,10 +2,13 @@ import { Component, OnInit } from "@angular/core";
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import { combineLatestWith, Observable, startWith, switchMap } from "rxjs"; 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 { DialogService } from "@bitwarden/components";
import { SecretListView } from "../models/view/secret-list.view"; import { SecretListView } from "../models/view/secret-list.view";
import { SecretService } from "../secrets/secret.service"; import { SecretService } from "../secrets/secret.service";
import { SecretsListComponent } from "../shared/secrets-list.component";
import { import {
SecretHardDeleteDialogComponent, SecretHardDeleteDialogComponent,
@@ -28,6 +31,8 @@ export class TrashComponent implements OnInit {
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
private secretService: SecretService, private secretService: SecretService,
private platformUtilsService: PlatformUtilsService,
private i18nService: I18nService,
private dialogService: DialogService private dialogService: DialogService
) {} ) {}
@@ -65,4 +70,8 @@ export class TrashComponent implements OnInit {
}, },
}); });
} }
copySecretUuid(id: string) {
SecretsListComponent.copySecretUuid(id, this.platformUtilsService, this.i18nService);
}
} }