1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

[PM-11693] Restoring/permanently deleting item from View item page takes you to Vault page (#10995)

* route to trash after restore or delete

* route to trash after restore or delete
This commit is contained in:
SmithThe4th 2024-09-16 14:08:01 -04:00 committed by GitHub
parent f2142e318e
commit 51a2ec393c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -152,7 +152,8 @@ export class ViewV2Component {
return false;
}
await this.router.navigate(["/vault"]);
const successRoute = this.cipher.isDeleted ? "/trash" : "/vault";
await this.router.navigate([successRoute]);
this.toastService.showToast({
variant: "success",
title: null,
@ -169,7 +170,7 @@ export class ViewV2Component {
this.logService.error(e);
}
await this.router.navigate(["/vault"]);
await this.router.navigate(["/trash"]);
this.toastService.showToast({
variant: "success",
title: null,

View File

@ -58,7 +58,7 @@ export class TrashListItemsContainerComponent {
try {
await this.cipherService.restoreWithServer(cipher.id);
await this.router.navigate(["/vault"]);
await this.router.navigate(["/trash"]);
this.toastService.showToast({
variant: "success",
title: null,
@ -89,7 +89,7 @@ export class TrashListItemsContainerComponent {
try {
await this.cipherService.deleteWithServer(cipher.id);
await this.router.navigate(["/vault"]);
await this.router.navigate(["/trash"]);
this.toastService.showToast({
variant: "success",
title: null,