-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
2,166 additions
and
1,959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
ui/dashboard/projects/utask-lib/src/lib/@components/input-tags/input-tags.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<span #span> | ||
<input type="text" #inputPlaceholder class="placeholder" value="" readonly="" autocomplete="off" spellcheck="false" tabindex="-1"/> | ||
<input type="text" #inputMain class="main" [placeholder]="displayPlaceholder ? placeholder : ''"/> | ||
<ul class="suggestions" *ngIf="suggestions.length && !suggestionsHide"> | ||
<li *ngFor="let item of suggestions; let index = index;" [ngClass]="{'selected': suggestionIndex !== -1 && item.word === suggestions[suggestionIndex].word}" (click)="select(index);"> | ||
{{item.word}} | ||
</li> | ||
</ul> | ||
</span> |
23 changes: 23 additions & 0 deletions
23
ui/dashboard/projects/utask-lib/src/lib/@components/task-status/task-status.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges } from '@angular/core'; | ||
import Task from '../../@models/task.model'; | ||
|
||
@Component({ | ||
selector: 'lib-utask-task-status', | ||
templateUrl: './task-status.html', | ||
styleUrls: ['./task-status.sass'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class TaskStatusComponent implements OnChanges { | ||
@Input() task: Task; | ||
percentage: number; | ||
|
||
constructor( | ||
private _cd: ChangeDetectorRef | ||
) { } | ||
|
||
ngOnChanges(): void { | ||
if (!this.task) { return; } | ||
this.percentage = Math.round(this.task.steps_done / this.task.steps_total * 100); | ||
this._cd.markForCheck(); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
ui/dashboard/projects/utask-lib/src/lib/@components/task-status/task-status.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="wrapper {{task.state}}" *ngIf="task"> | ||
<div class="status"> | ||
<div class="text">{{task.state}}</div> | ||
</div> | ||
<div class="progress" *ngIf="percentage < 100 && percentage > 0"> | ||
<div class="bar" [ngStyle]="{ 'width': percentage + '%' }"></div> | ||
<div class="text">{{percentage}}%</div> | ||
</div> | ||
</div> |
57 changes: 57 additions & 0 deletions
57
ui/dashboard/projects/utask-lib/src/lib/@components/task-status/task-status.sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
$color-danger: #dc3545 | ||
$color-warning: #fd7e14 | ||
$color-success: #28a745 | ||
$color-primary: #007bff | ||
|
||
.wrapper | ||
display: flex | ||
flex-direction: column | ||
color: #FFFFFF | ||
height: 35px | ||
width: 120px | ||
|
||
&.DONE | ||
background: $color-success | ||
&.RUNNING | ||
background-color: $color-primary | ||
background-image: linear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, .1) 33%, rgba(0, 0, 0, .1) 66%, transparent 66%) | ||
background-size: 4rem 2rem, 100% 100%, 100% 100% | ||
animation: animate-state-running 1s linear infinite | ||
&.CANCELLED, &.WONTFIX | ||
background: $color-warning | ||
&.BLOCKED | ||
background: $color-danger | ||
&.TODO | ||
background: $color-primary | ||
|
||
.status | ||
flex: 1 | ||
display: flex | ||
flex-direction: row | ||
align-items: center | ||
.text | ||
width: 100% | ||
text-align: center | ||
font-weight: bold | ||
|
||
.progress | ||
position: relative | ||
height: 13px | ||
width: 100% | ||
.text | ||
top: 0 | ||
left: 0 | ||
width: 100% | ||
height: 100% | ||
position: absolute | ||
font-size: 11px | ||
line-height: 13px | ||
text-align: center | ||
font-weight: bold | ||
|
||
.bar | ||
position: relative | ||
background: #000000 | ||
height: 100% | ||
transition: width 0.25s | ||
opacity: 0.2 |
Oops, something went wrong.