Display images and videos before text

This commit is contained in:
SondreB 2023-01-16 10:58:10 +01:00
parent b59f513223
commit 394e5883d8
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF
2 changed files with 3 additions and 6 deletions

View File

@ -45,13 +45,12 @@
<app-event-header [pubkey]="event.pubkey"><span class="event-date" [matTooltip]="event.created_at.toString()">{{ event.created_at | ago }}</span> <app-directory-icon [pubkey]="event.pubkey"></app-directory-icon></app-event-header> <app-event-header [pubkey]="event.pubkey"><span class="event-date" [matTooltip]="event.created_at.toString()">{{ event.created_at | ago }}</span> <app-directory-icon [pubkey]="event.pubkey"></app-directory-icon></app-event-header>
<app-event-actions [event]="event" [pubkey]="event.pubkey"></app-event-actions> <app-event-actions [event]="event" [pubkey]="event.pubkey"></app-event-actions>
</div> </div>
<app-content class="thread-content" [ngClass]="{ 'no-lines': !optionsService.options.showLines, 'lines': optionsService.options.showLines }" [event]="event"></app-content> <app-content class="thread-content" [ngClass]="{ 'no-lines': !optionsService.options.showLines, 'lines': optionsService.options.showLines }" [event]="event"></app-content>
<app-event-reactions class="thread-reactions" [threadEntry]="thread.getTreeEntry(thread.threadId)"></app-event-reactions> <app-event-reactions class="thread-reactions" [threadEntry]="thread.getTreeEntry(thread.threadId)"></app-event-reactions>
<app-event-buttons [event]="event"></app-event-buttons> <app-event-buttons [event]="event"></app-event-buttons>
<app-event-thread [threadEntry]="thread.getTreeEntry(thread.threadId)"> </app-event-thread>
</div> </div>
<app-event-thread [threadEntry]="thread.getTreeEntry(thread.threadId)"> </app-event-thread>
</div> </div>
<mat-divider></mat-divider> <mat-divider></mat-divider>

View File

@ -1,13 +1,11 @@
<div class="content clickable" *ngIf="event"> <div class="content clickable" *ngIf="event">
{{ content }}<span *ngIf="event.contentCut">... (message was truncated)</span>
<div class="event-images" *ngIf="images && images.length > 0"> <div class="event-images" *ngIf="images && images.length > 0">
<img class="event-image" [src]="image" (click)="expandImage(image)" *ngFor="let image of images" /> <img class="event-image" [src]="image" (click)="expandImage(image)" *ngFor="let image of images" />
</div> </div>
<div class="event-videos" *ngIf="videos && videos.length > 0"> <div class="event-videos" *ngIf="videos && videos.length > 0">
<iframe id="ytplayer" class="event-video" type="text/html" *ngFor="let video of videos" [src]="video" frameborder="0"></iframe> <iframe id="ytplayer" class="event-video" type="text/html" *ngFor="let video of videos" [src]="video" frameborder="0"></iframe>
</div> </div>
{{ content }}<span *ngIf="event.contentCut">... (message was truncated)</span>
<!-- <span class="dimmed">{{ likes(event) }} likes&nbsp;&nbsp;{{ dislikes(event) }} dislikes&nbsp;&nbsp;{{ replies(event) }} replies</span><br /> --> <!-- <span class="dimmed">{{ likes(event) }} likes&nbsp;&nbsp;{{ dislikes(event) }} dislikes&nbsp;&nbsp;{{ replies(event) }} replies</span><br /> -->
<ng-template [ngIf]="displayRepliesTo"> <ng-template [ngIf]="displayRepliesTo">
<div *ngIf="repliesTo(event) as replies" class="reply-to dimmed clickable"> <div *ngIf="repliesTo(event) as replies" class="reply-to dimmed clickable">