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:
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user