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