From ce0b03485893138371f68bfd4d9b4fb31476e3b7 Mon Sep 17 00:00:00 2001 From: SondreB Date: Tue, 17 Dec 2024 19:23:07 +0100 Subject: [PATCH] Add tabs to profile --- .../components/profile/profile.component.html | 656 +++++++++--------- .../components/profile/profile.component.ts | 7 + 2 files changed, 351 insertions(+), 312 deletions(-) diff --git a/src/app/components/profile/profile.component.html b/src/app/components/profile/profile.component.html index af0eadc4..40839d4c 100644 --- a/src/app/components/profile/profile.component.html +++ b/src/app/components/profile/profile.component.html @@ -201,6 +201,30 @@ + +
+ +
+
@@ -218,8 +242,8 @@ --> - -
+ +
+
- - -
-
Create Post
- - - Preview - -
-
- - - -
-
+
+ + -
- -
+
+
+ - + + +
+
+
+ +
+ +
+ + + + + + + + + + + + +
+ +
+ - - - + + +
- - - - - - - +
+
- -
- + @for (item of posts; track $index) { + + } - - -
- {{
-                            profileUser?.display_name || profileUser?.name || ''
-                        }} -
- {{ - profileUser?.display_name || profileUser?.name || '' - }} - 1 minutes ago +
-
- -
- - - - - -
- Embedded Image -
-
- - - -
- -
-
- - - -
- -
-
- - - - - - - - -
- - {{ token.trim() }} - -
-
-
- -
- - - - -
- -
-
-
-
0 Zap
-
- -
- - -
-
-
- - @for (item of posts; track $index) { - - } + } + + - @if (hasMorePosts) { -
- -
- } +
+
diff --git a/src/app/components/profile/profile.component.ts b/src/app/components/profile/profile.component.ts index 9bc6f078..f00e1e68 100644 --- a/src/app/components/profile/profile.component.ts +++ b/src/app/components/profile/profile.component.ts @@ -202,6 +202,8 @@ export class ProfileComponent implements OnInit, OnDestroy { projectIdentifier: string = ''; + activeTab: 'about' | 'updates' | 'comments' = 'about'; + constructor( private _changeDetectorRef: ChangeDetectorRef, private _signerService: SignerService, @@ -616,4 +618,9 @@ export class ProfileComponent implements OnInit, OnDestroy { async isProjectBookmarked(projectNpub: string): Promise { return await this._bookmarkService.isBookmarked(projectNpub); } + + switchTab(tab: 'about' | 'updates' | 'comments'): void { + this.activeTab = tab; + this._changeDetectorRef.markForCheck(); + } }