1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-11 10:10:25 +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:
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("vault-settings => trash", inSlideLeft),
transition("trash => vault-settings", outSlideRight), transition("trash => vault-settings", outSlideRight),
transition("trash => view-cipher", inSlideLeft),
transition("view-cipher => trash", outSlideRight),
// Appearance settings // Appearance settings
transition("tabs => appearance", inSlideLeft), transition("tabs => appearance", inSlideLeft),
transition("appearance => tabs", outSlideRight), transition("appearance => tabs", outSlideRight),

View File

@ -33,7 +33,7 @@
type="button" type="button"
buttonType="danger" buttonType="danger"
bitIconButton="bwi-trash" bitIconButton="bwi-trash"
[appA11yTitle]="'delete' | i18n" [appA11yTitle]="(cipher.isDeleted ? 'deleteForever' : 'delete') | i18n"
></button> ></button>
</popup-footer> </popup-footer>
</popup-page> </popup-page>

View File

@ -57,6 +57,8 @@ export class TrashListItemsContainerComponent {
async restore(cipher: CipherView) { async restore(cipher: CipherView) {
try { try {
await this.cipherService.restoreWithServer(cipher.id); await this.cipherService.restoreWithServer(cipher.id);
await this.router.navigate(["/vault"]);
this.toastService.showToast({ this.toastService.showToast({
variant: "success", variant: "success",
title: null, title: null,
@ -86,10 +88,12 @@ export class TrashListItemsContainerComponent {
try { try {
await this.cipherService.deleteWithServer(cipher.id); await this.cipherService.deleteWithServer(cipher.id);
await this.router.navigate(["/vault"]);
this.toastService.showToast({ this.toastService.showToast({
variant: "success", variant: "success",
title: null, title: null,
message: this.i18nService.t("deletedItem"), message: this.i18nService.t("permanentlyDeletedItem"),
}); });
} catch (e) { } catch (e) {
this.logService.error(e); this.logService.error(e);