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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user