1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-11 10:10:25 +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; return false;
} }
await this.router.navigate(["/vault"]); const successRoute = this.cipher.isDeleted ? "/trash" : "/vault";
await this.router.navigate([successRoute]);
this.toastService.showToast({ this.toastService.showToast({
variant: "success", variant: "success",
title: null, title: null,
@ -169,7 +170,7 @@ export class ViewV2Component {
this.logService.error(e); this.logService.error(e);
} }
await this.router.navigate(["/vault"]); await this.router.navigate(["/trash"]);
this.toastService.showToast({ this.toastService.showToast({
variant: "success", variant: "success",
title: null, title: null,

View File

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