File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed
Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -415,6 +415,7 @@ header .search form input[type='submit'] {
415415# main .row .data .vbutton {
416416 position : absolute;
417417 background-color : # fff ;
418+ width : 25px !important ;
418419 right : 5px ;
419420 top : 150px ;
420421 padding-left : 3px ;
@@ -424,6 +425,22 @@ header .search form input[type='submit'] {
424425 border : 1px solid # ccc ;
425426 cursor : pointer;
426427 z-index : 5 ;
428+ text-align : center;
429+ }
430+
431+ # main .row .data .sbutton {
432+ position : absolute;
433+ background-color : # fff ;
434+ width : 25px !important ;
435+ right : 5px ;
436+ top : 170px ;
437+ padding-left : 3px ;
438+ padding-right : 3px ;
439+ font-size : 10px ;
440+ border-radius : 5px ;
441+ border : 1px solid # ccc ;
442+ cursor : pointer;
443+ z-index : 5 ;
427444}
428445
429446# main .row .data .vbutton .active {
@@ -440,6 +457,10 @@ header .search form input[type='submit'] {
440457 top : 50px !important ;
441458}
442459
460+ # main .portrait .row .data .sbutton {
461+ top : 80px !important ;
462+ }
463+
443464# main .row .data img {
444465 position : absolute;
445466 z-index : 2 ;
Original file line number Diff line number Diff line change @@ -601,6 +601,20 @@ function showLaunchSites() {
601601 }
602602}
603603
604+ function shareVehicle ( callsign ) {
605+ const shareData = {
606+ title : 'SondeHub: ' + vehicles [ callsign ] . marker . options . title + ' Flight Information' ,
607+ text : 'You can view the flight path and sensor data for ' + vehicles [ callsign ] . marker . options . title + ' on the SondeHub tracker!' ,
608+ url : window . location . origin + '/' + callsign ,
609+ }
610+ try {
611+ navigator . share ( shareData ) ;
612+ } catch ( e ) {
613+ console . log ( "Error sharing: " + e ) ;
614+ }
615+
616+ }
617+
604618function panTo ( vcallsign ) {
605619 if ( ! vcallsign || vehicles [ vcallsign ] === undefined ) return ;
606620
@@ -1214,6 +1228,7 @@ function updateVehicleInfo(vcallsign, newPosition) {
12141228 '<img class="' + ( ( vehicle . vehicle_type == "car" ) ?'car' :'' ) + '" src="' + image + '" />' +
12151229 '<span class="vbutton path ' + ( ( vehicle . polyline_visible ) ? 'active' : '' ) + '" data-vcallsign="' + vcallsign + '"' +
12161230 ' style="top:' + ( vehicle . image_src_size [ 1 ] + 55 ) + 'px">Path</span>' +
1231+ '<span class="sbutton" onclick="shareVehicle(\'' + vcallsign + '\')">Share</span>' +
12171232 ( ( vcallsign in hysplit ) ? '<span class="vbutton hysplit ' + ( ( hysplit [ vcallsign ] . getMap ( ) ) ? 'active' : '' ) + '"' +
12181233 ' data-vcallsign="' + vcallsign + '" style="top:' + ( vehicle . image_src_size [ 1 ] + 55 + 21 + 10 ) + 'px">HYSPLIT</span>' : '' ) +
12191234 ( ( vcallsign . substr ( 0 , 6 ) in ssdv ) ? '<a class="vbutton active" href="//ssdv.habhub.org/' + vcallsign . substr ( 0 , 6 ) + '"' +
Original file line number Diff line number Diff line change 4646 ],
4747 "screenshots" : [
4848 {
49- "src" : " /img/screenshot /screenshot1.jpg" ,
49+ "src" : " /img/screenshots /screenshot1.jpg" ,
5050 "type" : " image/jpg" ,
5151 "sizes" : " 1080x2240"
5252 },
5353 {
54- "src" : " /img/screenshot /screenshot2.jpg" ,
54+ "src" : " /img/screenshots /screenshot2.jpg" ,
5555 "type" : " image/jpg" ,
5656 "sizes" : " 1080x2240"
5757 },
5858 {
59- "src" : " /img/screenshot /screenshot3.jpg" ,
59+ "src" : " /img/screenshots /screenshot3.jpg" ,
6060 "type" : " image/jpg" ,
6161 "sizes" : " 1080x2240"
6262 }
You can’t perform that action at this time.
0 commit comments