Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ <h1 class="title">{{ post.title }}</h1>
<div class="author-info">
@if (isTeam) {
<p-avatarGroup styleClass="mb-3" >
<p-avatar [image]="post.author.profilePicture" size="large" shape="circle" title="{{ post.author.name}}"></p-avatar>
<p-avatar [image]="post.author.profilePicture" size="large" shape="circle" title="{{ post.author.username}}"></p-avatar>
@for (coAuthor of post.coAuthors; track coAuthor.username) {
<p-avatar [image]="coAuthor.profilePicture" size="large" shape="circle" title="{{ coAuthor.username}}"></p-avatar>
}
</p-avatarGroup>
} @else {
<p-avatar [image]="post.author.profilePicture" size="large" shape="circle" title="{{ post.author.name}}"></p-avatar>
<p-avatar [image]="post.author.profilePicture" size="large" shape="circle" title="{{ post.author.username}}"></p-avatar>
}
<div class="author-text">
<span class="author-name">{{post.author.name}} {{isTeam && post.coAuthors.length > 0 ? 'with ' + post.coAuthors.length + ' co-author' + (post.coAuthors.length > 1 ? 's' : '') : ''}}</span>
Expand Down
4 changes: 4 additions & 0 deletions angular-primeng-app/src/app/graphql.operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ export const GET_SINGLE_POST = gql`
name
}
author {
id
name
username
profilePicture
}
coAuthors {
Expand Down Expand Up @@ -172,7 +174,9 @@ export const SEARCH_POSTS = gql`
url
}
author {
id
name
username
}
publishedAt
title
Expand Down
2 changes: 2 additions & 0 deletions angular-primeng-app/src/app/models/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export interface Tag {
}

export interface Author {
id : string,
name: string;
username : string ,
profilePicture: string;
socialMediaLinks: SocialMediaLinks;
}
Expand Down