From 4ef79558aa4feedde7303675ea76622190190d5f Mon Sep 17 00:00:00 2001 From: emmap3 Date: Tue, 5 Sep 2023 00:43:09 -0300 Subject: [PATCH 1/2] NFT withdraw confirm modal: update description and confirm button label --- src/app/pages/nft/pages/nft/nft.page.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/pages/nft/pages/nft/nft.page.html b/src/app/pages/nft/pages/nft/nft.page.html index 5abf6e5..fe6a96a 100644 --- a/src/app/pages/nft/pages/nft/nft.page.html +++ b/src/app/pages/nft/pages/nft/nft.page.html @@ -800,9 +800,9 @@

i18n-title title="Are you sure you want to withdraw NFT from Soonaverse?" i18n-description - description="Once the NFT is withdrawn it won’t be available within Soonaverse and it will appear only in your wallet. You can always bring the NFT back to Soonaverse later." + description="Once the NFT is withdrawn it won’t be available within Soonaverse and it will appear only in your verified wallet. You can always bring the NFT back to Soonaverse later." i18n-confirmLabel - confirmLabel="Confirm with Metamask" + confirmLabel="Confirm" > Date: Tue, 5 Sep 2023 10:50:56 -0300 Subject: [PATCH 2/2] Allow to expand/collapse text on member cards if they exceed 3 rows --- .../member-card/member-card.component.html | 12 +++++++++--- .../member-card/member-card.component.ts | 18 ++++++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/app/components/member/components/member-card/member-card.component.html b/src/app/components/member/components/member-card/member-card.component.html index e5591cd..f2a8e8f 100644 --- a/src/app/components/member/components/member-card/member-card.component.html +++ b/src/app/components/member/components/member-card/member-card.component.html @@ -52,9 +52,15 @@ {{ (createdOn || member.createdOn)?.toDate() | date : 'short' }} -

{{ about !== undefined ? about : member.about }}

diff --git a/src/app/components/member/components/member-card/member-card.component.ts b/src/app/components/member/components/member-card/member-card.component.ts index 1091557..f3ef346 100644 --- a/src/app/components/member/components/member-card/member-card.component.ts +++ b/src/app/components/member/components/member-card/member-card.component.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/adjacent-overload-signatures */ -import { ChangeDetectionStrategy, Component, Input, OnDestroy } from '@angular/core'; +import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input, OnDestroy, ViewChild } from '@angular/core'; import { MemberApi } from '@api/member.api'; import { DeviceService } from '@core/services/device'; import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'; @@ -14,7 +14,7 @@ import { ROUTER_UTILS } from './../../../../@core/utils/router.utils'; styleUrls: ['./member-card.component.less'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class MemberCardComponent implements OnDestroy { +export class MemberCardComponent implements AfterViewInit, OnDestroy { @Input() member?: Member; @Input() fullWidth?: boolean; @Input() allowMobileContent?: boolean; @@ -28,6 +28,9 @@ export class MemberCardComponent implements OnDestroy { public totalVisibleBadges = 6; public path = ROUTER_UTILS.config.member.root; public isReputationVisible = false; + public isAboutExpanded = false; + public aboutShowPointer = false; + @ViewChild('aboutMember') aboutMemberEleRef?: ElementRef; constructor(private memberApi: MemberApi, public deviceService: DeviceService) { // none. @@ -58,7 +61,18 @@ export class MemberCardComponent implements OnDestroy { return FILE_SIZES; } + public ngAfterViewInit(): void { + this.aboutPointer(); + } + public ngOnDestroy(): void { this.badges$.next(undefined); } + + private aboutPointer(): void { + const offset = (this.aboutMemberEleRef?.nativeElement.clientHeight || 0) / 3; // matching css value -webkit-line-clamp + this.aboutShowPointer = + (this.aboutMemberEleRef?.nativeElement.scrollHeight || 0) - offset > + (this.aboutMemberEleRef?.nativeElement.clientHeight || 0); + } }