styling changes

*annotations
This commit is contained in:
Sofia Papacharalampous 2024-03-26 17:46:13 +02:00
parent fe323d9b6a
commit 8206602387
2 changed files with 100 additions and 80 deletions

View File

@ -48,67 +48,41 @@
</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 mb-3 pt-2 gr-color" *ngIf="threads?.size > 0">{{'ANNOTATION-DIALOG.TITLE' | translate}}</div>
<div class="col-12"> <div class="col-12">
<div *ngFor="let thread of threads" class="row"> <ng-container *ngFor="let thread of threads">
<!-- Parent Thread --> <div class="row" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.Private" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.PRIVATE' | translate}}">
<div class="col-12"> <div class="col-auto ml-auto">
<div class="row parent-thread m-0 h-100"> <i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}
<div class="col-auto pr-0 pl-0">
<div class="side-color"></div>
</div>
<div class="col">
<div class="row reply-content">
<div class="col-12">
<div class="row h-100">
<div class="col-auto">
<img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture">
</div>
<div class="col">
<div class="row">
<em class="col-auto user">{{'ANNOTATION-DIALOG.THREADS.FROM-USER' | translate}} {{getParentAnnotation(thread).author.name}}</em>
<div class="col annotation-time">{{getParentAnnotation(thread).timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div>
</div>
<div class="row">
<div class="col-12 annotation-full-text">{{getParentAnnotation(thread).payload}}</div>
</div>
<div class="row">
<div class="col-auto" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.Private" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.PRIVATE' | translate}}"><i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}</div>
<div class="col-auto" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.EntityAccessors" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.ENTITY-ACCESSORS' | translate}}"><i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="row ml-auto" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.EntityAccessors" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.ENTITY-ACCESSORS' | translate}}">
<!-- Previous Replies --> <div class="col-auto ml-auto">
<div class="col-12"> <i class="material-icons protection-icon icon-{{getAnnotationProtectionType(thread)}}"></i>{{getAnnotationProtectionType(thread)}}
<div *ngFor="let annotation of annotationsPerThread[thread]; let i = index;" class="row replies"> </div>
<div class="col-auto pr-0"> </div>
<div class="col reply child"></div> <div class="row thread mb-2">
<div class="col reply child dummy-for-next-child" *ngIf="i != annotationsPerThread[thread].length - 1"></div> <!-- Parent Thread -->
</div> <div class="col-12">
<div class="col pl-0 pt-1"> <div class="row parent-thread m-0 h-100">
<div class="parent row m-0"> <div class="col-auto pr-0 pl-0">
<div class="col-auto pl-0 pr-0"> <div class="side-color"></div>
<div class="side-soft-color"></div> </div>
</div> <div class="col">
<div class="col reply-content"> <div class="row reply-content">
<div class="row h-100"> <div class="col-12">
<div class="col-auto"> <div class="row h-100">
<img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture"> <div class="col-auto">
</div> <img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture">
<div class="col"> </div>
<div class="row"> <div class="col">
<div class="col-auto"> <div class="row">
<em class="gr-color">{{'ANNOTATION-DIALOG.THREADS.FROM-USER' | translate}}</em> <span class="col user">{{getParentAnnotation(thread).author.name}}</span>
{{annotation.author.name}} <div class="col-auto annotation-time">{{getParentAnnotation(thread).timeStamp | date: "d MMMM, y 'at' h:mm a"}}</div>
<!-- <em class="col user">{{'ANNOTATION-DIALOG.THREADS.FROM-USER' | translate}} {{getParentAnnotation(thread).author.name}}</em> -->
<!-- <div class="col annotation-time">{{getParentAnnotation(thread).timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div> -->
</div>
<div class="row pt-1 pb-1">
<div class="col-12 annotation-full-text">{{getParentAnnotation(thread).payload}}</div>
</div> </div>
<div class="col annotation-time">{{annotation.timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div>
</div>
<div class="row">
<div class="col-md-12 annotation-full-text">{{annotation.payload}}</div>
</div> </div>
</div> </div>
</div> </div>
@ -116,33 +90,69 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<!-- Type reply in thread --> <!-- Previous Replies -->
<!-- <div *ngIf="this.canEdit && !this.isDeleted" class="col-12"> --> <div class="col-12">
<div class="col-12 mt-2"> <div *ngFor="let annotation of annotationsPerThread[thread]; let i = index;" class="row replies">
<div class="row new-reply mr-0"> <div class="col-auto pr-0">
<div class="col reply child"></div>
<div class="col reply child dummy-for-next-child" *ngIf="i != annotationsPerThread[thread].length - 1"></div>
</div>
<div class="col pl-0 pt-1">
<div class="parent row m-0">
<div class="col-auto pl-0 pr-0">
<div class="side-soft-color"></div>
</div>
<div class="col reply-content">
<div class="row h-100">
<div class="col-auto">
<img class="profile-picture" src="/assets/images/user-profile-2.png" alt="profile-picture">
</div>
<div class="col">
<div class="row">
<div class="col">
<span class="user">{{annotation.author.name}}</span>
</div>
<div class="col-auto annotation-time">{{annotation.timeStamp | date:"d MMMM, y 'at' h:mm a"}}</div>
<!-- <div class="col annotation-time">{{annotation.timeStamp | date:'EEEE, MMMM d, y, h:mm a'}}</div> -->
</div>
<div class="row pt-1 pb-1">
<div class="col-md-12 annotation-full-text">{{annotation.payload}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<mat-form-field appearance="outline" class="col"> <!-- Type reply in thread -->
<mat-label>{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}</mat-label> <!-- <div *ngIf="this.canEdit && !this.isDeleted" class="col-12"> -->
<input matInput [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" required> <div class="col-12 mt-2">
<mat-icon matSuffix class="material-symbols-outlined"> <div class="row new-reply mr-0">
add_reaction
</mat-icon> <mat-form-field appearance="outline" class="col">
</mat-form-field> <mat-label>{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}</mat-label>
<!-- <input matInput [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" required>
<mat-form-field class="col pt-2 pb-2 pr-0"> <mat-icon matSuffix class="material-symbols-outlined">
<textarea matInput matTextareaAutosize matAutosizeMinRows="1" [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" placeholder="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}"></textarea> add_reaction
<mat-error *ngIf="this.threadReplyTextsFG[thread.toString()]?.get('replyText')?.hasError('required')">{{'COMMONS.VALIDATION.REQUIRED' | translate}}</mat-error> </mat-icon>
</mat-form-field> --> </mat-form-field>
<div class="col-auto send-msg"> <!--
<button class="form-field-margin" mat-icon-button type="button" color="black" (click)="replyThread(thread)" matTooltip="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}"> <mat-form-field class="col pt-2 pb-2 pr-0">
<i class="fa fa-paper-plane"></i> <textarea matInput matTextareaAutosize matAutosizeMinRows="1" [formControl]="this.threadReplyTextsFG[thread.toString()].get('replyText')" placeholder="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}"></textarea>
</button> <mat-error *ngIf="this.threadReplyTextsFG[thread.toString()]?.get('replyText')?.hasError('required')">{{'COMMONS.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> -->
<div class="col-auto send-msg">
<button class="form-field-margin" mat-icon-button type="button" color="black" (click)="replyThread(thread)" matTooltip="{{'ANNOTATION-DIALOG.THREADS.REPLY' | translate}}">
<i class="fa fa-paper-plane"></i>
</button>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </ng-container>
</div> </div>
</div> </div>
</div> </div>

View File

@ -75,3 +75,13 @@ $mat-card-header-size: 40px !default;
border-radius: 50%; border-radius: 50%;
flex-shrink: 0; flex-shrink: 0;
} }
.thread {
padding: 1em 0 0 0;
background-color: #F5F5F5;
margin: 1em 0 0 0;
}
.user {
font-weight: bold;
}