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:
parent
f2142e318e
commit
51a2ec393c
@ -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,
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user