|
|
@ -36,12 +36,16 @@ |
|
|
|
<span |
|
|
|
<span |
|
|
|
style="color:gray;">{{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'none') |list|length}}</span> |
|
|
|
style="color:gray;">{{ bunny.player_caught_by_players | selectattr('catching_player', '==', player) | selectattr('review.name', '==', 'none') |list|length}}</span> |
|
|
|
</td> |
|
|
|
</td> |
|
|
|
<td>{% with location = bunny.last_location(offset=hunter_delay) %} |
|
|
|
<td> |
|
|
|
{% if location %}{{ moment(location.timestamp).fromNow()}} |
|
|
|
<p id='last_location_{{ bunny.user.name }}'> |
|
|
|
{% else %} |
|
|
|
{% with location = bunny.last_location(offset=hunter_delay) %} |
|
|
|
{{ location }} |
|
|
|
{% if location %}{{ moment(location.timestamp).fromNow()}} |
|
|
|
{% endif %} |
|
|
|
{% else %} |
|
|
|
{% endwith %}</td> |
|
|
|
{{ location }} |
|
|
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% endwith %} |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<td> |
|
|
|
<a |
|
|
|
<a |
|
|
|
href="{{ url_for('main.catch_bunny', game_name=game.name, bunny_name=bunny.user.name) }}"> |
|
|
|
href="{{ url_for('main.catch_bunny', game_name=game.name, bunny_name=bunny.user.name) }}"> |
|
|
@ -96,6 +100,8 @@ |
|
|
|
bunnieMarkers = [] |
|
|
|
bunnieMarkers = [] |
|
|
|
for (var i = 0; i < bunnies.length; i++) { |
|
|
|
for (var i = 0; i < bunnies.length; i++) { |
|
|
|
bunnieMarkers.push(addPlayerMarker(map, bunnies[i], greenPlayerIcon)) |
|
|
|
bunnieMarkers.push(addPlayerMarker(map, bunnies[i], greenPlayerIcon)) |
|
|
|
|
|
|
|
// Update table lastlocation column |
|
|
|
|
|
|
|
$('#last_location_' + bunnies[i].username)[0].innerHTML = toMomentLocal(bunnies[i].timestamp_utc).fromNow() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -110,7 +116,7 @@ |
|
|
|
handleResponse |
|
|
|
handleResponse |
|
|
|
) |
|
|
|
) |
|
|
|
getPosition(updateMyLocation) |
|
|
|
getPosition(updateMyLocation) |
|
|
|
}, 10 * 1000); |
|
|
|
}, 30 * 1000); |
|
|
|
|
|
|
|
|
|
|
|
function handleResponse(data){ |
|
|
|
function handleResponse(data){ |
|
|
|
data.forEach(function (location) { |
|
|
|
data.forEach(function (location) { |
|
|
|