Tickets 5, 54, 4, 30

merge-requests/45/merge
Tag 2021-01-02 13:24:12 -08:00
rodzic ea6ff3b2a6
commit 289dc18c57
8 zmienionych plików z 441 dodań i 216 usunięć

Wyświetl plik

@ -88,7 +88,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<td>Legend</td>
<td>
<div
id="qsoDiv"
id="LegendDivQSO"
title="Grids with worked station(s) by you"
style="
padding-top: 2px;
@ -104,7 +104,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
<td>
<div
id="qslDiv"
id="LegendDivQSL"
title="Grids with confirmed station(s) by you"
style="
padding-top: 2px;
@ -122,14 +122,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<tr>
<td>
<div
id="deDiv"
id="LegendDivQSX"
title="Grids with station(s) communicating with stations other than you"
style="
padding-top: 2px;
border: 2px solid #0000ff;
border: 2px solid #000000;
width: 42px;
height: 16px;
background-color: #000088;
color:#eee;
"
>
QSX
@ -137,11 +138,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
<td>
<div
id="cxDiv"
id="LegendDivCQ"
title="Grids with station(s) calling CQ"
style="
padding-top: 2px;
border: 2px solid #008888;
border: 2px solid #000000;
width: 42px;
height: 16px;
background-color: #00ff00;
@ -153,14 +154,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
<td>
<div
id="cqdxDiv"
id="LegendDivCQDX"
title="Grids with station(s) calling CQ distance"
style="
padding-top: 2px;
border: 2px solid #008888;
border: 2px solid #000000;
width: 42px;
height: 16px;
background-color: cyan;
background-color: #00FFFF;
color: #000;
"
>
@ -171,7 +172,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<tr>
<td>
<div
id="qrzDiv"
id="LegendDivQRZ"
title="Grids with station(s) calling you!"
style="
padding-top: 2px;
@ -187,7 +188,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
<td>
<div
id="dxDiv"
id="LegendDivQTH"
title="Your home grid square!"
style="
padding-top: 2px;
@ -203,11 +204,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</td>
<td>
<div
id="wsprDiv"
id="LegendDivWSPR"
title="WSPR Stations"
style="
padding-top: 2px;
border: 2px solid grey;
border: 2px solid black;
width: 42px;
height: 16px;
font-weight: bold;
@ -1096,27 +1097,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class="roundBorder"
>
<div class="settingstab">
<button id="generalbut" class="settingsTablinks active" onclick="openSettingsTab(event, 'udpSettingsDiv')">
General
</button>
<button id="lookupbut" class="settingsTablinks" onclick="openSettingsTab(event, 'lookupsSettingsDiv')">
Lookups
</button>
<button id="generalbut" class="settingsTablinks active" onclick="openSettingsTab(event, 'udpSettingsDiv')">General</button>
<button id="lookupbut" class="settingsTablinks" onclick="openSettingsTab(event, 'lookupsSettingsDiv')">Lookups</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'SpeechSettingsDiv')">Audio</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'mapSettingsDiv')">Map</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'logSettingsDiv');">Logging</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'gridSettingsDiv')">Grids</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'logSettingsDiv')">Logging</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'alertsDiv')">Alerts</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'callRosterDiv')">Call Roster</button>
<button class="settingsTablinks" onclick="openSettingsTab(event, 'chatSettingsDiv')">OAMS</button>
<button id="logbut" class="settingsTablinks" onclick="openSettingsTab(event, 'logbookSettingsDiv')">
Logbook
</button>
<button id="updatebut" class="settingsTablinks" onclick="openSettingsTab(event, 'updateSettingsDiv')">
Update
</button>
<button class="settingsTablinks" style="margin-right: 25px" onclick="openSettingsTab(event, 'aboutDiv')">
About
</button>
<button id="logbut" class="settingsTablinks" onclick="openSettingsTab(event, 'logbookSettingsDiv')">Logbook</button>
<button id="updatebut" class="settingsTablinks" onclick="openSettingsTab(event, 'updateSettingsDiv')">Update</button>
<button class="settingsTablinks" style="margin-right: 25px" onclick="openSettingsTab(event, 'aboutDiv')">About</button>
</div>
<div id="udpSettingsDiv" class="settingsTabcontent" style="display: block">
<table align="center">
@ -1742,6 +1734,200 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</div>
</div>
</div>
<div id="gridSettingsDiv" class="settingsTabcontent">
<div class="mapItem"style="padding:10px;">
<div class="mapItem" style="height:49px;">
<table align="center">
<tr align="center">
<td align="center"><b><i>Gridsquare Colors</i></b>
</tr>
<tr align="center">
<td title="Reset Gridsquare Colors To Default">
<div class="button" onclick="resetLegendColors()">Reset Colors</div>
</td>
</tr>
</table>
</div>
<div class="mapItem" id="QSOgridDiv" >
<table align="center">
<tr align="center">
<td align="center"><b>QSO / Worked</b></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="color" id="QSOgridValue" value="#000000" oninput="changeLegendColor(this)" />
</td>
</tr>
</table>
</div>
<div class="mapItem" id="QSLgridDiv" >
<table align="center">
<tr align="center">
<td align="center"><b>QSL / Confirmed</b></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="color" id="QSLgridValue" value="#000000" oninput="changeLegendColor(this)" />
</td>
</tr>
</table>
</div>
<div class="mapItem" id="QSXgridDiv" >
<table align="center">
<tr align="center">
<td align="center"><b>QSX / Station-2-Station</b></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="color" id="QSXgridValue" value="#000000" oninput="changeLegendColor(this)" />
</td>
</tr>
</table>
</div>
<br />
<div class="mapItem" id="CQgridDiv" >
<table align="center">
<tr align="center">
<td align="center"><b>'CQ' Stations</b></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="color" id="CQgridValue" value="#000000" oninput="changeLegendColor(this)" />
</td>
</tr>
</table>
</div>
<div class="mapItem" id="CQDXgridDiv" >
<table align="center">
<tr align="center">
<td align="center"><b>'CQ DX' Stations</b></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="color" id="CQDXgridValue" value="#000000" oninput="changeLegendColor(this)" />
</td>
</tr>
</table>
</div>
<div class="mapItem" id="QRZgridDiv" >
<table align="center">
<tr align="center">
<td align="center"><b>QRZ / Your Traffic</b></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="color" id="QRZgridValue" value="#000000" oninput="changeLegendColor(this)" />
</td>
</tr>
</table>
</div>
<div class="mapItem" id="QTHgridDiv" >
<table align="center">
<tr align="center">
<td align="center"><b>QTH / Home Gridsquare</b></td>
</tr>
<tr align="center">
<td colspan="2">
<input type="color" id="QTHgridValue" value="#000000" oninput="changeLegendColor(this)" />
</td>
</tr>
</table>
</div>
</div>
<br />
<br />
<div class="mapItem">
<table align="center">
<tr>
<td title="Place RX Spots over Grid Layer">PSK-Spots Over Grids</td>
</tr>
<tr>
<td title="Place RX Spots over Grid Layer">
<input type="checkbox" id="spotMergeValue" onclick="changeSpotValues();redrawSpots();" />
</td>
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
<td align="center">Grid Opacity</td>
<td align="left" id="showOpacityTd">10%</td>
</tr>
<tr align="center">
<td colspan="2">
<input
type="range"
min="16"
max="255"
value="136"
step="1"
class="slider"
id="opacityValue"
oninput="changeGridOpacity()"
onkeyup="redrawGrids()"
onmouseup="redrawGrids()"
/>
</td>
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
<td align="center">Split QSL Grids</td>
</tr>
<tr align="center">
<td title="Toggle Split QSL Grids with Live Grids">
<input type="checkbox" id="splitQSLValue" onclick="changeSplitQSL()" />
</td>
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
<td align="center">Auto Mouseover Grids</td>
</tr>
<tr align="center">
<td title="Toggle Auto Mouseover Grid Tables">
<input type="checkbox" id="mouseOverValue" onclick="changeMouseOverValue()" />
</td>
</tr>
</table>
</div>
<br/>
<div class="mapItem" id="decayRateDiv">
<table align="center">
<tr align="center">
<td align="center">Live Grid Decay</td>
</tr>
<tr>
<td align="center" id="decayRateTd">10m</td>
</tr>
<tr align="center">
<td colspan="2">
<input
type="range"
min="0"
max="86400"
value="600"
step="60"
class="slider"
id="gridDecay"
oninput="changeGridDecay()"
onkeyup="redrawGrids()"
onmouseup="redrawGrids()"
/>
</td>
</tr>
</table>
</div>
</div>
<div
id="mapSettingsDiv"
class="settingsTabcontent"
@ -1786,27 +1972,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
</table>
</div>
<div class="mapItem" id="decayRateDiv">
<div class="mapItem">
<table align="center">
<tr align="center">
<td align="center">Live Grid Decay</td>
<tr>
<td align="center" colspan="2">Map Settings Transparency</td>
</tr>
<tr>
<td align="center" id="decayRateTd">10m</td>
<td align="center" id="mapTransTd">50%</td>
</tr>
<tr align="center">
<td colspan="2">
<input
type="range"
min="0"
max="86400"
value="600"
step="60"
max="1"
value="0.5"
step="0.01"
class="slider"
id="gridDecay"
oninput="changeGridDecay()"
onkeyup="redrawGrids()"
onmouseup="redrawGrids()"
id="mapTransValue"
oninput="mapTransChange();"
/>
</td>
</tr>
@ -1942,56 +2126,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
<td align="center">Grid Opacity</td>
<td align="left" id="showOpacityTd">10%</td>
</tr>
<tr align="center">
<td colspan="2">
<input
type="range"
min="16"
max="255"
value="136"
step="1"
class="slider"
id="opacityValue"
oninput="changeGridOpacity()"
onkeyup="redrawGrids()"
onmouseup="redrawGrids()"
/>
</td>
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
<td align="center">Split QSL Grids</td>
</tr>
<tr align="center">
<td title="Toggle Split QSL Grids with Live Grids">
<input type="checkbox" id="splitQSLValue" onclick="changeSplitQSL()" />
</td>
</tr>
</table>
</div>
<br />
<div class="mapItem">
<table align="center">
<tr>
<td align="center">Grid Mouse-Over Tables</td>
</tr>
<tr align="center">
<td title="Toggle Grid Mouse-Over Tables">
<input type="checkbox" id="mouseOverValue" onclick="changeMouseOverValue()" />
</td>
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
@ -2016,6 +2150,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
</table>
</div>
<br />
<div class="mapItem">
<table align="center">
<tr>
@ -2028,7 +2163,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
</table>
</div>
<br />
<div class="mapItem">
<table align="center">
<tr>
@ -2066,18 +2200,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
<td title="Place RX Spots over Grid Layer">PSK-Spots Over Grids</td>
</tr>
<tr>
<td title="Place RX Spots over Grid Layer">
<input type="checkbox" id="spotMergeValue" onclick="changeSpotValues();redrawSpots();" />
</td>
</tr>
</table>
</div>
<div class="mapItem" id="spotPathsDiv">
<table align="center">
<tr>
@ -2090,7 +2212,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
</table>
</div>
<br />
<br />
<div class="mapItem" id="spotPathWidthDiv">
<table align="center">
<tr>
@ -2115,30 +2237,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</tr>
</table>
</div>
<div class="mapItem">
<table align="center">
<tr>
<td align="center" colspan="2">Map Settings Transparency</td>
</tr>
<tr>
<td align="center" id="mapTransTd">50%</td>
</tr>
<tr align="center">
<td colspan="2">
<input
type="range"
min="0"
max="1"
value="0.5"
step="0.01"
class="slider"
id="mapTransValue"
oninput="mapTransChange();"
/>
</td>
</tr>
</table>
</div>
<br />
<div class="mapItem">
<table align="center">
<tr>

