From c44032cad610d7b0e1c0f04b03a9c4d000b58274 Mon Sep 17 00:00:00 2001 From: irustm Date: Sun, 20 Jun 2021 18:29:42 +0300 Subject: [PATCH] Improve snow component --- .../src/app/core/snow/snow.component.html | 201 +----------------- frontend/src/app/core/snow/snow.component.ts | 14 +- .../add-issue-modal.component.ts | 31 +-- 3 files changed, 22 insertions(+), 224 deletions(-) diff --git a/frontend/src/app/core/snow/snow.component.html b/frontend/src/app/core/snow/snow.component.html index 3590e777..27f23cb0 100644 --- a/frontend/src/app/core/snow/snow.component.html +++ b/frontend/src/app/core/snow/snow.component.html @@ -1,200 +1 @@ -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file +
diff --git a/frontend/src/app/core/snow/snow.component.ts b/frontend/src/app/core/snow/snow.component.ts index 04d387fd..ac4e091c 100644 --- a/frontend/src/app/core/snow/snow.component.ts +++ b/frontend/src/app/core/snow/snow.component.ts @@ -1,15 +1,11 @@ -import { Component, OnInit } from '@angular/core'; +import {ChangeDetectionStrategy, Component} from '@angular/core'; @Component({ selector: 'j-snow', templateUrl: './snow.component.html', - styleUrls: ['./snow.component.scss'] + styleUrls: ['./snow.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush }) -export class SnowComponent implements OnInit { - - constructor() { } - - ngOnInit(): void { - } - +export class SnowComponent { + public snowCount: number[] = new Array(200).fill(0); } diff --git a/frontend/src/app/project/components/add-issue-modal/add-issue-modal.component.ts b/frontend/src/app/project/components/add-issue-modal/add-issue-modal.component.ts index 9b7b8327..65260ca3 100644 --- a/frontend/src/app/project/components/add-issue-modal/add-issue-modal.component.ts +++ b/frontend/src/app/project/components/add-issue-modal/add-issue-modal.component.ts @@ -1,22 +1,23 @@ -import { Component, OnInit } from '@angular/core'; -import { FormBuilder, FormGroup } from '@angular/forms'; -import { IssueType, JIssue, IssueStatus, IssuePriority } from '@trungk18/interface/issue'; -import { quillConfiguration } from '@trungk18/project/config/editor'; -import { NzModalRef } from 'ng-zorro-antd/modal'; -import { ProjectService } from '@trungk18/project/state/project/project.service'; -import { IssueUtil } from '@trungk18/project/utils/issue'; -import { ProjectQuery } from '@trungk18/project/state/project/project.query'; -import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy'; -import { Observable } from 'rxjs'; -import { JUser } from '@trungk18/interface/user'; -import { tap } from 'rxjs/operators'; -import { NoWhitespaceValidator } from '@trungk18/core/validators/no-whitespace.validator'; -import { DateUtil } from '@trungk18/project/utils/date'; +import {ChangeDetectionStrategy, Component, OnInit} from '@angular/core'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {IssuePriority, IssueStatus, IssueType, JIssue} from '@trungk18/interface/issue'; +import {quillConfiguration} from '@trungk18/project/config/editor'; +import {NzModalRef} from 'ng-zorro-antd/modal'; +import {ProjectService} from '@trungk18/project/state/project/project.service'; +import {IssueUtil} from '@trungk18/project/utils/issue'; +import {ProjectQuery} from '@trungk18/project/state/project/project.query'; +import {UntilDestroy, untilDestroyed} from '@ngneat/until-destroy'; +import {Observable} from 'rxjs'; +import {JUser} from '@trungk18/interface/user'; +import {tap} from 'rxjs/operators'; +import {NoWhitespaceValidator} from '@trungk18/core/validators/no-whitespace.validator'; +import {DateUtil} from '@trungk18/project/utils/date'; @Component({ selector: 'add-issue-modal', templateUrl: './add-issue-modal.component.html', - styleUrls: ['./add-issue-modal.component.scss'] + styleUrls: ['./add-issue-modal.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush }) @UntilDestroy() export class AddIssueModalComponent implements OnInit {