diff --git a/src/app/components/home/_dialogs/password-reset/password-reset.component.scss b/src/app/components/home/_dialogs/password-reset/password-reset.component.scss index bf03489f63d032ab645da4467f4e61709f220eb8..2e3cb176694b3187cb3f83859a1c4f4dc97c380e 100644 --- a/src/app/components/home/_dialogs/password-reset/password-reset.component.scss +++ b/src/app/components/home/_dialogs/password-reset/password-reset.component.scss @@ -6,3 +6,7 @@ mat-form-field { color: var(--on-primary); background-color: var(--primary); } + +input { + caret-color: var(--on-surface); +} diff --git a/src/app/components/home/_dialogs/register/register.component.scss b/src/app/components/home/_dialogs/register/register.component.scss index bf03489f63d032ab645da4467f4e61709f220eb8..af3c380ca4d7a379a60eed34ff3e6e8ba3d545e2 100644 --- a/src/app/components/home/_dialogs/register/register.component.scss +++ b/src/app/components/home/_dialogs/register/register.component.scss @@ -6,3 +6,8 @@ mat-form-field { color: var(--on-primary); background-color: var(--primary); } + +input { + caret-color: var(--on-surface); +} + diff --git a/src/app/components/shared/_dialogs/create-comment/create-comment.component.scss b/src/app/components/shared/_dialogs/create-comment/create-comment.component.scss index cdbe9b082898fe6f569c5a84b28991d454b4b3af..2cf0785059e2b6b8c738089ffc7ae5d050e98b1e 100644 --- a/src/app/components/shared/_dialogs/create-comment/create-comment.component.scss +++ b/src/app/components/shared/_dialogs/create-comment/create-comment.component.scss @@ -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; +} + diff --git a/src/app/components/shared/comment-list/comment-list.component.html b/src/app/components/shared/comment-list/comment-list.component.html index fbf294a73ab084bdbe9a29b6d06860fb7c6e162b..5fe3482e1b664b6abaf91854bc00d4ecfd388b26 100644 --- a/src/app/components/shared/comment-list/comment-list.component.html +++ b/src/app/components/shared/comment-list/comment-list.component.html @@ -1,4 +1,4 @@ -<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> diff --git a/src/app/components/shared/comment-list/comment-list.component.scss b/src/app/components/shared/comment-list/comment-list.component.scss index 708a54277aa2198c22edb6cd5f4d2ad9c793bb2e..94ba56841c7d3fbf28045f42c5061c92b6ee57ff 100644 --- a/src/app/components/shared/comment-list/comment-list.component.scss +++ b/src/app/components/shared/comment-list/comment-list.component.scss @@ -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); +} diff --git a/src/app/components/shared/comment-list/comment-list.component.ts b/src/app/components/shared/comment-list/comment-list.component.ts index daa3e2fe4fbb57292bef9a2748a0a0e4f757e044..7c6c9e85ab2192d79d5bb2d11f6fb4b7d24c5f88 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -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 => { diff --git a/src/app/components/shared/header/header.component.html b/src/app/components/shared/header/header.component.html index 90a1a8a815d80472c90c8c2c326b2556a75b121d..c592d71b50fb61e87e60afefa1aeded063238fac 100644 --- a/src/app/components/shared/header/header.component.html +++ b/src/app/components/shared/header/header.component.html @@ -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> diff --git a/src/app/components/shared/login/login.component.scss b/src/app/components/shared/login/login.component.scss index 95deb413a19b62496965f9d7e7b55404916cf075..26996c80c91621a53f93cd835e8678f77bb4d0b9 100644 --- a/src/app/components/shared/login/login.component.scss +++ b/src/app/components/shared/login/login.component.scss @@ -39,3 +39,7 @@ input:-webkit-autofill { mat-form-field { color: var(--on-surface); } + +input { + caret-color: var(--on-surface); +} diff --git a/src/app/components/shared/room-join/room-join.component.scss b/src/app/components/shared/room-join/room-join.component.scss index ca69088767adf1f379737b0b3766373606431612..86bcd85124eba391ce8189f690a74faf8031fdb3 100644 --- a/src/app/components/shared/room-join/room-join.component.scss +++ b/src/app/components/shared/room-join/room-join.component.scss @@ -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; +}