1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 18:23:31 +00:00

[PM-14952] - remove Edit button and show restore button when viewing item in trash (#12847)

* add restore function to vault item dialog

* update comment

* revert removing of delete button

* use canDeleteCipher$

* put canRestore in class property

* set showRestore after canDeleteCipher is set
This commit is contained in:
Jordan Aasen
2025-01-17 09:15:21 -08:00
committed by GitHub
parent 457aa07aa9
commit 3b4eb40990
4 changed files with 48 additions and 5 deletions

View File

@@ -36,7 +36,10 @@
</vault-cipher-form>
</div>
<ng-container bitDialogFooter>
<ng-container *ngIf="showCipherView">
<button *ngIf="showRestore" [bitAction]="restore" bitButton buttonType="primary" type="button">
{{ "restore" | i18n }}
</button>
<ng-container *ngIf="showCipherView && !showRestore">
<button
bitButton
[bitAction]="switchToEdit"
@@ -53,7 +56,7 @@
form="cipherForm"
buttonType="primary"
#submitBtn
[hidden]="showCipherView"
[hidden]="showCipherView || showRestore"
>
{{ "save" | i18n }}
</button>
@@ -62,7 +65,7 @@
type="button"
buttonType="secondary"
(click)="cancel()"
*ngIf="!showCipherView"
*ngIf="!showCipherView && !showRestore"
>
{{ "cancel" | i18n }}
</button>