diff --git a/src/app/components/shared/questionwall/question-wall/question-wall.component.html b/src/app/components/shared/questionwall/question-wall/question-wall.component.html index 3fb4cbe7ac068843e12b287422a4ed980a2c97a8..538c1b893203f0efbc90dc9d36e653e9a6fb4518 100644 --- a/src/app/components/shared/questionwall/question-wall/question-wall.component.html +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.html @@ -13,27 +13,27 @@ <ars-fill></ars-fill> <ars-col ars-btn-wrp [xp]="16" [extra]="true"> <mat-menu #sortMenu> - <button mat-menu-item (click)="sortTime(true)">Newest</button> - <button mat-menu-item (click)="sortTime()">Oldest</button> - <button mat-menu-item (click)="sortScore(true)">Score</button> + <button mat-menu-item (click)="sortTime(true)">{{'question-wall.sort-new' | translate}}</button> + <button mat-menu-item (click)="sortTime()">{{'question-wall.sort-old' | translate}}</button> + <button mat-menu-item (click)="sortScore(true)">{{'question-wall.sort-score' | translate}}</button> </mat-menu> <mat-menu #filterMenu> <button mat-menu-item (click)="filterFavorites()"> <mat-icon>star</mat-icon> - <span>Favorite</span> + <span>{{'question-wall.filter-favorite' | translate}}</span> </button> - <button mat-menu-item (click)="filterFavorites()"> + <button mat-menu-item (click)="filterApproved()"> <mat-icon>check_circle</mat-icon> - <span>approved</span> + <span>{{'question-wall.filter-approved' | translate}}</span> </button> - <button mat-menu-item (click)="filterFavorites()"> + <button mat-menu-item (click)="filterDisapproved()"> <mat-icon>block</mat-icon> - <span>disapproved</span> + <span>{{'question-wall.filter-disapproved' | translate}}</span> </button> </mat-menu> - <button ars-btn [mat-menu-trigger-for]="sortMenu" matRipple><i>sort</i><p>Sort</p></button> + <button ars-btn [mat-menu-trigger-for]="sortMenu" matRipple><i>sort</i><p>{{'question-wall.sort' | translate}}</p></button> <button ars-btn [mat-menu-trigger-for]="filterMenu" matRipple><i>filter_list</i><p>Filter</p></button> - <button ars-btn (click)="openUserMap()" matRipple><i>person</i><p>user</p></button> + <button ars-btn (click)="openUserMap()" matRipple><i>person</i><p>{{'question-wall.filter-user'| translate}}</p></button> </ars-col> </ars-fill> </ars-style-btn-material> @@ -73,7 +73,7 @@ </ars-col> <ars-fill></ars-fill> <ars-col ars-btn-wrp [xp]="48"> - <button ars-btn (click)="deactivateFilter()" matRipple><i>remove_circle</i><p>remove filter</p></button> + <button ars-btn (click)="deactivateFilter()" matRipple><i>remove_circle</i><p>{{'question-wall.filter-remove' | translate}}</p></button> </ars-col> </ars-style-btn-material> </ars-row> diff --git a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts index 39d77a44fa262e8e0185b7a301d62ddc945a5c50..17cb3b3e98594dbf9d0ba1dcdc54cdbee5e7ac43 100644 --- a/src/app/components/shared/questionwall/question-wall/question-wall.component.ts +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts @@ -158,7 +158,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { pushIncommingComment(comment: Comment): QuestionWallComment { const qwComment = new QuestionWallComment(comment, false); - this.comments.push(qwComment); + this.comments = [qwComment, ...this.comments]; this.unreadComments++; return qwComment; } @@ -199,6 +199,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { } openUserMap() { + this.hasFilter = false; this.createUserMap(); this.userSelection = true; } @@ -268,7 +269,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { } filterApproved() { - this.filter('check_circle', 'question-wall.filter-disapproved', '', + this.filter('check_circle', 'question-wall.filter-approved', '', x => x.comment.correct === CorrectWrong.CORRECT); } diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json index 8f6492a3af8f3db6914be0b9d409d296c2e78e13..73389a6c9c79a0d7d294fe9c397104470621f3df 100644 --- a/src/assets/i18n/participant/de.json +++ b/src/assets/i18n/participant/de.json @@ -128,9 +128,15 @@ "auto-renew-off-icon": "cancel", "intro-title": "Fragen-Fokus", "intro-desc": "Klick auf eine Frage oder navigiere mit der Leertaste vorwärts oder mit den Pfeiltasten vor und zurück.", + "sort": "Sortieren", "sort-time": "Zeit", "sort-score": "Bewertung", + "sort-new": "Neuste", + "sort-old": "Älteste", "filter-user": "Benutzer", - "filter-favorite": "Favoriten" + "filter-favorite": "Favoriten", + "filter-approved": "Bejaht", + "filter-disapproved": "Verneint", + "filter-remove": "Filter entfernen" } } diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json index e2ed3ab6ef503862e2ce5c18805c1bc40b5c115b..fcd031005dc290d9b11310c8e463de120d3cca1a 100644 --- a/src/assets/i18n/participant/en.json +++ b/src/assets/i18n/participant/en.json @@ -127,9 +127,15 @@ "auto-renew-off-icon": "cancel", "intro-title": "Question Focus", "intro-desc": "Click on a question or navigate forwards with the space bar or backwards and forwards with the arrow keys.", + "sort": "Sort", "sort-time": "Time", "sort-score": "Score", + "sort-new": "Newest", + "sort-old": "Oldest", "filter-user": "User", - "filter-favorite": "Favorites" + "filter-favorite": "Favorites", + "filter-approved": "Affirmed", + "filter-disapproved": "Negated", + "filter-remove": "Remove Filter" } }