mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
[PM-11692] [PM-11693] [PM-11694] Fixed defects with browser refresh trash component (#10911)
* Added animation when viewing item in trash * Fixed A11y to announce delete forever * Route to vault page after restore or delete action is performed
This commit is contained in:
parent
40cb4b5353
commit
a48773ae4f
@ -202,6 +202,9 @@ export const routerTransition = trigger("routerTransition", [
|
||||
transition("vault-settings => trash", inSlideLeft),
|
||||
transition("trash => vault-settings", outSlideRight),
|
||||
|
||||
transition("trash => view-cipher", inSlideLeft),
|
||||
transition("view-cipher => trash", outSlideRight),
|
||||
|
||||
// Appearance settings
|
||||
transition("tabs => appearance", inSlideLeft),
|
||||
transition("appearance => tabs", outSlideRight),
|
||||
|
@ -33,7 +33,7 @@
|
||||
type="button"
|
||||
buttonType="danger"
|
||||
bitIconButton="bwi-trash"
|
||||
[appA11yTitle]="'delete' | i18n"
|
||||
[appA11yTitle]="(cipher.isDeleted ? 'deleteForever' : 'delete') | i18n"
|
||||
></button>
|
||||
</popup-footer>
|
||||
</popup-page>
|
||||
|
@ -57,6 +57,8 @@ export class TrashListItemsContainerComponent {
|
||||
async restore(cipher: CipherView) {
|
||||
try {
|
||||
await this.cipherService.restoreWithServer(cipher.id);
|
||||
|
||||
await this.router.navigate(["/vault"]);
|
||||
this.toastService.showToast({
|
||||
variant: "success",
|
||||
title: null,
|
||||
@ -86,10 +88,12 @@ export class TrashListItemsContainerComponent {
|
||||
|
||||
try {
|
||||
await this.cipherService.deleteWithServer(cipher.id);
|
||||
|
||||
await this.router.navigate(["/vault"]);
|
||||
this.toastService.showToast({
|
||||
variant: "success",
|
||||
title: null,
|
||||
message: this.i18nService.t("deletedItem"),
|
||||
message: this.i18nService.t("permanentlyDeletedItem"),
|
||||
});
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user