mirror of
https://github.com/bitwarden/browser
synced 2025-12-31 23:53:37 +00:00
* Move CollectionDialog to Vault * Fix CollectionDialogModule imports * Move CollectionAdminService and View to Vault * Move CollectionService to Vault * Split GroupService into internal and public facing classes * Move collection models to vault * lint spacing fix * Move collection spec file * Fix spec import * Update apps/web/src/app/core/core.module.ts Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> * Remove CoreOrganizationModule from CollectionDialogModule --------- Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
import { Component, OnDestroy } from "@angular/core";
|
|
|
|
import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component";
|
|
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
|
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
|
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
|
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
|
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
|
|
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
|
|
|
@Component({
|
|
selector: "app-vault-share",
|
|
templateUrl: "share.component.html",
|
|
})
|
|
export class ShareComponent extends BaseShareComponent implements OnDestroy {
|
|
constructor(
|
|
collectionService: CollectionService,
|
|
platformUtilsService: PlatformUtilsService,
|
|
i18nService: I18nService,
|
|
cipherService: CipherService,
|
|
organizationService: OrganizationService,
|
|
logService: LogService
|
|
) {
|
|
super(
|
|
collectionService,
|
|
platformUtilsService,
|
|
i18nService,
|
|
cipherService,
|
|
logService,
|
|
organizationService
|
|
);
|
|
}
|
|
|
|
ngOnDestroy() {
|
|
this.selectAll(false);
|
|
}
|
|
|
|
check(c: CollectionView, select?: boolean) {
|
|
(c as any).checked = select == null ? !(c as any).checked : select;
|
|
}
|
|
|
|
selectAll(select: boolean) {
|
|
const collections = select ? this.collections : this.writeableCollections;
|
|
collections.forEach((c) => this.check(c, select));
|
|
}
|
|
}
|