1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

[PM-2170] Update collections component (#6794)

* PM-2170 Updated Collections to use Component Library

* PM-2170 Removed some extra space

* PM-2170 Fix typo

* PM-2170 Refresh vault when saving

* PM-2170 Fix PR comments

* PM-2170 Refactor to use CollectionsDialogResult to fix lint error

* PM-2170 Refactor subtitle

* PM-4788 Fix dismiss of modal

* PM-2170 Fix PR comments
This commit is contained in:
Carlos Gonçalves
2024-04-16 15:47:12 +01:00
committed by GitHub
parent 0765240886
commit 62ed7e5abc
6 changed files with 165 additions and 95 deletions

View File

@@ -59,7 +59,7 @@ export class CollectionsComponent implements OnInit {
}
}
async submit() {
async submit(): Promise<boolean> {
const selectedCollectionIds = this.collections
.filter((c) => {
if (this.organization.canEditAllCiphers(this.flexibleCollectionsV1Enabled)) {
@@ -75,7 +75,7 @@ export class CollectionsComponent implements OnInit {
this.i18nService.t("errorOccurred"),
this.i18nService.t("selectOneCollection"),
);
return;
return false;
}
this.cipherDomain.collectionIds = selectedCollectionIds;
try {
@@ -83,8 +83,10 @@ export class CollectionsComponent implements OnInit {
await this.formPromise;
this.onSavedCollections.emit();
this.platformUtilsService.showToast("success", null, this.i18nService.t("editedItem"));
return true;
} catch (e) {
this.logService.error(e);
return false;
}
}