Skip to content
Snippets Groups Projects
Commit 292c8ea0 authored by Ruben Bimberg's avatar Ruben Bimberg :computer:
Browse files

Merge branch 'staging' into tag-cloud

# Conflicts:
#	src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.ts
parents 2f851253 bcf2a604
Branches
Tags
No related merge requests found
// * {
// color: var(--on-dialog);
// }
h2{
color: var(--on-dialog);
font-size: 1.7rem;
}
.expansion-title{
color: var(--primary);
padding-bottom: 6px;
......
......@@ -135,9 +135,9 @@ mat-hint {
}
.lang-confidence {
animation: shake 0.8s;
animation: shake 0.5s;
color: var(--red);
font-size: 14px;
font-size: 16px;
}
@keyframes shake {
......
......@@ -6,6 +6,7 @@
id="checkAll"
(change)="selectAll(checkall.checked)"
#checkall
[checked]="allKeywordsSelected()"
matTooltip="{{ 'spacy-dialog.select-all-hint' | translate }}"
matTooltipShowDelay="750">
</mat-checkbox>
......
......@@ -26,7 +26,7 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
keywords: Keyword[] = [];
keywordsOriginal: Keyword[] = [];
isLoading = false;
langSupported = true;
langSupported: boolean;
manualKeywords = '';
constructor(
......@@ -40,10 +40,13 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
this.comment = this.data.comment;
this.commentLang = this.data.commentLang;
this.commentBodyChecked = this.data.commentBodyChecked;
this.langSupported = this.commentLang !== 'auto';
}
ngAfterContentInit(): void {
this.evalInput(this.commentLang);
if(this.langSupported) {
this.evalInput(this.commentLang);
}
}
/**
......@@ -117,9 +120,18 @@ export class SpacyDialogComponent implements OnInit, AfterContentInit {
}
}
manualKeywordsToKeywords() {
const tempKeywords = this.manualKeywords.replace(/\s/g, '');
if (tempKeywords.length) {
allKeywordsSelected(): boolean {
for(const kw of this.keywords) {
if(!kw.selected) {
return false;
}
}
return true;
}
manualKeywordsToKeywords(){
const tempKeywords = this.manualKeywords.replace(/\s/g,'');
if(tempKeywords.length) {
this.keywords = tempKeywords.split(',').map((keyword) => (
{
word: keyword,
......
......@@ -18,6 +18,7 @@ import { UserRole } from '../../../models/user-roles.enum';
import { Rescale } from '../../../models/rescale';
import { RowComponent } from '../../../../../projects/ars/src/lib/components/layout/frame/row/row.component';
import { User } from '../../../models/user';
import { Observable } from 'rxjs';
@Component({
selector: 'app-comment',
......@@ -40,7 +41,9 @@ export class CommentComponent implements OnInit, AfterViewInit {
@Input() moderator: boolean;
@Input() userRole: UserRole;
@Input() user: User;
@Input() disabled = false;
@Output() clickedOnTag = new EventEmitter<string>();
@Output() clickedOnKeyword = new EventEmitter<string>();
@Output() clickedUserNumber = new EventEmitter<number>();
isStudent = false;
isCreator = false;
......@@ -57,6 +60,7 @@ export class CommentComponent implements OnInit, AfterViewInit {
@ViewChild('commentExpander', { static: true })commentExpander: RowComponent;
isExpanded = false;
isExpandable = false;
selectedKeyword: string = '';
constructor(protected authenticationService: AuthenticationService,
private route: ActivatedRoute,
......@@ -127,7 +131,10 @@ export class CommentComponent implements OnInit, AfterViewInit {
}
setRead(comment: Comment): void {
this.commentService.toggleRead(comment).subscribe();
// @ts-ignore
this.commentService.toggleRead(comment).subscribe(c => {this.comment = c; this.comment.keywordsFromQuestioner = JSON.parse(c.keywordsFromQuestioner)});
// @ts-ignore
}
markCorrect(comment: Comment, type: CorrectWrong): void {
......@@ -136,11 +143,16 @@ export class CommentComponent implements OnInit, AfterViewInit {
} else {
comment.correct = type;
}
this.commentService.markCorrect(comment).subscribe();
// @ts-ignore
this.commentService.markCorrect(comment).subscribe(c => {this.comment = c; this.comment.keywordsFromQuestioner = JSON.parse(c.keywordsFromQuestioner)});
// @ts-ignore
}
setFavorite(comment: Comment): void {
this.commentService.toggleFavorite(comment).subscribe();
// @ts-ignore
this.commentService.toggleFavorite(comment).subscribe(c => {this.comment = c; this.comment.keywordsFromQuestioner = JSON.parse(c.keywordsFromQuestioner)});
// @ts-ignore
}
voteUp(comment: Comment): void {
......@@ -207,11 +219,15 @@ export class CommentComponent implements OnInit, AfterViewInit {
}
setAck(comment: Comment): void {
this.commentService.toggleAck(comment).subscribe();
//@ts-ignore
this.commentService.toggleAck(comment).subscribe(c => {this.comment = c; this.comment.keywordsFromQuestioner = JSON.parse(c.keywordsFromQuestioner)});
//@ts-ignore
}
setBookmark(comment: Comment): void {
this.commentService.toggleBookmark(comment).subscribe();
//@ts-ignore
this.commentService.toggleBookmark(comment).subscribe(c => {this.comment = c; this.comment.keywordsFromQuestioner = JSON.parse(c.keywordsFromQuestioner)});
//@ts-ignore
}
goToFullScreen(element: Element): void {
......
......@@ -73,7 +73,7 @@ button:focus {
}
svg {
-webkit-filter: invert(100%); /* safari 6.0 - 9.0 */
-webkit-filter: invert(100%);
filter: invert(100%);
}
......@@ -130,3 +130,13 @@ svg {
h1{
color: red;
}
::ng-deep .mat-menu-item:hover .qrcode svg > path {
fill: var(--dialog);
color: var(--dialog);
background-color: var(--on-dialog) !important;
}
::ng-deep #cdk-overlay-0 .mat-menu-content > button:hover mat-icon{
color: var(--dialog);
background-color: var(--on-dialog) !important;
}
\ No newline at end of file
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