mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +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:
parent
f2142e318e
commit
51a2ec393c
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user