From 220fc036b8b6d200ffbe79a5e293770b9a17d88c Mon Sep 17 00:00:00 2001 From: nr0q Date: Tue, 19 Oct 2021 20:57:05 -0500 Subject: [PATCH] refactor chat css into it's own css file, fix linting in gt.js start adding i18n in chat and bandactivity htmls --- package.nw/GridTracker.html | 8 +-- package.nw/gt_bandactivity.html | 4 +- package.nw/gt_chat.html | 111 +------------------------------- package.nw/lib/chat.css | 106 ++++++++++++++++++++++++++++++ package.nw/lib/gt.js | 16 ++--- 5 files changed, 121 insertions(+), 124 deletions(-) create mode 100644 package.nw/lib/chat.css diff --git a/package.nw/GridTracker.html b/package.nw/GridTracker.html index d5bcb97..0ad6c6d 100644 --- a/package.nw/GridTracker.html +++ b/package.nw/GridTracker.html @@ -31,7 +31,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - GridTracker + GridTracker @@ -46,12 +46,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - + diff --git a/package.nw/gt_bandactivity.html b/package.nw/gt_bandactivity.html index 8860a1c..48e6fd8 100644 --- a/package.nw/gt_bandactivity.html +++ b/package.nw/gt_bandactivity.html @@ -16,7 +16,7 @@ - Band Activity + Band Activity @@ -70,7 +70,7 @@ " title="PSK-Reporter Band Activity" > -
+

...no data yet...
 
diff --git a/package.nw/gt_chat.html b/package.nw/gt_chat.html index e5fd301..575049e 100644 --- a/package.nw/gt_chat.html +++ b/package.nw/gt_chat.html @@ -15,117 +15,10 @@ --> - Off-Air Message Service (OAMS) + Off-Air Message Service (OAMS) - + diff --git a/package.nw/lib/chat.css b/package.nw/lib/chat.css new file mode 100644 index 0000000..8955016 --- /dev/null +++ b/package.nw/lib/chat.css @@ -0,0 +1,106 @@ +table, +th, +td, +body, +input { + color: #fff; + white-space: nowrap; + font-family: Sans-Serif; + font-size: 13px; + text-align: auto; + } + .boxDisplay { + margin: 1px; + padding: 2px; + border-width: 2px; + border-color: #aaa; + border-style: inset; + vertical-align: top; + -webkit-border-radius: 4px; + } + textarea { + width: 100%; + resize: none; + font-size: 15px; + } + .self { + color: #ffff00; + font-weight: bold; + } + .them { + color: #00ffff; + font-weight: bold; + } + .system { + color: #ff0000; + font-weight: bold; + } + .when { + color: #777777; + font-size: 12px; + } + .msgText { + color: #eeeeee; + font-size: 15px; + } + .msgTextUnicode { + color: #eeeeee; + font-size: 15px; + } + + body { + background-image: url(img/gridtracker10.png); + background-repeat: no-repeat; + background-attachment: fixed; + background-position: center; + } + #callsign { + color: #00ffff; + font-weight: bold; + } + #country, + #dxcc { + color: #ffff00; + font-weight: bold; + } + #grid { + color: orange; + font-weight: bold; + } + #band { + color: #009900; + font-weight: bold; + } + #mode { + color: #ee0000; + font-weight: bold; + } + + .rosterOn { + color: #ffffff; + } + + .rosterOff { + color: #777777; + } + + .imgGray { + -webkit-filter: grayscale(1); /* Google Chrome, Safari 6+ & Opera 15+ */ + } + + .imgNoFilter { + } + + input:focus, + textarea:focus, + select:focus { + outline: none; + } + + table { + border-collapse: collapse; + } + + tr:hover td { + box-shadow: inset 0px 11px 6px -8px #888, inset 0px -11px 6px -8px #888; + } \ No newline at end of file diff --git a/package.nw/lib/gt.js b/package.nw/lib/gt.js index ba163a6..b03b996 100644 --- a/package.nw/lib/gt.js +++ b/package.nw/lib/gt.js @@ -5,7 +5,6 @@ const pjson = require("./package.json"); var gtVersion = parseInt(pjson.version.replace(/\./g, "")); var gtBeta = pjson.betaVersion; - var g_startVersion = 0; if (typeof localStorage.currentVersion != "undefined") { g_startVersion = localStorage.currentVersion; } @@ -13650,10 +13649,12 @@ function startupVersionInit() function loadi18n() { - $.i18n().load( { - en: 'i18n/en.json', - es: 'i18n/es.json' - } ); + $.i18n().load( + { + en: "i18n/en.json", + es: "i18n/es.json" + } + ); } function startupButtonsAndInputs() @@ -13748,8 +13749,7 @@ function postInit() function renderI18n() { - $('body').i18n(); - + $("body").i18n(); } document.addEventListener("dragover", function (event) @@ -13765,7 +13765,7 @@ document.addEventListener("drop", function (event) var g_startupTable = [ [startupVersionInit, "Completed Version Check"], - [loadi18n,"Loading Locale"], + [loadi18n, "Loading Locale"], [qsoBackupFileInit, "QSO Backup Initialized"], [callsignServicesInit, "Callsign Services Initialized"], [loadMapSettings, "Map Settings Initialized"],