diff --git a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss index 75db57c50ef05c56ed71c4ff5a3b28165184c7aa..ad76e0495520f53011b6c5e723a1afdae8804824 100644 --- a/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss +++ b/src/app/components/shared/_dialogs/cloud-configuration/cloud-configuration.component.scss @@ -1,13 +1,8 @@ -// * { -// color: var(--on-dialog); -// } - h2{ color: var(--on-dialog); font-size: 1.7rem; } - .expansion-title{ color: var(--primary); padding-bottom: 6px; 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 66c91b3f7f040f57e66e7914d77164054e44461a..09f756425cc41ece379423affb91493d8de00cec 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 @@ -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 { diff --git a/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.html b/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.html index 08b3bc3013287e77f429ab46f042b13c2203e701..284ed824d7f5c473f1b6461a0c633d9f22a66128 100644 --- a/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.html +++ b/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.html @@ -6,6 +6,7 @@ id="checkAll" (change)="selectAll(checkall.checked)" #checkall + [checked]="allKeywordsSelected()" matTooltip="{{ 'spacy-dialog.select-all-hint' | translate }}" matTooltipShowDelay="750"> </mat-checkbox> diff --git a/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.ts b/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.ts index b6c385d69cc335e2c51e898c377d13dfc4a308e4..c77fddc5eaf9dcc62dbeeef9872f740eb5a6b057 100644 --- a/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.ts +++ b/src/app/components/shared/_dialogs/spacy-dialog/spacy-dialog.component.ts @@ -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, diff --git a/src/app/components/shared/comment/comment.component.ts b/src/app/components/shared/comment/comment.component.ts index acb0137a08a3993db91ce1d531533a3f536a2d52..768371bf740d8c98d3e7b4ed3fd4f2b7dbf74970 100644 --- a/src/app/components/shared/comment/comment.component.ts +++ b/src/app/components/shared/comment/comment.component.ts @@ -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 { diff --git a/src/app/components/shared/header/header.component.scss b/src/app/components/shared/header/header.component.scss index 6fa5362272a62cb0d86c1e421f6a8e8b8c2e46a4..be81643b313af5a7b224d859a62e5ed864334d49 100644 --- a/src/app/components/shared/header/header.component.scss +++ b/src/app/components/shared/header/header.component.scss @@ -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