Skip to content
Snippets Groups Projects
Commit d1f5c28f authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel
Browse files

Merge branch '288-do-not-display-search-input-if-there-are-no-comments-yet' into 'master'

Improve comment-list view + 2 bug fixes

Closes #288

See merge request arsnova/arsnova-lite!257
parents bde20b84 fb337e72
1 merge request!257Improve comment-list view + 2 bug fixes
Pipeline #27471 passed with stages
in 7 minutes and 26 seconds
Showing with 76 additions and 4 deletions
......@@ -6,3 +6,7 @@ mat-form-field {
color: var(--on-primary);
background-color: var(--primary);
}
input {
caret-color: var(--on-surface);
}
......@@ -6,3 +6,8 @@ mat-form-field {
color: var(--on-primary);
background-color: var(--primary);
}
input {
caret-color: var(--on-surface);
}
......@@ -17,6 +17,7 @@ app-comment-list {
textarea {
line-height: 120%;
color: var(--on-surface);
caret-color: var(--on-surface);
}
.send {
......@@ -31,3 +32,16 @@ mat-hint {
.placeholder {
color: var(--on-surface);
}
::ng-deep .mat-form-field-label {
color: var(--on-surface)!important;
}
::ng-deep .mat-form-field-underline {
background-color: var(--on-surface)!important;
}
::ng-deep .mat-form-field-ripple {
background-color: var(--on-surface)!important;
}
<div fxLayout="row" id="search-container">
<div fxLayout="row" id="search-container" *ngIf="comments.length > 0">
<mat-label fxLayoutAlign="center center">
<mat-icon class="search-icon">search</mat-icon>
</mat-label>
......@@ -72,6 +72,13 @@
</mat-menu>
</div>
<div fxLayout="row" fxLayoutAlign="center" *ngIf="comments.length < 1">
<button mat-fab class="fab-extended" (click)="openCreateDialog()">
{{'comment-list.add-comment' | translate}}
<mat-icon class="add">add</mat-icon>
</button>
</div>
<div *ngIf="!isLoading">
<app-comment *ngFor="let current of hideCommentsList ? filteredComments : comments" [comment]="current" [parseVote]="getVote(current)"></app-comment>
</div>
......
......@@ -65,7 +65,7 @@ input {
}
.no-comments {
margin-top: 30%;
margin-top: 10%;
}
h4 {
......@@ -115,3 +115,22 @@ h4 {
color: var(--on-surface);
opacity: 1;
}
.fab-extended {
width: 50%;
min-width: 270px;
max-width: 300px;
height: 40px;
border-radius: 32px;
margin: 10% 0 10% 0;
font-size: large;
background-color: var(--primary);
color: var(--on-primary);
}
.add {
transform: scale(1.4);
margin-right: 4%;
margin-left: 4%;
color: var(--on-primary);
}
......@@ -32,7 +32,7 @@ export class CommentListComponent implements OnInit {
voteasc = 'voteasc';
votedesc = 'votedesc';
time = 'time';
currentSort = this.votedesc;
currentSort: string;
read = 'read';
unread = 'unread';
favorite = 'favorite';
......@@ -68,6 +68,9 @@ export class CommentListComponent implements OnInit {
this.commentVoteMap.set(v.commentId, v);
}
});
this.currentSort = this.time;
} else {
this.currentSort = this.votedesc;
}
this.commentService.getComments(this.roomId)
.subscribe(comments => {
......
......@@ -5,7 +5,7 @@
<mat-icon class="header-icons" aria-label="Go back">keyboard_arrow_left</mat-icon>
</button>
<span class="fill-remaining-space"></span>
<h3 *ngIf="router.url.includes('comments') && user.role === 1" fxLayoutAlign="center center">
<h3 *ngIf="router.url.includes('comments') && user.role === 1 && deviceType === 'desktop'" fxLayoutAlign="center center">
<mat-icon>access_time</mat-icon>
{{cTime}}
</h3>
......
......@@ -39,3 +39,7 @@ input:-webkit-autofill {
mat-form-field {
color: var(--on-surface);
}
input {
caret-color: var(--on-surface);
}
......@@ -3,6 +3,10 @@ mat-form-field {
color: var(--on-surface);
}
input {
caret-color: var(--on-surface);
}
form {
padding-top: 5%;
}
......@@ -29,3 +33,15 @@ mat-hint {
.placeholder {
color: var(--on-surface);
}
::ng-deep .mat-form-field-label {
color: var(--on-surface)!important;
}
::ng-deep .mat-form-field-underline {
background-color: var(--on-surface)!important;
}
::ng-deep .mat-form-field-ripple {
background-color: var(--on-surface)!important;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment