diff --git a/ui/src/app/app.component.html b/ui/src/app/app.component.html index 37c00e4..fa2b788 100644 --- a/ui/src/app/app.component.html +++ b/ui/src/app/app.component.html @@ -4,7 +4,7 @@ MeshCenter -
{{userNode.long_name}} ({{userNode.num}}) snr: {{userNode.snr}}
+{{(isHandset | async) ? (userNode.short_name) : (userNode.long_name + ' ' + userNode.num + ' ' + userNode.snr)}}
snr: ${node.snr} hops: ${node.hops_away}
Изменена: ${this.datepipe.transform(node.position.time*1000, 'HH:mm dd.MM.yyyy')}
`).addTo(this.map) + L.marker(this.convertPosition(node), { + icon: this.createCircleIcon({ + color: this.numToColor(node.num, 0), + text: node.short_name}) + }) + .bindPopup(`${node.long_name} (${node.short_name})snr: ${node.snr} hops: ${node.hops_away}
Изменена: ${this.datepipe.transform(node.position.time*1000, 'HH:mm dd.MM.yyyy')}
`) + .addTo(this.map) } ) } @@ -72,4 +81,24 @@ export class NodesMapComponent implements OnInit { tiles.addTo(this.map) return Subscription.EMPTY; } + + private createCircleIcon(options: { color: string; text: string; size?: number }): L.DivIcon { + const size = options.size || 24; + const html = ` +