Skip to content
Snippets Groups Projects
Commit de2a9e2b authored by Mohammad Alayoub's avatar Mohammad Alayoub
Browse files

added panel fir adding new bad word to the list

parent 32bcc7ba
Branches
Tags
No related merge requests found
<mat-dialog-content>
<mat-card>
<mat-slide-toggle [(ngModel)]="considerVotes">{{'topic-cloud-dialog.consider-votes' | translate}}</mat-slide-toggle>
<mat-slide-toggle [(ngModel)]="profanityFilter">{{'topic-cloud-dialog.profanity' | translate}}</mat-slide-toggle>
<div>
<mat-slide-toggle [(ngModel)]="considerVotes">
{{'topic-cloud-dialog.consider-votes' | translate}}
</mat-slide-toggle>
<mat-slide-toggle [(ngModel)]="profanityFilter">
{{'topic-cloud-dialog.profanity' | translate}}
</mat-slide-toggle>
</div>
<mat-accordion hideToggle class="new-Badword" multi>
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-description>
add new profanity word
<mat-icon>add</mat-icon>
</mat-panel-description>
</mat-expansion-panel-header>
<mat-form-field>
<mat-label>Enter word</mat-label>
<input [(ngModel)]="newBadWord" matInput>
</mat-form-field>
<button mat-button color="primary" (click)="addBadword()">
<mat-icon>add_circle</mat-icon>
send
</button>
</mat-expansion-panel>
</mat-accordion>
<!--mat-icon _ngcontent-oki-c368="" role="img" class="mat-icon
notranslate header-icons material-icons mat-icon-no-color ng-star-inserted" aria-hidden="true" data-mat-icon-type="font">more_vert </mat-icon-->
<!--mat-select class="select-list" [(ngModel)]="selectedLang" >
......@@ -11,7 +39,12 @@
<span *ngIf="lang.lang == 'spacyfrage'">spacy keyword</span>
</mat-option>
</mat-select-->
<<<<<<< HEAD
<!-- <mat-form-field>
=======
<div>
<mat-form-field>
>>>>>>> added panel fir adding new bad word to the list
<mat-label>key wählen</mat-label>
<mat-select [(ngModel)]="selectedLang">
<mat-option *ngFor="let team of commentLang" [value]="team.lang">
......
......@@ -74,4 +74,19 @@ mat-panel-title, mat-panel-description {
animation-iteration-count: 2;
opacity: 1.0 !important;
}
.new-Badword .mat-expansion-panel-header-title,
.new-Badword .mat-expansion-panel-header-description {
flex-basis: 0;
}
.new-Badword .mat-expansion-panel-header-description,
.new-Badword .button {
justify-content: space-between;
align-items: center;
}
.new-Badword .mat-form-field + .mat-form-field {
margin-left: 8px;
}
\ No newline at end of file
......@@ -7,9 +7,9 @@ import { AuthenticationService } from '../../../../services/http/authentication.
import { UserRole } from '../../../../models/user-roles.enum';
import { TranslateService } from '@ngx-translate/core';
import { LanguageService } from '../../../../services/util/language.service';
import {Comment} from "../../../../models/comment";
import { FormControl } from '@angular/forms';
import { SpacyService } from '../../../../services/http/spacy.service';
import { TopicCloudAdminService } from '../../../../services/util/topic-cloud-admin.service';
@Component({
selector: 'app-topic-cloud-administration',
......@@ -23,6 +23,8 @@ export class TopicCloudAdministrationComponent implements OnInit {
newKeyword = undefined;
edit = false;
isCreatorOrMod: boolean;
enterBadword: boolean = false;
newBadWord: string = undefined;
sortMode = 'alphabetic';
editedKeyword = false;
......@@ -94,7 +96,8 @@ export class TopicCloudAdministrationComponent implements OnInit {
private authenticationService: AuthenticationService,
private translateService: TranslateService,
private spacyService: SpacyService,
private langService: LanguageService) {
private langService: LanguageService,
private topicCloudAdminService: TopicCloudAdminService) {
this.langService.langEmitter.subscribe(lang => {
this.translateService.use(lang);
......@@ -248,7 +251,18 @@ export class TopicCloudAdministrationComponent implements OnInit {
});
}
}
}//console.log('hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh');
}
}
commentLang = [
{ lang: 'tagkeyword' },
{ lang: 'spacykeyword' },
];
selectedLang = localStorage.getItem('currentLang');
comment: Comment;
addBadword(){
this.topicCloudAdminService.addToBadwordList(this.newBadWord);
}
}
......
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