styling changes

*annotations > added annotations count
This commit is contained in:
Sofia Papacharalampous 2024-03-28 17:58:48 +02:00
parent 2673857d74
commit db68644eff
3 changed files with 22 additions and 2 deletions

View File

@ -45,7 +45,14 @@
</div> </div>
</form> </form>
</div> </div>
<div class="col-12 mb-3 pt-2 gr-color" *ngIf="threads?.size > 0">{{'ANNOTATION-DIALOG.TITLE' | translate}}</div> <div class="col-12 pt-2 gr-color" *ngIf="threads?.size > 0">
<div class="row">
<div class="col-auto">
<span>{{'ANNOTATION-DIALOG.TITLE' | translate}}</span>
<span class="comments-count">{{ annotationsCount }}</span>
</div>
</div>
</div>
<div class="col-12"> <div class="col-12">
<ng-container *ngFor="let thread of threads"> <ng-container *ngFor="let thread of threads">
<div class="row" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.Private" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.PRIVATE' | translate}}"> <div class="row" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.Private" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.PRIVATE' | translate}}">

View File

@ -69,6 +69,18 @@ $mat-card-header-size: 40px !default;
color: #f16868; color: #f16868;
} }
.comments-count {
border-radius: 50%;
background-color: #129D99;
color: #FFFFFF;
margin-left: 0.5em;
display: inline-block;
width: 40px;
height: 40px;
padding: 7px;
text-align: center;
}
.profile-picture { .profile-picture {
height: $mat-card-header-size; height: $mat-card-header-size;
width: $mat-card-header-size; width: $mat-card-header-size;

View File

@ -34,6 +34,7 @@ export class AnnotationDialogComponent extends BaseComponent {
public comments = new Array<Annotation>(); public comments = new Array<Annotation>();
public threads = new Set<Guid>(); public threads = new Set<Guid>();
public annotationsCount: number = 0;
public annotationsPerThread = {}; public annotationsPerThread = {};
public showRepliesPerThread = {}; public showRepliesPerThread = {};
public replyEnabledPerThread = {}; public replyEnabledPerThread = {};
@ -143,7 +144,7 @@ export class AnnotationDialogComponent extends BaseComponent {
.pipe(takeUntil(this._destroyed)) .pipe(takeUntil(this._destroyed))
.subscribe( .subscribe(
data => { data => {
console.log(data); this.annotationsCount = data.count;
this.annotationsPerThread = {}; this.annotationsPerThread = {};
this.parentAnnotationsPerThread = {}; this.parentAnnotationsPerThread = {};
this.threads = new Set(); this.threads = new Set();