1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-23 03:22:50 +02: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:
SmithThe4th 2024-09-06 12:55:26 -04:00 committed by GitHub
parent 40cb4b5353
commit a48773ae4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View File

@ -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),

View File

@ -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>

View File

@ -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);