From c0511a7e8b4c15e0ee05b12aa86e2f2354916fd2 Mon Sep 17 00:00:00 2001 From: lakhoune Date: Fri, 6 Oct 2023 11:23:51 +0200 Subject: [PATCH] adds button to quickly copy the community id to clipboad --- .../community-info/community-info.component.html | 11 +++++++++++ .../community-info/community-info.component.ts | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/src/app/components/success-modeling/community-info/community-info.component.html b/src/app/components/success-modeling/community-info/community-info.component.html index 9476fd0e..64632782 100644 --- a/src/app/components/success-modeling/community-info/community-info.component.html +++ b/src/app/components/success-modeling/community-info/community-info.component.html @@ -3,6 +3,17 @@ *ngIf="members$ | async as members; else loading" >

{{ communityName$ | async }} Community Members

+
+ +
+ account_circle diff --git a/src/app/components/success-modeling/community-info/community-info.component.ts b/src/app/components/success-modeling/community-info/community-info.component.ts index 479f4df4..61d93e79 100644 --- a/src/app/components/success-modeling/community-info/community-info.component.ts +++ b/src/app/components/success-modeling/community-info/community-info.component.ts @@ -81,6 +81,15 @@ export class CommunityInfoComponent implements OnInit, OnDestroy { this.user = undefined; } } + async copyToIdClipboard() { + const groupdId = await firstValueFrom( + this.ngrxStore.select(SELECTED_GROUP).pipe( + take(1), + map((group) => group.id), + ), + ); + navigator.clipboard.writeText(groupdId); + } async addUserToGroup() { if (!this.user) return;