kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Merge branch 'POTA-menu' into 'master'
POTA feature setting under Settings -> Logbook See merge request gridtracker.org/gridtracker!206 If this is changing anything in the UI or operational behavior, please prepare to update the wiki!merge-requests/201/merge
commit
5d7f214948
|
@ -695,9 +695,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
<div id="radarButton" onclick="toggleNexrad()" class="iconButton" title="Toggle US Nexrad">
|
<div id="radarButton" onclick="toggleNexrad()" class="iconButton" title="Toggle US Nexrad">
|
||||||
<img src="./img/radar-button.png" class="buttonImg" />
|
<img src="./img/radar-button.png" class="buttonImg" />
|
||||||
</div>
|
</div>
|
||||||
<div id="potaButton" onClick="togglePota();" class="iconButton" title="Parks On The Air">
|
|
||||||
<img id="potaImg" src="./img/pota.png" class="buttonImg" />
|
|
||||||
</div>
|
|
||||||
<div id="gridOverlayButton" onclick="toggleAllGrids()" class="iconButton" title="Toggle All Grid Overlay">
|
<div id="gridOverlayButton" onclick="toggleAllGrids()" class="iconButton" title="Toggle All Grid Overlay">
|
||||||
<img src="./img/grid-overlay.png" class="buttonImg" />
|
<img src="./img/grid-overlay.png" class="buttonImg" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -707,6 +704,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
<div id="msgButton" onclick="showMessaging();" class="iconButton" title="Messaging Window">
|
<div id="msgButton" onclick="showMessaging();" class="iconButton" title="Messaging Window">
|
||||||
<img id="msgImg" src="./img/gt_chat.png" class="buttonImg" />
|
<img id="msgImg" src="./img/gt_chat.png" class="buttonImg" />
|
||||||
</div>
|
</div>
|
||||||
|
<div id="potaButton" onClick="togglePotaMap();" class="iconButton" title="Parks On The Air">
|
||||||
|
<img id="potaImg" src="./img/pota.png" class="buttonImg" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
id="SpotsDiv"
|
id="SpotsDiv"
|
||||||
|
@ -1520,6 +1520,29 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="featureControlDiv" class="mapItem">
|
||||||
|
<table align="center" class="darkTable">
|
||||||
|
<tr>
|
||||||
|
<th colspan="6" style="font-weight: bold; color: yellow">Feature Control</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Feature</th>
|
||||||
|
<th>Enabled</th>
|
||||||
|
<th>Menu Button</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>POTA</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" id="potaEnabled" onclick="changePotaEnable();" />
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" id="potaMenu" onclick="changePotaMenu();" />
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="SpeechSettingsDiv" class="settingsTabcontent">
|
<div id="SpeechSettingsDiv" class="settingsTabcontent">
|
||||||
<div class="roundBorder" style="border: 1px solid #666; margin: 2px; padding: 5px">
|
<div class="roundBorder" style="border: 1px solid #666; margin: 2px; padding: 5px">
|
||||||
|
|
|
@ -1827,7 +1827,7 @@ function sendToLogger(ADIF)
|
||||||
record.GRIDSQUARE = g_liveCallsigns[localHash].grid.substr(0, 4);
|
record.GRIDSQUARE = g_liveCallsigns[localHash].grid.substr(0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_potaEnabled == 1 && localHash in g_liveCallsigns && g_liveCallsigns[localHash].pota.length > 0)
|
if (g_appSettings.potaEnabled == 1 && localHash in g_liveCallsigns && g_liveCallsigns[localHash].pota.length > 0)
|
||||||
{
|
{
|
||||||
let pota = g_liveCallsigns[localHash].pota[0];
|
let pota = g_liveCallsigns[localHash].pota[0];
|
||||||
if (pota != "?-????")
|
if (pota != "?-????")
|
||||||
|
@ -1948,7 +1948,7 @@ function finishSendingReport(record, localMode)
|
||||||
{
|
{
|
||||||
g_lastReport = report;
|
g_lastReport = report;
|
||||||
|
|
||||||
if (g_potaEnabled == 1 && "POTA" in record)
|
if (g_appSettings.potaEnabled == 1 && "POTA" in record)
|
||||||
{
|
{
|
||||||
reportPotaQSO(record);
|
reportPotaQSO(record);
|
||||||
addLastTraffic("<font style='color:white'>Spotted to POTA</font>");
|
addLastTraffic("<font style='color:white'>Spotted to POTA</font>");
|
||||||
|
|
|
@ -75,7 +75,9 @@ var def_appSettings = {
|
||||||
myRawFreq: "",
|
myRawFreq: "",
|
||||||
myRawGrid: "",
|
myRawGrid: "",
|
||||||
pathWidthWeight: 1.0,
|
pathWidthWeight: 1.0,
|
||||||
potaEnabled: 0,
|
potaEnabled: 1,
|
||||||
|
potaShowMenu: true,
|
||||||
|
potaMapEnabled: false,
|
||||||
pushPinMode: false,
|
pushPinMode: false,
|
||||||
qrzPathWidthWeight: 1.2,
|
qrzPathWidthWeight: 1.2,
|
||||||
sixWideMode: 0,
|
sixWideMode: 0,
|
||||||
|
|
|
@ -180,7 +180,6 @@ var g_flightDuration = 30;
|
||||||
|
|
||||||
var g_crScript = g_appSettings.crScript;
|
var g_crScript = g_appSettings.crScript;
|
||||||
var g_spotsEnabled = g_appSettings.spotsEnabled;
|
var g_spotsEnabled = g_appSettings.spotsEnabled;
|
||||||
var g_potaEnabled = g_appSettings.potaEnabled;
|
|
||||||
var g_heatEnabled = g_appSettings.heatEnabled;
|
var g_heatEnabled = g_appSettings.heatEnabled;
|
||||||
|
|
||||||
var g_myLat = g_mapSettings.latitude;
|
var g_myLat = g_mapSettings.latitude;
|
||||||
|
@ -7165,7 +7164,7 @@ function handleWsjtxDecode(newMessage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_potaEnabled == 1)
|
if (g_appSettings.potaEnabled == 1)
|
||||||
{
|
{
|
||||||
if (callsign.DEcall in g_pota.callSpots || callsign.DEcall in g_pota.callSchedule)
|
if (callsign.DEcall in g_pota.callSpots || callsign.DEcall in g_pota.callSchedule)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,36 +62,62 @@ var g_gtParkIconInactive = new ol.style.Icon({
|
||||||
|
|
||||||
function initPota()
|
function initPota()
|
||||||
{
|
{
|
||||||
potaImg.style.filter = g_potaEnabled == 1 ? "" : "grayscale(1)";
|
potaEnabled.checked = (g_appSettings.potaEnabled == 1);
|
||||||
|
potaMenu.checked = g_appSettings.potaShowMenu;
|
||||||
|
potaButton.style.display = (g_appSettings.potaEnabled == 1 && g_appSettings.potaShowMenu) ? "" : "none";
|
||||||
|
potaImg.style.filter = g_appSettings.potaMapEnabled ? "" : "grayscale(1)";
|
||||||
|
|
||||||
|
g_layerSources.pota.clear();
|
||||||
|
g_pota.mapParks = {};
|
||||||
|
|
||||||
|
if (g_appSettings.potaEnabled == 1)
|
||||||
|
{
|
||||||
getPotaParks();
|
getPotaParks();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function togglePota()
|
function changePotaEnable()
|
||||||
{
|
{
|
||||||
g_potaEnabled ^= 1;
|
g_appSettings.potaEnabled = (potaEnabled.checked == true) ? 1 : 0;
|
||||||
g_appSettings.potaEnabled = g_potaEnabled;
|
potaButton.style.display = (g_appSettings.potaEnabled == 1 && g_appSettings.potaShowMenu) ? "" : "none";
|
||||||
potaImg.style.filter = g_potaEnabled == 1 ? "" : "grayscale(1)";
|
if (!g_appSettings.potaEnabled)
|
||||||
|
|
||||||
saveAppSettings();
|
|
||||||
|
|
||||||
if (g_potaEnabled == 1)
|
|
||||||
{
|
{
|
||||||
getPotaParks();
|
g_layerSources.pota.clear();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_layerSources.pota.clear();
|
getPotaParks();
|
||||||
g_pota.mapParks = {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveAppSettings();
|
||||||
goProcessRoster();
|
goProcessRoster();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changePotaMenu()
|
||||||
|
{
|
||||||
|
g_appSettings.potaShowMenu = potaMenu.checked;
|
||||||
|
|
||||||
|
potaButton.style.display = (g_appSettings.potaEnabled == 1 && g_appSettings.potaShowMenu) ? "" : "none";
|
||||||
|
potaImg.style.filter = g_appSettings.potaMapEnabled ? "" : "grayscale(1)";
|
||||||
|
|
||||||
|
saveAppSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
function togglePotaMap()
|
||||||
|
{
|
||||||
|
g_appSettings.potaMapEnabled = !g_appSettings.potaMapEnabled;
|
||||||
|
potaImg.style.filter = g_appSettings.potaMapEnabled ? "" : "grayscale(1)";
|
||||||
|
|
||||||
|
saveAppSettings();
|
||||||
|
|
||||||
|
redrawParks();
|
||||||
|
}
|
||||||
|
|
||||||
function redrawParks()
|
function redrawParks()
|
||||||
{
|
{
|
||||||
g_layerSources.pota.clear();
|
g_layerSources.pota.clear();
|
||||||
|
|
||||||
if (g_potaEnabled == 1)
|
if (g_appSettings.potaEnabled == 1 && g_appSettings.potaMapEnabled)
|
||||||
{
|
{
|
||||||
g_pota.mapParks = {};
|
g_pota.mapParks = {};
|
||||||
makeParkFeatures();
|
makeParkFeatures();
|
||||||
|
@ -164,7 +190,10 @@ function potaSpotFromDecode(callObj)
|
||||||
}
|
}
|
||||||
|
|
||||||
// may or may not be on screen, so try
|
// may or may not be on screen, so try
|
||||||
|
if (g_appSettings.potaMapEnabled)
|
||||||
|
{
|
||||||
addParkSpotFeature(park, g_pota.parkSpots[park][callObj.DEcall]);
|
addParkSpotFeature(park, g_pota.parkSpots[park][callObj.DEcall]);
|
||||||
|
}
|
||||||
|
|
||||||
let hash = park + callObj.DEcall;
|
let hash = park + callObj.DEcall;
|
||||||
if (!(hash in g_pota.rbnReportTimes) || Date.now() > g_pota.rbnReportTimes[hash])
|
if (!(hash in g_pota.rbnReportTimes) || Date.now() > g_pota.rbnReportTimes[hash])
|
||||||
|
@ -290,7 +319,7 @@ function addParkSpotFeature(park, report)
|
||||||
|
|
||||||
function processPotaParks(buffer)
|
function processPotaParks(buffer)
|
||||||
{
|
{
|
||||||
if (g_potaEnabled == 1)
|
if (g_appSettings.potaEnabled == 1)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -332,7 +361,7 @@ function getPotaParks()
|
||||||
g_pota.spotsTimeout = null;
|
g_pota.spotsTimeout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_mapSettings.offlineMode == false && g_potaEnabled == 1)
|
if (g_mapSettings.offlineMode == false && g_appSettings.potaEnabled == 1)
|
||||||
{
|
{
|
||||||
getBuffer(
|
getBuffer(
|
||||||
"https://storage.googleapis.com/gt_app/pota.json?cb=" + Date.now(),
|
"https://storage.googleapis.com/gt_app/pota.json?cb=" + Date.now(),
|
||||||
|
@ -380,7 +409,7 @@ function uniqueArrayFromArray(input)
|
||||||
|
|
||||||
function processPotaSpots(buffer)
|
function processPotaSpots(buffer)
|
||||||
{
|
{
|
||||||
if (g_potaEnabled == 1)
|
if (g_appSettings.potaEnabled == 1)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -439,7 +468,7 @@ function getPotaSpots()
|
||||||
g_pota.spotsTimeout = null;
|
g_pota.spotsTimeout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_mapSettings.offlineMode == false && g_potaEnabled == 1)
|
if (g_mapSettings.offlineMode == false && g_appSettings.potaEnabled == 1)
|
||||||
{
|
{
|
||||||
getBuffer(
|
getBuffer(
|
||||||
"https://api.pota.app/spot/activator",
|
"https://api.pota.app/spot/activator",
|
||||||
|
@ -455,7 +484,7 @@ function getPotaSpots()
|
||||||
|
|
||||||
function processPotaSchedule(buffer)
|
function processPotaSchedule(buffer)
|
||||||
{
|
{
|
||||||
if (g_potaEnabled == 1)
|
if (g_appSettings.potaEnabled == 1)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -513,7 +542,7 @@ function getPotaSchedule()
|
||||||
g_pota.scheduleTimeout = null;
|
g_pota.scheduleTimeout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_mapSettings.offlineMode == false && g_potaEnabled == 1)
|
if (g_mapSettings.offlineMode == false && g_appSettings.potaEnabled == 1)
|
||||||
{
|
{
|
||||||
getBuffer(
|
getBuffer(
|
||||||
"https://api.pota.app/activation",
|
"https://api.pota.app/activation",
|
||||||
|
|
|
@ -68,7 +68,7 @@ var g_defaultSettings = {
|
||||||
callsign: "all",
|
callsign: "all",
|
||||||
hunting: "dxcc",
|
hunting: "dxcc",
|
||||||
huntNeed: "confirmed",
|
huntNeed: "confirmed",
|
||||||
requireGrid: true,
|
requireGrid: false,
|
||||||
wantMaxDT: false,
|
wantMaxDT: false,
|
||||||
wantMinDB: false,
|
wantMinDB: false,
|
||||||
wantMinFreq: false,
|
wantMinFreq: false,
|
||||||
|
@ -119,9 +119,9 @@ var g_defaultSettings = {
|
||||||
DXCC: true,
|
DXCC: true,
|
||||||
Flag: true,
|
Flag: true,
|
||||||
State: true,
|
State: true,
|
||||||
County: true,
|
County: false,
|
||||||
POTA: false,
|
POTA: false,
|
||||||
Cont: true,
|
Cont: false,
|
||||||
dB: true,
|
dB: true,
|
||||||
Freq: false,
|
Freq: false,
|
||||||
DT: false,
|
DT: false,
|
||||||
|
@ -129,7 +129,7 @@ var g_defaultSettings = {
|
||||||
Azim: true,
|
Azim: true,
|
||||||
CQz: false,
|
CQz: false,
|
||||||
ITUz: false,
|
ITUz: false,
|
||||||
PX: true,
|
PX: false,
|
||||||
LoTW: false,
|
LoTW: false,
|
||||||
eQSL: false,
|
eQSL: false,
|
||||||
OQRS: false,
|
OQRS: false,
|
||||||
|
@ -145,7 +145,7 @@ var g_defaultSettings = {
|
||||||
settingProfiles: false,
|
settingProfiles: false,
|
||||||
|
|
||||||
sortColumn: "Age",
|
sortColumn: "Age",
|
||||||
sortReverse: false
|
sortReverse: true
|
||||||
};
|
};
|
||||||
|
|
||||||
const LOGBOOK_LIVE_BAND_LIVE_MODE = "0";
|
const LOGBOOK_LIVE_BAND_LIVE_MODE = "0";
|
||||||
|
|
|
@ -15,7 +15,7 @@ function processRosterHunting(callRoster, rosterSettings, awardTracker)
|
||||||
|
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
const currentYearSuffix = `’${currentYear - 2000}`;
|
const currentYearSuffix = `’${currentYear - 2000}`;
|
||||||
const potaEnabled = (window.opener.g_potaEnabled === 1);
|
const potaEnabled = (window.opener.g_appSettings.potaEnabled === 1);
|
||||||
// TODO: Hunting results might be used to filter, based on the "Callsigns: Only Wanted" option,
|
// TODO: Hunting results might be used to filter, based on the "Callsigns: Only Wanted" option,
|
||||||
// so maybe we can move this loop first, and add a check to the filtering loop?
|
// so maybe we can move this loop first, and add a check to the filtering loop?
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ function renderRoster(callRoster, rosterSettings)
|
||||||
columnOverrides.LoTW = false;
|
columnOverrides.LoTW = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.opener.g_potaEnabled === 1)
|
if (window.opener.g_appSettings.potaEnabled === 1)
|
||||||
{
|
{
|
||||||
huntingMatrixPotaDiv.style.display = "";
|
huntingMatrixPotaDiv.style.display = "";
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue