unoffical wafrn mirror wafrn.net
atproto social-network activitypub
at angular21 58 lines 2.5 kB view raw
1@let fragment = this.fragment(); 2@let loggedIn = this.loginService.loggedIn.value; 3<div class="flex gap-3 justify-content-between mb-3"> 4 <div class="flex flex-column gap-2 min-w-0"> 5 <div class="flex gap-2 min-w-0"> 6 <div class="flex gap-2 mr-auto min-w-0"> 7 <app-avatar-small [user]="fragment.user"></app-avatar-small> 8 <a class="flex flex-column min-w-0 user-link" [blogLink]="!disableLink() ? fragment.user : null"> 9 <span class="no-underline user-name"><span [innerHTML]="fragment.user.name"></span> 10 <span class="text-sm post-action">{{ headerText() }}</span></span> 11 <span class="text-sm user-url" [innerText]="fragment.user.url"></span> 12 </a> 13 </div> 14 </div> 15 @if (!simplified()) { 16 <div class="flex align-items-center date-line"> 17 <span class="text-sm" matTooltip="{{ fragment.createdAt | date: 'short' }}"> 18 <a [postLink]="fragment" style="color: var(--mat-sys-outline)">{{ this.timeAgo }}</a> 19 </span> 20 @if (edited) { 21 <span matTooltip="Edited {{ fragment.updatedAt | date: 'short' }}" class="text-xs"> 22 <fa-icon [icon]="editedIcon"></fa-icon> 23 </span> 24 } 25 <span class="text-xs" matTooltip="{{ privacyOptions[fragment.privacy].name }}"> 26 <fa-icon [icon]="privacyOptions[fragment.privacy].icon"></fa-icon> 27 </span> 28 @if (fragment.user.isBot) { 29 <span class="text-xs"> 30 <fa-icon [icon]="botIcon"></fa-icon> 31 </span> 32 } 33 @if ( 34 !postService.notYetAcceptedFollowedUsersIds.includes(fragment.userId) && 35 !postService.followedUserIds.includes(fragment.userId) && 36 loggedIn 37 ) { 38 <button mat-button class="text-sm follow-button" style="text-wrap: nowrap" (click)="followUser(fragment)"> 39 {{ 'post-header.follow' | translate }} 40 </button> 41 } 42 @if (postService.notYetAcceptedFollowedUsersIds.includes(fragment.userId) && loggedIn) { 43 <button mat-button class="text-sm follow-button" (click)="cancelFollowUser(fragment)"> 44 {{ 'post-header.awaitingApproval' | translate }} 45 </button> 46 } 47 </div> 48 } 49 </div> 50 <div class="flex gap-3 h-full align-items-center flex-shrink-0"> 51 @if (!simplified()) { 52 <app-post-actions [post]="fragment"></app-post-actions> 53 } @else { 54 <a [href]="'/fediverse/post/' + fragment.id" [routerLink]="'/fediverse/post/' + fragment.id" mat-button 55 class="subtle-link text-sm quote-view-original">{{ 'post-header.viewPost' | translate }}</a> 56 } 57 </div> 58</div>