Wyświetl plik

@ -268,21 +268,17 @@
}
function makeCallsignRow(callObj, show) {
var oldRow = document.getElementById(callObj.cid);
let oldRow = document.getElementById(callObj.cid);
if (!oldRow) {
var newCall = callObj.call.formatCallsign();
var x;
for (
x = 0;
x < allCallTable.rows.length && newCall.localeCompare(allCallTable.rows[x].cells[0].innerHTML) != -1;
x++
) {
let newCall = callObj.call.formatCallsign();
let x = 0;
for (x = 0; x < allCallTable.rows.length && newCall > allCallTable.rows[x].cells[0].innerHTML; x++)
{
// just count
}
var row = allCallTable.insertRow(x);
let row = allCallTable.insertRow(x);
row.id = callObj.cid;
row.style.cursor = "pointer";
@ -290,7 +286,7 @@
row.onclick = openIdCid;
row.oncontextmenu = openLookupCid;
var td = row.insertCell();
let td = row.insertCell();
td.className = callObj.live == false ? "rosterOff" : "rosterOn";
td.innerHTML = newCall;
@ -298,7 +294,7 @@
td.onmouseout = onNoHoverCid;
if (callObj.dxcc > 0 && callObj.dxcc in window.opener.g_dxccToGeoData) {
var imgClass = callObj.live == false ? "imgGray" : "imgNoFilter";
let imgClass = callObj.live == false ? "imgGray" : "imgNoFilter";
td = row.insertCell();
td.innerHTML =
"<img class='" +
@ -313,11 +309,11 @@
}
function showAllCallsigns() {
var count = 0;
for (var x in window.opener.g_gtFlagPins) {
var obj = window.opener.g_gtFlagPins[x];
let count = 0;
for (let x in window.opener.g_gtFlagPins) {
let obj = window.opener.g_gtFlagPins[x];
if (obj.call != "" && obj.call != "NOCALL" && obj.canmsg == true) {
var show = true;
let show = true;
try {
if (searchBox.value.length > 0 && !obj.call.match(searchBox.value)) {
show = false;

Wyświetl plik

@ -848,6 +848,7 @@ function adifNicknameCheckBoxChanged(what)
function adifTextValueChange(what)
{
what.value = what.value.trim();
g_adifLogSettings.text[what.id] = what.value;
localStorage.adifLogSettings = JSON.stringify(g_adifLogSettings);
}
@ -1760,6 +1761,7 @@ function sendToLogger(ADIF)
record.DXCC = String(dxcc);
}
// Tag: This is going to bite us in the butt later, but leaving it alone.
if (!("COUNTRY" in record) && Number(record.DXCC) > 0)
{
record.COUNTRY = g_dxccToADIFName[Number(record.DXCC)];
@ -2070,13 +2072,11 @@ function eqslCallback(buffer, flag)
logeQSLQSOCheckBox.checked = false;
adifLogQsoCheckBoxChanged(logeQSLQSOCheckBox);
}
else if (result.indexOf("Your ADIF log file has been built") != -1)
else if (result.indexOf("Your ADIF log file has been built") > -1 || result.indexOf("You have no log entries") > -1)
{
eQSLTestResult.innerHTML = "Passed";
}
else if (
result.indexOf("specify the desired User by using the QTHNickname") != -1
)
else if (result.indexOf("specify the desired User by using the QTHNickname") != -1)
{
eQSLTestResult.innerHTML = "QTH Nickname<br/>Needed";
}

Wyświetl plik

@ -26,7 +26,8 @@ var validSettings = [
"speechSettings",
"startupLogs",
"trustedQslSettings",
"screenSettings"
"screenSettings",
"legendColors"
];
var def_appSettings = {
@ -52,7 +53,7 @@ var def_appSettings = {
lookupLoginQrz: "",
lookupLoginQth: "",
lookupOnTx: false,
lookupCloseLog: true,
lookupCloseLog: false,
lookupMerge: true,
lookupMissingGrid: false,
lookupPasswordCq: "",
@ -194,7 +195,7 @@ var def_receptionSettings = {
pathColor: -1,
pathNightColor: 361,
spotWidth: 0.8,
mergeSpots: false
mergeSpots: true
};
var def_N1MMSettings = {
@ -247,3 +248,13 @@ var def_bandActivity = {
lastUpdate: {},
lines: {}
};
var def_legendColors = {
QSO: "#EEEE00",
QSL: "#EE0000",
QSX: "#1111EE",
CQ: "#00FF00",
CQDX: "#00FFFF",
QRZ: "#FFFF00",
QTH: "#FFA600"
};

Wyświetl plik

@ -61,6 +61,7 @@ var g_baWindowHandle = null;
var g_appSettings = {};
var g_mapSettings = {};
var g_legendColors = {};
var g_adifLogSettings = {};
var g_msgSettings = {};
var g_receptionSettings = {};
@ -108,6 +109,7 @@ function loadAllSettings()
g_appSettings = loadDefaultsAndMerge("appSettings", def_appSettings);
g_mapSettings = loadDefaultsAndMerge("mapSettings", def_mapSettings);
g_legendColors = loadDefaultsAndMerge("legendColors", def_legendColors);
g_adifLogSettings = loadDefaultsAndMerge(
"adifLogSettings",
def_adifLogSettings
@ -220,6 +222,11 @@ function saveMapSettings()
localStorage.mapSettings = JSON.stringify(g_mapSettings);
}
function saveLegendColors()
{
localStorage.legendColors = JSON.stringify(g_legendColors);
}
function saveStartupLogs()
{
localStorage.startupLogs = JSON.stringify(g_startupLogs);
@ -290,6 +297,7 @@ function saveAndCloseApp()
saveAppSettings();
saveMapSettings();
saveLegendColors();
try
{
@ -403,7 +411,7 @@ var g_ignoreMessages = 0;
var g_lastTimeSinceMessageInSeconds = timeNowSec();
var g_loadQSOs = false;
var g_fromDirectCallNoFileDialog = false;
var g_qsoWorkedBorderColor = "#222222FF";
var g_mainBorderColor = "#222222FF";
var g_pushPinMode = false;
var g_pskBandActivityTimerHandle = null;
var g_workingIniPath = "";
@ -2254,10 +2262,19 @@ function openConditionsWindow()
{
try
{
g_conditionsWindowHandle.window.g_isShowing = true;
g_conditionsWindowHandle.window.saveScreenSettings();
g_conditionsWindowHandle.show();
g_conditionsWindowHandle.focus();
if (g_conditionsWindowHandle.window.g_isShowing == false)
{
g_conditionsWindowHandle.window.g_isShowing = true;
g_conditionsWindowHandle.window.saveScreenSettings();
g_conditionsWindowHandle.show();
g_conditionsWindowHandle.focus();
}
else
{
g_conditionsWindowHandle.window.g_isShowing = false;
g_conditionsWindowHandle.window.saveScreenSettings();
g_conditionsWindowHandle.hide();
}
}
catch (e) {}
}
@ -2335,11 +2352,20 @@ function openCallRosterWindow(show = true)
{
try
{
g_callRosterWindowHandle.show();
g_callRosterWindowHandle.window.g_isShowing = true;
g_callRosterWindowHandle.window.saveScreenSettings();
g_callRosterWindowHandle.focus();
goProcessRoster();
if (g_callRosterWindowHandle.window.g_isShowing == false)
{
g_callRosterWindowHandle.show();
g_callRosterWindowHandle.window.g_isShowing = true;
g_callRosterWindowHandle.window.saveScreenSettings();
g_callRosterWindowHandle.focus();
goProcessRoster();
}
else
{
g_callRosterWindowHandle.window.g_isShowing = false;
g_callRosterWindowHandle.window.saveScreenSettings();
g_callRosterWindowHandle.hide();
}
}
catch (e) {}
}
@ -2408,10 +2434,19 @@ function openStatsWindow(show = true)
{
try
{
g_statsWindowHandle.show();
g_statsWindowHandle.window.g_isShowing = true;
g_statsWindowHandle.window.saveScreenSettings();
g_statsWindowHandle.focus();
if (g_statsWindowHandle.window.g_isShowing == false)
{
g_statsWindowHandle.show();
g_statsWindowHandle.window.g_isShowing = true;
g_statsWindowHandle.window.saveScreenSettings();
g_statsWindowHandle.focus();
}
else
{
g_statsWindowHandle.window.g_isShowing = false;
g_statsWindowHandle.window.saveScreenSettings();
g_statsWindowHandle.hide();
}
}
catch (e) {}
}
@ -2452,11 +2487,21 @@ function showMessaging(show = true, cid)
{
try
{
g_chatWindowHandle.window.g_isShowing = true;
g_chatWindowHandle.window.saveScreenSettings();
g_chatWindowHandle.show();
g_chatWindowHandle.focus();
if (typeof cid != "undefined") g_chatWindowHandle.window.openId(cid);
if (g_chatWindowHandle.window.g_isShowing == false)
{
g_chatWindowHandle.window.g_isShowing = true;
g_chatWindowHandle.window.saveScreenSettings();
g_chatWindowHandle.show();
g_chatWindowHandle.focus();
if (typeof cid != "undefined") g_chatWindowHandle.window.openId(cid);
}
else
{
g_chatWindowHandle.window.g_isShowing = false;
g_chatWindowHandle.window.saveScreenSettings();
g_chatWindowHandle.window.closeMessageArea();
g_chatWindowHandle.hide();
}
}
catch (e) {}
}
@ -3914,21 +3959,19 @@ function qthToQsoBox(
{
if (g_appSettings.gridViewMode == 1) return null;
var borderColor = "#222288FF";
var boxColor = "#0000FF" + g_gridAlpha;
var borderColor = g_mainBorderColor;
var boxColor = g_legendColors.QSX + g_gridAlpha;
var borderWeight = 0.5;
var myDEzOffset = 10;
var myDEbox = false;
if (worked)
{
boxColor = "#FFFF00" + g_gridAlpha;
borderColor = g_qsoWorkedBorderColor;
boxColor = g_legendColors.QSO + g_gridAlpha;
}
if (confirmed)
{
boxColor = "#FF0000" + g_gridAlpha;
borderColor = g_qsoWorkedBorderColor;
boxColor = g_legendColors.QSL + g_gridAlpha;
}
if (wspr != null)
{
@ -4064,7 +4107,7 @@ function qthToQsoBox(
if (worked && !rect.rectangle.worked) rect.rectangle.worked = worked;
if (confirmed && !rect.rectangle.confirmed)
{ rect.rectangle.confirmed = confirmed; }
borderColor = g_qsoWorkedBorderColor;
borderColor = g_mainBorderColor;
if (myDEbox) borderWeight = 1;
zIndex = 2;
if (rect.rectangle.size == 6)
@ -4095,47 +4138,39 @@ function qthToBox(iQTH, iDEcallsign, iCQ, iNew, locked, DE, band, wspr, hash)
{
if (g_appSettings.gridViewMode == 2) return null;
var borderColor = "#222288FF";
var boxColor = "#1111FF" + g_gridAlpha;
var borderColor = g_mainBorderColor;
var boxColor = g_legendColors.QSX + g_gridAlpha;
var borderWeight = 0.5;
var myDEzOffset = 0;
var myDEbox = false;
if (iCQ && iNew)
if (iCQ)
{
borderColor = "#008888FF";
boxColor = "#00FF00" + g_gridAlpha;
}
else if (iCQ && !iNew)
{
borderColor = "#FFFF00FF";
boxColor = "#FFFF00" + g_gridAlpha;
boxColor = g_legendColors.CQ + g_gridAlpha;
}
if (DE == myDEcall)
{
borderColor = "#FF0000FF";
boxColor = "#FFFF00" + g_gridAlpha;
boxColor = g_legendColors.QRZ + g_gridAlpha;
borderWeight = 1.0;
myDEzOffset = 20;
myDEbox = true;
}
if (DE.indexOf("CQ DX") > -1)
{
borderColor = "#008888FF";
boxColor = "#00FFFF" + g_gridAlpha;
boxColor = g_legendColors.CQDX + g_gridAlpha;
}
if (locked)
{
boxColor = "#FFA500" + g_gridAlpha;
boxColor = g_legendColors.QTH + g_gridAlpha;
borderColor = "#000000FF";
borderOpacity = 1;
}
if (wspr != null)
{
boxColor = "hsl(" + wspr + ",100%,50%)";
borderColor = "gray";
// borderWeight = 1;
}
var zIndex = 2;
var returnRectangle = null;
@ -12771,6 +12806,56 @@ function changeMapValues()
displayLegend();
}
function setLegendColor(name, newColor)
{
let legendBox = document.getElementById("LegendDiv" + name);
legendBox.style.backgroundColor = newColor;
legendBox.style.color = pickTextColorBasedOnBgColorAdvanced(newColor, "#EEEEEE", "#222222");
}
function setLegendGrid(name, newColor)
{
document.getElementById(name + "gridValue").value = newColor;
}
function setLegendAndGridSettings()
{
for (let key in g_legendColors)
{
setLegendColor(key, g_legendColors[key]);
setLegendGrid(key, g_legendColors[key]);
}
}
function resetLegendColors()
{
for (let key in def_legendColors)
{
g_legendColors[key] = def_legendColors[key];
}
setLegendAndGridSettings();
saveLegendColors();
redrawGrids();
}
var g_redrawFromLegendTimeoutHandle = null;
function changeLegendColor(source)
{
let newColor = source.value;
let name = source.id.replace("gridValue", "");
setLegendColor(name, newColor);
g_legendColors[name] = newColor;
if (g_redrawFromLegendTimeoutHandle != null)
{
clearTimeout(g_redrawFromLegendTimeoutHandle);
}
g_redrawFromLegendTimeoutHandle = setTimeout(redrawGrids, 500);
}
function toggleLegend()
{
if (g_mapSettings.legend == true) g_mapSettings.legend = false;
@ -13055,6 +13140,7 @@ function loadViewSettings()
spotPathChange();
setRosterTimeView();
setLegendAndGridSettings();
}
function loadMsgSettings()
@ -15302,8 +15388,7 @@ function purgeUserFiles(userDir, systemDir)
function mediaCheck()
{
var homeDir =
g_platform == "windows" ? process.env.USERPROFILE : process.env.HOME;
var homeDir = (g_platform == "windows") ? process.env.USERPROFILE : process.env.HOME;
g_appData = path.join(homeDir, "Dokumente");
if (!is_dir(g_appData))
@ -15773,25 +15858,25 @@ function createSpot(report, key, fromPoint, addToLayer = true)
}
function redrawSpots()
{
var shouldSave = false;
var now = timeNowSec();
let shouldSave = false;
let now = timeNowSec();
g_spotTotalCount = 0;
g_layerSources["psk-spots"].clear();
g_layerSources["psk-flights"].clear();
g_layerSources["psk-hop"].clear();
g_layerSources["psk-heat"].clear();
var fromPoint = getPoint(myRawGrid);
let fromPoint = getPoint(myRawGrid);
if (g_receptionSettings.mergeSpots == false)
{
var spot = iconFeature(fromPoint, g_gtFlagIcon, 100);
let spot = iconFeature(fromPoint, g_gtFlagIcon, 100);
g_layerSources["psk-spots"].addFeature(spot);
g_layerSources["psk-heat"].addFeature(spot);
}
for (var key in g_receptionReports.spots)
for (let key in g_receptionReports.spots)
{
report = g_receptionReports.spots[key];
@ -15835,10 +15920,8 @@ var g_spotNightFlightColor = "#FFFFFFBB";
function changeSpotValues()
{
g_receptionSettings.viewHistoryTimeSec =
parseInt(spotHistoryTimeValue.value) * 60;
spotHistoryTimeTd.innerHTML =
"Max Age: " + Number(g_receptionSettings.viewHistoryTimeSec).toDHM();
g_receptionSettings.viewHistoryTimeSec = parseInt(spotHistoryTimeValue.value) * 60;
spotHistoryTimeTd.innerHTML = "Max Age: " + Number(g_receptionSettings.viewHistoryTimeSec).toDHM();
g_receptionSettings.viewPaths = spotPathsValue.checked;
if (g_receptionSettings.viewPaths)
@ -15862,21 +15945,19 @@ function mapTransChange()
{
g_mapSettings.mapTrans = mapTransValue.value;
mapTransTd.innerHTML =
String(100 - parseInt(((g_mapSettings.mapTrans * 255) / 255) * 100)) + "%";
mapSettingsDiv.style.backgroundColor =
"rgba(0,0,0, " + g_mapSettings.mapTrans + ")";
mapTransTd.innerHTML = String(100 - parseInt(((g_mapSettings.mapTrans * 255) / 255) * 100)) + "%";
mapSettingsDiv.style.backgroundColor = "rgba(0,0,0, " + g_mapSettings.mapTrans + ")";
}
function spotPathChange()
{
g_receptionSettings.pathColor = spotPathColorValue.value;
var pathColor =
g_receptionSettings.pathColor < 1
? "#000"
: g_receptionSettings.pathColor == 361
? "#FFF"
: "hsl(" + g_receptionSettings.pathColor + ", 100%, 50%)";
var pathColor = g_receptionSettings.pathColor < 1
? "#000"
: g_receptionSettings.pathColor == 361
? "#FFF"
: "hsl(" + g_receptionSettings.pathColor + ", 100%, 50%)";
if (g_receptionSettings.pathColor > 0)
{
spotPathColorDiv.style.color = "#000";

Wyświetl plik

@ -64,11 +64,11 @@ function gtConnectChat()
return;
}
var rnd = parseInt(Math.random() * 10) + 18260;
var rnd = parseInt(Math.random() * 10) + 18360;
try
{
g_gtState = ChatState.connecting;
g_gtChatSocket = new WebSocket("wss://tagloomis.com:" + rnd);
g_gtChatSocket = new WebSocket("ws://oams.space:" + rnd);
}
catch (e)
{
@ -234,6 +234,7 @@ function gtChatSendStatus()
msg.freq = myRawFreq;
msg.mode = myMode;
msg.band = myBand;
msg.src = "GT";
msg.canmsg = g_appSettings.gtMsgEnable == true;
msg.o = g_appSettings.gtSpotEnable == true ? 1 : 0;
msg = JSON.stringify(msg);
@ -323,6 +324,7 @@ function gtChatUpdateCall(jsmesg)
g_gtFlagPins[cid].freq = jsmesg.freq;
g_gtFlagPins[cid].band = jsmesg.band;
g_gtFlagPins[cid].mode = jsmesg.mode;
g_gtFlagPins[cid].src = jsmesg.src;
g_gtFlagPins[cid].canmsg = jsmesg.canmsg;
g_gtFlagPins[cid].o = jsmesg.o;
g_gtFlagPins[cid].dxcc = callsignToDxcc(jsmesg.call);
@ -441,6 +443,7 @@ function gtChatNewList(jsmesg)
g_gtFlagPins[cid].freq = jsmesg.data.freq[key];
g_gtFlagPins[cid].band = jsmesg.data.band[key];
g_gtFlagPins[cid].mode = jsmesg.data.mode[key];
g_gtFlagPins[cid].src = jsmesg.data.src[key];
g_gtFlagPins[cid].cid = cid;
g_gtFlagPins[cid].canmsg = jsmesg.data.canmsg[key];
g_gtFlagPins[cid].o = jsmesg.data.o[key];

Wyświetl plik

@ -904,3 +904,19 @@ table.bioTable thead th:first-child {
.bioTable tr:hover td {
box-shadow: inset 0px 11px 6px -8px #888, inset 0px -11px 6px -8px #888;
}
input[type="color"] {
-webkit-appearance: none;
border: 2px outset #888;
-webkit-border-radius: 2px;
width: 50px;
height: 25px;
}
input[type="color"]::-webkit-color-swatch-wrapper {
padding: 0;
}
input[type="color"]::-webkit-color-swatch {
border: none;
}

Wyświetl plik

@ -596,3 +596,21 @@ deepmerge.all = function deepmergeAll(array, optionsArgument) {
return deepmerge(prev, next, optionsArgument)
})
}
// https://stackoverflow.com/questions/3942878/how-to-decide-font-color-in-white-or-black-depending-on-background-color
function pickTextColorBasedOnBgColorAdvanced(bgColor, lightColor, darkColor) {
var color = (bgColor.charAt(0) === '#') ? bgColor.substring(1, 7) : bgColor;
var r = parseInt(color.substring(0, 2), 16); // hexToR
var g = parseInt(color.substring(2, 4), 16); // hexToG
var b = parseInt(color.substring(4, 6), 16); // hexToB
var uicolors = [r / 255, g / 255, b / 255];
var c = uicolors.map((col) => {
if (col <= 0.03928) {
return col / 12.92;
}
return Math.pow((col + 0.055) / 1.055, 2.4);
});
var L = (0.2126 * c[0]) + (0.7152 * c[1]) + (0.0722 * c[2]);
return (L > 0.179) ? darkColor : lightColor;
}