styling fixes

This commit is contained in:
Sofia Papacharalampous 2024-07-08 10:52:12 +03:00
parent a3c7fc13a8
commit 76d3b86174
6 changed files with 43 additions and 39 deletions

View File

@ -37,11 +37,11 @@ export class EnumUtils {
public getEnumValues<T>(T): Array<T> {
//getting all numeric values
const numericValues: T[] = Object.keys(T).map(key => T[key]).filter(value => typeof (value) === 'number');
const numericValues: any = Object.keys(T).map(key => T[key]).filter(value => typeof (value) === 'number');
if (numericValues.length > 0) { return numericValues; }
//getting all string values
const stringValues: T[] = Object.keys(T).map(key => T[key]).filter(value => typeof (value) === 'string');
const stringValues: any = Object.keys(T).map(key => T[key]).filter(value => typeof (value) === 'string');
if (stringValues.length > 0) { return stringValues; }
return [];

View File

@ -1,25 +1,33 @@
<div class="mt-3 pl-3 pr-3 pb-2 pt-1">
<div class="row d-flex justify-content-between align-items-center">
<div class="col-auto pr-0">
<button mat-icon-button class="col-auto" type="button" matTooltip="{{ 'DESCRIPTION-EDITOR.QUESTION.EXTENDED-DESCRIPTION.COPY-LINK' | translate }}" (click)="copyLink()">
<!-- <div class="mt-3 pl-3 pr-3 pb-2 pt-1"> -->
<div style="padding: 0 1.5rem;">
<div class="row mt-1 justify-content-between align-items-center">
<div class="col-auto">
<h3 class="mt-2" style="font-size: 18px; font-weight: 400;">{{'ANNOTATION-DIALOG.TITLE' | translate}}</h3>
</div>
<div *ngIf="threads?.size > 0" class="col-auto pl-0">
<button class="comments-count" mat-min-fab extended disabled>
<span>{{ annotationsCount }}ew43344</span>
</button>
</div>
<div class="col-auto pr-0 ml-auto dense-4">
<button mat-icon-button matTooltip="{{ 'DESCRIPTION-EDITOR.QUESTION.EXTENDED-DESCRIPTION.COPY-LINK' | translate }}" (click)="copyLink()">
<mat-icon>link</mat-icon>
</button>
</div>
<div class="col-auto">
<h4 class="mt-2">{{'ANNOTATION-DIALOG.TITLE' | translate}}</h4>
</div>
<div class="col-auto ml-auto" (click)="close()">
<mat-icon class="close-icon">close</mat-icon>
<div class="col-auto pl-0 dense-4" (click)="close()">
<button mat-icon-button>
<mat-icon>close</mat-icon>
</button>
</div>
</div>
</div>
<mat-dialog-content>
<mat-dialog-content class="pt-1">
<div class="row">
<!-- Create New Thread -->
<div class="col-12">
<form [formGroup]="threadFormGroup">
<div class="row mt-2 mb-3">
<div class="col-12 mb-2">
<div class="col-12">
<mat-form-field appearance="outline" class="w-100">
<mat-label>{{'ANNOTATION-DIALOG.THREADS.NEW-THREAD' | translate}}</mat-label>
<textarea matInput name="text" rows="2" formControlName="text" required></textarea>
@ -46,27 +54,19 @@
</div>
</form>
</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">
<ng-container *ngFor="let thread of threads">
<div class="row" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.Private">
<div class="col-auto ml-auto">
<div class="col-auto">
<div class="d-flex align-items-center" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.PRIVATE' | translate}}">
<mat-icon>visibility_off</mat-icon>
<mat-icon class="material-icons-outlined">visibility_off</mat-icon>
<div class="ml-1 mt-1">
{{getAnnotationProtectionType(thread)}}
</div>
</div>
</div>
</div>
<div class="row ml-auto" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.EntityAccessors">
<!-- <div class="row" *ngIf="getParentAnnotation(thread).protectionType === annotationProtectionTypeEnum.EntityAccessors">
<div class="col-auto ml-auto">
<div class="d-flex aling-items center" matTooltip="{{'ANNOTATION-DIALOG.PROTECTION.ENTITY-ACCESSORS' | translate}}">
<mat-icon>public</mat-icon>
@ -75,8 +75,8 @@
</span>
</div>
</div>
</div>
<div class="row mt-2 mb-2">
</div> -->
<div class="row mt-2 mb-3">
<!-- Parent Thread -->
<div class="col-12">
<div class="container">

View File

@ -64,15 +64,10 @@ $mat-card-header-size: 40px !default;
}
.comments-count {
border-radius: 50%;
background-color: #129D99;
color: #FFFFFF;
margin-left: 0.5em;
display: inline-block;
width: 40px;
height: 40px;
padding: 12px;
text-align: center;
background-color: var(--primary-color) !important;// #129D99;
color: #FFFFFF !important;
min-width: 2rem;
border-radius: 15px;
}
.account-icon-wrapper {
@ -86,7 +81,8 @@ $mat-card-header-size: 40px !default;
}
.comment-wrapper {
background-color: #F5F5F5;
border-radius: 4px;
border: .1rem solid #cecece54;
}
.user {
@ -112,3 +108,4 @@ $mat-card-header-size: 40px !default;
.selected {
background-color: #18488f3d;
}

View File

@ -17,7 +17,7 @@
<div class="row align-items-center">
<div class="col-auto"><span class="dmp-logo">{{ 'PLAN-OVERVIEW.TITLE' | translate }}</span></div>
<div class="col-auto pr-0 d-flex"><span class="dmp-label">{{ dmp.label }}</span></div>
<div class="col-auto pr-0"><span style="font-weight: 700;">.</span></div>
<div class="col-auto pr-0 d-flex"><span class="mb-1" style="font-weight: 700;">.</span></div>
<div class="col-auto d-flex"><button mat-button [matMenuTriggerFor]="versions" style="border-radius: 100px; background-color: #eaeaea;">
<div class="pl-2 pr-1 d-flex align-items-center">{{'PLAN-OVERVIEW.VERSION' | translate}} {{selectedDmpVersion?.version}} <mat-icon class="ml-1">arrow_drop_down</mat-icon></div>
</button></div>

View File

@ -1840,7 +1840,7 @@
},
"TYPES": {
"ANNOTATION-PROTECTION-TYPE": {
"PRIVATE": "Hidden",
"PRIVATE": "Private",
"ENTITY-ACCESSORS": "Visible"
},
"APP-ROLE": {

View File

@ -397,3 +397,10 @@ $mat-dark-theme: mat.m2-define-dark-theme((color: (primary: $mat-dark-theme-prim
@include mat.all-component-densities(-3);
}
.dense-4 {
@include mat.all-component-densities(-4);
}
.dense-10 {
@include mat.all-component-densities(-10);
}