-
Notifications
You must be signed in to change notification settings - Fork 1
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
39 changed files
with
3,408 additions
and
2,998 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
<nz-list nzBordered nzSize="small"> | ||
<!-- <nz-list-header>Header</nz-list-header> --> | ||
<nz-list-item | ||
*ngFor=" | ||
let hist of sessionHistoryService.historyStore | async | keyvalue | ||
" | ||
> | ||
<span | ||
*ngIf="filter.includes(hist.value['historyType'])" | ||
class="flex-container" | ||
> | ||
<span class="left"> | ||
<a | ||
href="{{ backendUrl }}admin/spotting/event/{{ | ||
hist.value['id'] | ||
}}" | ||
> | ||
{{ hist.value["id"] }} | ||
</a> | ||
<span class="require-whitespace"> - </span> | ||
{{ hist.value["vehicle"]["name"] }} | ||
</span> | ||
<span class="right"> | ||
<nz-space> | ||
<spotting-type-tag | ||
*nzSpaceItem | ||
[spottingType]="hist.value['type']" | ||
></spotting-type-tag> | ||
<vehicle-status-tag | ||
*nzSpaceItem | ||
[vehicleStatus]="hist.value['status']" | ||
></vehicle-status-tag> | ||
</nz-space> | ||
</span> | ||
</span> | ||
</nz-list-item> | ||
@for ( | ||
hist of sessionHistoryService.historyStore | async | keyvalue; | ||
track hist.value | ||
) { | ||
<nz-list-item> | ||
@if (filter.includes(hist.value["historyType"])) { | ||
<span class="flex-container"> | ||
<span class="left"> | ||
<a | ||
href="{{ backendUrl }}admin/spotting/event/{{ | ||
hist.value['id'] | ||
}}" | ||
> | ||
{{ hist.value["id"] }} | ||
</a> | ||
<span class="require-whitespace"> - </span> | ||
{{ hist.value["vehicle"]["name"] }} | ||
</span> | ||
<span class="right"> | ||
<nz-space> | ||
<spotting-type-tag | ||
*nzSpaceItem | ||
[spottingType]="hist.value['type']" | ||
/> | ||
<vehicle-status-tag | ||
*nzSpaceItem | ||
[vehicleStatus]="hist.value['status']" | ||
/> | ||
</nz-space> | ||
</span> | ||
</span> | ||
} | ||
</nz-list-item> | ||
} | ||
<!-- <nz-list-footer>Footer</nz-list-footer> --> | ||
</nz-list> |
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
45 changes: 23 additions & 22 deletions
45
src/app/@ui/spotting-image-list/spotting-image-list.component.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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
<nz-spin [nzSpinning]="loading" [nzSize]="'large'"> | ||
<nz-empty | ||
*ngIf="imageSrcs.length === 0 && !loading" | ||
nzNotFoundContent="No images. Add some?" | ||
></nz-empty> | ||
<nz-image-group *ngIf="imageSrcs.length > 0" class="flex-container"> | ||
<img | ||
height="200px" | ||
width="200px" | ||
*ngFor="let src of imageSrcs; let i = index" | ||
[attr.data-index]="i" | ||
[src]=" | ||
'https://media.discordapp.net/attachments/' + | ||
src + | ||
'?format=webp&quality=lossless&width=300&height=300' | ||
" | ||
onerror="this.onerror=null; this.src='./assets/image-not-found.png'" | ||
(click)="onViewImage(i)" | ||
(load)="markLoaded()" | ||
/> | ||
</nz-image-group> | ||
<span *ngIf="isMine"> | ||
@if (imageSrcs.length > 0) { | ||
<nz-image-group class="flex-container"> | ||
@for (src of imageSrcs; track src; let i = $index) { | ||
<img | ||
height="200px" | ||
width="200px" | ||
[attr.data-index]="i" | ||
[src]=" | ||
'https://media.discordapp.net/attachments/' + | ||
src + | ||
'?format=webp&quality=lossless&width=300&height=300' | ||
" | ||
onerror="this.onerror=null; this.src='./assets/image-not-found.png'" | ||
(click)="onViewImage(i)" | ||
(load)="markLoaded()" | ||
/> | ||
} | ||
</nz-image-group> | ||
} @else if (imageSrcs.length === 0 && !loading) { | ||
<nz-empty nzNotFoundContent="No images. Add some?" /> | ||
} | ||
@if (isMine) { | ||
<h1>Add Images</h1> | ||
<spotting-form-upload | ||
(newImageEvent)="onImageChange($event)" | ||
></spotting-form-upload> | ||
</span> | ||
} | ||
</nz-spin> |
4 changes: 3 additions & 1 deletion
4
src/app/@ui/spotting-line-calendar-heatmap/spotting-line-calendar-heatmap.component.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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
<nz-spin class="spinner" nzSimple *ngIf="loading"></nz-spin> | ||
@if (loading) { | ||
<nz-spin class="spinner" nzSimple /> | ||
} | ||
<div id="container"></div> |
153 changes: 82 additions & 71 deletions
153
src/app/@ui/spotting-type-cell-display/spotting-type-cell-display.component.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 |
---|---|---|
@@ -1,82 +1,93 @@ | ||
<div> | ||
<spotting-type-tag [spottingType]="spottingType"></spotting-type-tag> | ||
<br /> | ||
<a | ||
*ngIf="rowItem.location" | ||
href="https://www.google.com/maps?q={{ rowItem.location.latitude }},{{ | ||
rowItem.location.longitude | ||
}}" | ||
target="_blank" | ||
> | ||
<span | ||
*ngIf="showLocationPopover" | ||
nz-tooltip | ||
[nzTooltipTitle]="locationPopoverTemplate" | ||
[nzTooltipTrigger]="'hover'" | ||
[nzTooltipPlacement]="'right'" | ||
nz-icon | ||
[nzType]="'info-circle'" | ||
></span> | ||
{{ rowItem.location | coordinatesHumanizer : 3 }} | ||
</a> | ||
<span *ngIf="rowItem.type == 'AT_STATION' && rowItem.originStation"> | ||
{{ rowItem.originStation.displayName }} | ||
</span> | ||
<span | ||
*ngIf=" | ||
rowItem.type == 'BETWEEN_STATIONS' && | ||
rowItem.originStation && | ||
rowItem.destinationStation | ||
" | ||
> | ||
{{ rowItem.originStation.displayName }} -> | ||
{{ rowItem.destinationStation.displayName }} | ||
</span> | ||
@if (rowItem.location) { | ||
<a | ||
href="https://www.google.com/maps?q={{ | ||
rowItem.location.latitude | ||
}},{{ rowItem.location.longitude }}" | ||
target="_blank" | ||
> | ||
@if (showLocationPopover) { | ||
<span | ||
nz-tooltip | ||
[nzTooltipTitle]="locationPopoverTemplate" | ||
[nzTooltipTrigger]="'hover'" | ||
[nzTooltipPlacement]="'right'" | ||
nz-icon | ||
[nzType]="'info-circle'" | ||
></span> | ||
} | ||
{{ rowItem.location | coordinatesHumanizer: 3 }} | ||
</a> | ||
} @else if (rowItem.originStation) { | ||
@if (rowItem.type == "AT_STATION") { | ||
{{ rowItem.originStation.displayName }} | ||
} @else if ( | ||
rowItem.type == "BETWEEN_STATIONS" && rowItem.destinationStation | ||
) { | ||
{{ rowItem.originStation.displayName }} -> | ||
{{ rowItem.destinationStation.displayName }} | ||
} | ||
} | ||
</div> | ||
|
||
<ng-template #content> </ng-template> | ||
|
||
<ng-template #locationPopoverTemplate> | ||
<table *ngIf="rowItem.location" class="location-popover"> | ||
<tr> | ||
<td>Location</td> | ||
<td>:</td> | ||
<td> | ||
{{ | ||
rowItem.location | ||
| coordinatesHumanizer : 3 : ["location-only"] | ||
}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Accuracy</td> | ||
<td>:</td> | ||
<td>{{ rowItem.location.accuracy | beautifulDecimal }}m</td> | ||
</tr> | ||
<tr *ngIf="rowItem.location.altitude"> | ||
<td>Altitude</td> | ||
<td>:</td> | ||
<td> | ||
{{ rowItem.location.altitude | beautifulDecimal }}m<span | ||
*ngIf="rowItem.location.altitudeAccuracy" | ||
> | ||
± | ||
@if (rowItem.location) { | ||
<table class="location-popover"> | ||
<tr> | ||
<td>Location</td> | ||
<td>:</td> | ||
<td> | ||
{{ | ||
rowItem.location.altitudeAccuracy | beautifulDecimal | ||
}}m</span | ||
> | ||
</td> | ||
</tr> | ||
<tr *ngIf="rowItem.location.heading"> | ||
<td>Heading</td> | ||
<td>:</td> | ||
<td>{{ rowItem.location.heading | beautifulDecimal }}°</td> | ||
</tr> | ||
rowItem.location | ||
| coordinatesHumanizer: 3 : ["location-only"] | ||
}} | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Accuracy</td> | ||
<td>:</td> | ||
<td>{{ rowItem.location.accuracy | beautifulDecimal }}m</td> | ||
</tr> | ||
@if (rowItem.location.altitude) { | ||
<tr> | ||
<td>Altitude</td> | ||
<td>:</td> | ||
<td> | ||
{{ rowItem.location.altitude | beautifulDecimal }}m | ||
@if (rowItem.location.altitudeAccuracy) { | ||
± | ||
{{ | ||
rowItem.location.altitudeAccuracy | ||
| beautifulDecimal | ||
}}m | ||
} | ||
</td> | ||
</tr> | ||
} | ||
@if (rowItem.location.heading) { | ||
<tr> | ||
<td>Heading</td> | ||
<td>:</td> | ||
<td>{{ rowItem.location.heading | beautifulDecimal }}°</td> | ||
</tr> | ||
} | ||
|
||
<tr *ngIf="rowItem.location.speed"> | ||
<td>Speed</td> | ||
<td>:</td> | ||
<td>{{ rowItem.location.speed * 3.6 | beautifulDecimal }} km/h</td> | ||
</tr> | ||
</table> | ||
@if (rowItem.location.speed) { | ||
<tr> | ||
<td>Speed</td> | ||
<td>:</td> | ||
<td> | ||
{{ | ||
rowItem.location.speed * 3.6 | beautifulDecimal | ||
}} | ||
km/h | ||
</td> | ||
</tr> | ||
} | ||
</table> | ||
} | ||
</ng-template> |
4 changes: 3 additions & 1 deletion
4
...pp/@ui/spotting-vehicle-calendar-heatmap/spotting-vehicle-calendar-heatmap.component.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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
<nz-spin class="spinner" nzSimple *ngIf="loading"></nz-spin> | ||
@if (loading) { | ||
<nz-spin class="spinner" nzSimple /> | ||
} | ||
<div id="spotting-vehicle-calendar-heatmap-container"></div> |
Oops, something went wrong.