1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-02 23:11:40 +01:00

Add org name to moved to org success toast (#412)

This commit is contained in:
Matt Gibson 2021-06-18 07:17:42 -05:00 committed by GitHub
parent 1f83c3c1ba
commit f568c87289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,12 +77,14 @@ export class ShareComponent implements OnInit {
const cipherDomain = await this.cipherService.get(this.cipherId); const cipherDomain = await this.cipherService.get(this.cipherId);
const cipherView = await cipherDomain.decrypt(); const cipherView = await cipherDomain.decrypt();
const orgName = this.organizations.find(o => o.id === this.organizationId)?.name ?? this.i18nService.t('organization');
try { try {
this.formPromise = this.cipherService.shareWithServer(cipherView, this.organizationId, this.formPromise = this.cipherService.shareWithServer(cipherView, this.organizationId,
selectedCollectionIds).then(async () => { selectedCollectionIds).then(async () => {
this.onSharedCipher.emit(); this.onSharedCipher.emit();
this.platformUtilsService.showToast('success', null, this.i18nService.t('sharedItem')); this.platformUtilsService.showToast('success', null,
this.i18nService.t('movedItemToOrg', cipherView.name, orgName));
}); });
await this.formPromise; await this.formPromise;
return true; return true;