Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ header .search form input[type='submit'] {
#main .row .data .vbutton {
position: absolute;
background-color: #fff;
width: 25px !important;
right: 5px;
top: 150px;
padding-left: 3px;
Expand All @@ -424,6 +425,22 @@ header .search form input[type='submit'] {
border: 1px solid #ccc;
cursor: pointer;
z-index: 5;
text-align: center;
}

#main .row .data .sbutton {
position: absolute;
background-color: #fff;
width: 25px !important;
right: 5px;
top: 170px;
padding-left: 3px;
padding-right: 3px;
font-size: 10px;
border-radius: 5px;
border: 1px solid #ccc;
cursor: pointer;
z-index: 5;
}

#main .row .data .vbutton.active {
Expand All @@ -440,6 +457,10 @@ header .search form input[type='submit'] {
top: 50px !important;
}

#main .portrait .row .data .sbutton {
top: 80px !important;
}

#main .row .data img {
position: absolute;
z-index: 2;
Expand Down
Binary file added img/icons/icon_x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/icon_x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/nyan_icon_x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/icons/nyan_icon_x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/screenshot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions js/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ var plot_options = {
]
};

//hide PWA taskbar count
navigator.clearAppBadge();

// aprs overlay (not used)
var overlayARPS = new L.tileLayer('http://{s}.tiles.tracker.habhub.org/aprs/tile_{z}_{x}_{y}.png', {
subdomains: 'abc',
Expand Down Expand Up @@ -598,6 +601,20 @@ function showLaunchSites() {
}
}

function shareVehicle(callsign) {
const shareData = {
title: 'SondeHub: ' + vehicles[callsign].marker.options.title + ' Flight Information',
text: 'You can view the flight path and sensor data for ' + vehicles[callsign].marker.options.title + ' on the SondeHub tracker!',
url: window.location.origin + '/' + callsign,
}
try {
navigator.share(shareData);
} catch (e) {
console.log("Error sharing: " + e);
}

}

function panTo(vcallsign) {
if(!vcallsign || vehicles[vcallsign] === undefined) return;

Expand Down Expand Up @@ -1211,6 +1228,7 @@ function updateVehicleInfo(vcallsign, newPosition) {
'<img class="'+((vehicle.vehicle_type=="car")?'car':'')+'" src="'+image+'" />' +
'<span class="vbutton path '+((vehicle.polyline_visible) ? 'active' : '')+'" data-vcallsign="'+vcallsign+'"' +
' style="top:'+(vehicle.image_src_size[1]+55)+'px">Path</span>' +
'<span class="sbutton" onclick="shareVehicle(\'' + vcallsign + '\')">Share</span>' +
((vcallsign in hysplit) ? '<span class="vbutton hysplit '+((hysplit[vcallsign].getMap()) ? 'active' : '')+'"' +
' data-vcallsign="'+vcallsign+'" style="top:'+(vehicle.image_src_size[1]+55+21+10)+'px">HYSPLIT</span>' : '') +
((vcallsign.substr(0, 6) in ssdv) ? '<a class="vbutton active" href="//ssdv.habhub.org/' + vcallsign.substr(0, 6) + '"' +
Expand Down Expand Up @@ -2619,6 +2637,11 @@ function refresh() {
complete: function(request, textStatus) {
document.getElementById("timeperiod").disabled = false;
clearTimeout(periodical);
if (Object.keys(vehicles).length > 1) {
navigator.setAppBadge(Object.keys(vehicles).length); //show number of vehicles on PWA taskbar
} else {
navigator.clearAppBadge(); //hide
}
periodical = setTimeout(refresh, timer_seconds * 1000);
}
});
Expand Down Expand Up @@ -2991,6 +3014,11 @@ function updateReceiverMarker(receiver) {

// init a marker if the receiver doesn't already have one
if(!receiver.marker) {

if (!receiver.description.includes("radiosonde_auto_rx")) {
//future option to show different icon per software
}

receiverIcon = new L.icon({
iconUrl: host_url + markers_url + "antenna-green.png",
iconSize: [26, 34],
Expand Down
42 changes: 40 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,51 @@
"src": "/img/icons/maskable_icon_x192.png",
"type": "image/png",
"sizes": "192x192",
"purpose": "any maskable"
"purpose": "maskable"
},
{
"src": "/img/icons/maskable_icon_x512.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "any maskable"
"purpose": "maskable"
},
{
"src": "/img/icons/icon_x192.png",
"type": "image/png",
"sizes": "192x192",
"purpose": "any"
},
{
"src": "/img/icons/icon_x512.png",
"type": "image/png",
"sizes": "512x512",
"purpose": "any"
}
],
"shortcuts": [
{
"name": "Nyan Mode",
"short_name": "Nyan",
"description": "Start the tracker with Nyan Cat mode enabled",
"url": "/#!nyan=1",
"icons": [{ "src": "/img/icons/nyan_icon_x192.png", "sizes": "192x192" }]
}
],
"screenshots": [
{
"src": "/img/screenshots/screenshot1.png",
"type": "image/png",
"sizes": "1242x2208"
},
{
"src": "/img/screenshots/screenshot2.png",
"type": "image/png",
"sizes": "1242x2208"
},
{
"src": "/img/screenshots/screenshot3.png",
"type": "image/png",
"sizes": "1242x2208"
}
]
}
Binary file added resources/nyan_icon.psd
Binary file not shown.