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

added animation to sort icon and removed some unused variables

parent bf20a7fc
Branches
Tags
No related merge requests found
......@@ -81,24 +81,24 @@
</mat-form-field>
</div>
<div fxLayoutAlign="center center" style="margin-left: 52%;" >
<p [ngClass]="{'resCount': searchMode}">{{searchMode ? filteredKeywords.length : keywords.length}}</p>
<div fxLayoutAlign="center center" style="margin-left: 52%; font-weight: bold;" >
<p [ngClass]="{'animation-blink': searchMode}">{{searchMode ? filteredKeywords.length : keywords.length}}</p>
</div>
<div fxLayoutAlign="end" *ngIf="!searchMode">
<button mat-button [matMenuTriggerFor]="sortMenu" mat-ripple>
<button [ngClass]="{'animation-blink': sortMode!=='alphabetic'}" mat-button [matMenuTriggerFor]="sortMenu" mat-ripple>
<mat-icon>sort</mat-icon>
</button>
</div>
</div>
<mat-menu #sortMenu>
<button mat-menu-item (click)="sortQuestions('alphabetic')">
<button [ngClass]="{'animation-blink': sortMode==='alphabetic'}" mat-menu-item (click)="sortQuestions('alphabetic')">
<mat-icon>sort_by_alpha</mat-icon>
{{'topic-cloud-dialog.sort-alpha' | translate}} </button>
<button mat-menu-item (click)="sortQuestions('questionsCount')">
<button [ngClass]="{'animation-blink': sortMode==='questionsCount'}" mat-menu-item (click)="sortQuestions('questionsCount')">
<mat-icon>swap_vert</mat-icon>
{{'topic-cloud-dialog.sort-count' | translate}} </button>
<button mat-menu-item (click)="sortQuestions('voteCount')">
<button [ngClass]="{'animation-blink': sortMode==='voteCount'}" mat-menu-item (click)="sortQuestions('voteCount')">
<mat-icon>swap_vert</mat-icon>
{{'topic-cloud-dialog.sort-vote' | translate}} </button>
</mat-menu>
......@@ -119,7 +119,7 @@
*ngFor="let keyword of
(searchMode ? filteredKeywords : keywords); let i = index" [attr.data-index]="i">
<mat-expansion-panel-header class="color-surface">
<mat-panel-title [ngClass]="{'edit-keyword': editedKeyword}">
<mat-panel-title>
{{profanityFilter ? getKeywordWithoutProfanity(keyword.keyword) : keyword.keyword}}
</mat-panel-title>
<mat-panel-description>
......
......@@ -46,15 +46,17 @@ mat-icon {
}
.search{
width: 240%;
color: var(--red) !important;
box-sizing: border-box;
padding: 0 10px 0 5px;
border: none;
outline: none;
min-height: 60px;
font-size: large;
border-radius: 5px;
color: var(--on-surface);
transition: width 300ms linear;
}
.resCount{
color: var(--red) !important;
font-weight: bold;
}
#send_to_spacy{
color: khaki;
background-color: blueviolet;
......@@ -81,7 +83,7 @@ mat-panel-title, mat-panel-description {
}
}
.edit-keyword .mat-panel-title {
.animation-blink{
color: var(--red) !important;
animation-name: animation_blink_5s;
animation-timing-function: ease-in;
......
......@@ -27,7 +27,6 @@ export class TopicCloudAdministrationComponent implements OnInit {
newBadWord: string = undefined;
sortMode = 'alphabetic';
editedKeyword = false;
searchedKeyword = undefined;
searchMode = false;
filteredKeywords: Keyword[] = [];
......@@ -189,7 +188,6 @@ export class TopicCloudAdministrationComponent implements OnInit {
}
});
this.edit = false;
this.editedKeyword = true;
this.newKeyword = undefined;
this.sortQuestions();
if (this.searchMode){
......
......@@ -20,7 +20,6 @@ export class TopicCloudAdminService {
filterProfanityWords(str: string): string {
let questionWithProfanity = str;
const questionLowerCase = questionWithProfanity.toLowerCase();
// German Profanity
this.badWords['de'].map(word =>{
......
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