From e971078c55de68ead87304e3e387948d3672f4eb Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 12 Feb 2021 18:25:01 -0500 Subject: [PATCH] dark style, thx triptolemus --- .../gr-op25_repeater/www/images/op25-dark.png | Bin 0 -> 3984 bytes op25/gr-op25_repeater/www/www-static/dark.css | 484 ++++++++++++++++++ .../www/www-static/index.html | 104 ++-- op25/gr-op25_repeater/www/www-static/main.css | 24 +- op25/gr-op25_repeater/www/www-static/main.js | 135 ++++- 5 files changed, 678 insertions(+), 69 deletions(-) create mode 100755 op25/gr-op25_repeater/www/images/op25-dark.png create mode 100755 op25/gr-op25_repeater/www/www-static/dark.css mode change 100644 => 100755 op25/gr-op25_repeater/www/www-static/index.html mode change 100644 => 100755 op25/gr-op25_repeater/www/www-static/main.css mode change 100644 => 100755 op25/gr-op25_repeater/www/www-static/main.js diff --git a/op25/gr-op25_repeater/www/images/op25-dark.png b/op25/gr-op25_repeater/www/images/op25-dark.png new file mode 100755 index 0000000000000000000000000000000000000000..484730253923cfea58eda32e518712e9dea415f4 GIT binary patch literal 3984 zcmai13tY=Mi`I2)U3Ae+tZmi5+NHI$QaB_v-E^05Dx53| z(NRehCDjR&og^Wo)@2#GD82v1an53(xe5dV zQ71duZ3n-dz*hiO20x#FTwMo&%&!JKy!qZ#3ZBkkp=ba49P{JfKhRvr5OxTgD6%=1N?3j^s9>C=T z95zD1Nekpe@rnBSAddJ(&If}2U}r~ua~})@T7jUkC=B|~;!FYXU&Iy2-^95g96l#9 zgv0&rz+X&!hySJshVP$M1T^kH2~(;6Tb#xEiyM)A`#oSFz6JF!XZqbhq(=;wiQdkP z)lWXY6|>@N*cI!vG=E|A5H0wyr!*5D*Sxk=q?f2(rDc1=h;K!UTu3C7$5YmUcR;mu4>){iTYd~hY>|*GUnU@>As?ooFINQjmNYJ z22)Jbw+RXYzy!r0Totv8Fx(myjxfa_6rLFURWUk*36lPI7t!Aih*q@T? zPT)_y3hI5`17`p@Owiw_3Ap$^kC<$52=Tyab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00001 diff --git a/op25/gr-op25_repeater/www/www-static/dark.css b/op25/gr-op25_repeater/www/www-static/dark.css new file mode 100755 index 0000000..fbaaf8a --- /dev/null +++ b/op25/gr-op25_repeater/www/www-static/dark.css @@ -0,0 +1,484 @@ +/* + + Copyright 2017, 2018 Max H. Parke KA1RBI + + This file is part of OP25 + + OP25 is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + OP25 is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with OP25; see the file COPYING. If not, write to the Free + Software Foundation, Inc., 51 Franklin Street, Boston, MA + 02110-1301, USA. + +*/ + +body { + + /* color: white; */ + background-color: black; + +} + +#div_help { + + color: #eee; + +} + +a { + + color: #f00; + +} + +#div_status body { + + background-color: black; + font-family: Arial, Helvetica, sans-serif; +} + +#div_status table { + border-collapse: collapse; + font-family: "Courier New", Courier, Monospace; +} + +#div_status th { + + border-style: solid; + padding: 3px; + font-family: Arial, Helvetica, sans-serif; + color: #fff; + font-weight: bold; + background: #669999; /* For browsers that do not support gradients */ + background: linear-gradient(#444, black); +} + +#div_status td { + + border: 1px solid #666; + padding: 3px; + +} + +#div_s2 td { + + border-bottom: 1px solid #888; + border-top: 1px solid #888; + border-left: 0px; + border-right: 0px; + padding: 3px; + background: transparent; +} + +hr { + width: 730px; + float: left; + padding: 0px; +} + + +.control-button { /* skip/hold/lockout buttons */ + + border-color: gray; + height: 42px; + color: yellow; + padding: 10px 10px; + text-decoration: none; + margin: 1px 1px; + cursor: pointer; + width: 100px; + font-size: 14px; + font-weight: bold; + box-shadow: 0 1px 1px 0 rgba(0,0,0,0.2), 0 2px 5px 0 rgba(0,0,0,0.19); + background: #31687e; /* For browsers that do not support gradients */ + background: linear-gradient(#666, black); +} + +.control-button:hover { + + background: linear-gradient(black, silver); +} + +.controlsDisplay { /* holds buttons, and display */ + + width: 730px; + border: 0px solid #aaa; + vertical-align: top; + height: 178px; + padding: 2px; + box-shadow: 0 4px 8px 0 rgba(150,50,0,0.75), 0 3px 10px 0 rgba(0,0,150,0.4); +/* box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19); */ + background: LightGray; /* For browsers that do not support gradients */ + background: linear-gradient(White, Silver); +} + +.controls { /* skip/hold/lockout buttons (1) */ + + border: 1px solid #aaa; + width: 104px; + float: left; + height: 100%; + text-align: center; +} + + +.cfg_list { + + border: 1px solid #000; + padding: 5px; + width: 260px; + +} + +.displaySettings { + + border: 1px solid #000; + padding: 5px; + width: 720px; + +} +.statDisplay { /* main display - freq, sys, tgid (2) */ + + padding: 0px; + width: 522px; + float: left; + position: relative; + display: inline-block; + border: 1px solid #aaa; + height: 100%; + background: LightGray; /* For browsers that do not support gradients */ + background: linear-gradient(#222, Black, #222); +} + +.sysMsg { /* OP25 logo and message box on right (3) */ + + padding: 0px; + /* display: inline-block; */ + float: right; /* works left or right, right gives margin in between this & 2 */ + width: 95px; + height: 100%; + background-color:#060606; + background-image: url("op25-dark.png"); + background-repeat: no-repeat; + background-position: right; + border: 1px solid #aaa; + font-family: Arial, Helvetica, sans-serif; + color: #666; + font-size: 8pt; +} + +div.info { /* main info container for the two tables */ + + width: 730px; + border: 0px solid #a00; + display: inline-block; +} + + +div.system { /* system frequencies container that holds the table */ + + float: left; + width: 48%; + height: auto; + border: 0px solid #d00; +} + +div.adjacent { /* adjacent sites container that holds the table */ + + margin-left: 29px; + float: left; + width: 48%; + height: auto; + border: 0px solid #00f; +} + +/* labels, values, system and tg text */ + +.copyr { + + font-family: Arial, Helvetica, sans-serif; + font-size: 14px; + color: #484848; + float: right; + margin-top: 22px; + margin-right: 4px; +} + +.label { + + font-family: Arial, Helvetica, sans-serif; + color: gray; +} + +.label-hold { + + font-family: Arial, Helvetica, sans-serif; + color: #c00; + font-size: 8pt; + font-weight: bold; + text-align: center; + vertical-align: center; + height: 50%; +} + +.label-sm { + + font-family: Arial, Helvetica, sans-serif; + color: #ccc; + font-size: 8pt; + padding: 2px; +} + +.label-lc { /* Last Command text */ + + font-family: Arial, Helvetica, sans-serif; + color: #aaa; + font-size: 8pt; + padding: 2px; + text-align: center; +} + +.red_value { + + font-family: Arial, Helvetica, sans-serif; + color: #f00000; + font-weight: bold; +} + +.value { + + font-family: Arial, Helvetica, sans-serif; + color: #8f8; + font-weight: bold; +} + +.systgid { /* System and Talkgroup Text */ + + font-family: Arial, Helvetica, sans-serif; + color: #8f8; + font-weight: bold; + font-size: 24px; +} + +.syscrypto { /* alg/key text */ + + font-family: Arial, Helvetica, sans-serif; + color: #f00000; + font-size: 24px; +} + +.boxtitle { + font-weight: bold; + text-align: left; +} + + +.nac { /* the whole NAC string... NAC, freq tsbks, etc. */ + + font-family: Arial, Helvetica, sans-serif; + color: #8f8; + font-weight: bold; + font-size: 20px; + +} + +.s1 { + /* empty */ +} + +.s2 { + border: 0px solid #999; + position: relative; + display: inline-block; + max-height: 112px; + width: 512px; + padding: 5px; + margin: 0 0 0 2px; +} + +.copyright-text { + + font-family: Arial, Helvetica, sans-serif; + color: #eee; +/* font-size: 10pt; */ +} + +.nav-ul { + list-style-type: none; + margin: 0; + padding: 0; + overflow: hidden; + background-color: #bbb; + background: linear-gradient(#111, #222); +} + +.nav-li { + float: left; + border-right: 1px solid #000; + background: linear-gradient(#333, #444); +} + +.nav-li-active { + float: left; + background-color: #000; + color: #0080c0; + border-right: 0px solid #f00; +} + +.nav-bar { + width: 730px; + padding: 0; + border: 1px solid #000; +} + +.nav-button { + background-color: #bbb; + background: linear-gradient(#333, #444); + width: 85px; + color: #ddd; + border: 0px; + padding: 20px; + display: block; + font-size: 14px; + font-weight: bold; +} + +.nav-button-active { + background-color: #666; + background: linear-gradient(#777, #888); + color: #fff; + border: 0px; + padding: 20px; + display: block; + font-size: 14px; + font-weight: bold; +} + +.nav-button:hover { + background-color: #699; + background: linear-gradient(#999, #aaa); + color: #fff; +} + +.nav-button-active:hover { + background-color: #699; + background: linear-gradient(#999, #aaa); +} + +#div_settings table { + border-color: black; +} + +#div_settings tr { + border-top: none; + border-bottom: solid; +} + +#div_settings th.boxtitle-th { + text-align: left; +} + +.div_settings th { + max-width: 75px; + border-style: none; + padding: 3px; + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + color: #000; + background: #eee; + text-align: right; + font-weight: normal; +} + +#div_settings td { + max-width: 75px; + border-style: none; + font-weight: bold; + text-align: right; +} + +#div_settings input[type=text] { + max-width: 75px; + border-top: none; + border-bottom-width: 1px; + border-bottom: dotted; + border-right: none; + border-left: none; + text-align: right; +} + +#div_settings input[type=button] { + max-width: 75px; + padding: 10px; + color: red; + border: 0; +} + +#div_settings select { + max-width: 100px; + padding: 0; + border: 0; +} + +#div_settings option { + max-width: 100px; + padding: 0; + border: 0; +} + +.boxtitle { + text-align: left; +} + +div#cfg_list_area select { + width: 250px; + max-width: 250px; +} + +#div_rx_opts td { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + border-style: none; +} + +#div_rx_opts input[type=text] { + max-width: 75px; + border-top: none; + border-bottom-width: 1px; + border-bottom: dotted; + border-right: none; + border-left: none; + text-align: right; +} + +.help { + max-width: 640px; + font-family: Arial, Helvetica, sans-serif; +} + +.aboutTable { + width: 730px; + border: 1px solid #aaa; + vertical-align: top; + height: 178px; + padding: 2px; + box-shadow: 0 4px 8px 0 rgba(150,50,0,0.75), 0 3px 10px 0 rgba(0,0,150,0.4); +/* box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19); */ + background: LightGray; /* For browsers that do not support gradients */ + background: linear-gradient(Black, #333); +} +} + +.aboutLogo { + background-image: url("op25-dark.png"); +} + diff --git a/op25/gr-op25_repeater/www/www-static/index.html b/op25/gr-op25_repeater/www/www-static/index.html old mode 100644 new mode 100755 index 7db7b70..2eb98b5 --- a/op25/gr-op25_repeater/www/www-static/index.html +++ b/op25/gr-op25_repeater/www/www-static/index.html @@ -1,10 +1,8 @@ - - OP25 - + @@ -15,23 +13,36 @@ - +
-
- + + - +
- -
-
 
+
 
- -
- +
+
+ - - Waiting for data... + Waiting for data...
- +
-

- -
+ + - -
- +
+
- +
+
- +
-

@@ -189,8 +200,6 @@ Before proceeding you will need to know the control channel frequency or frequen   px (default = 24)

Truncate display strings to:   - - characters (default = 30)

Font Style: 
+

+ + + @@ -210,12 +230,12 @@ Before proceeding you will need to know the control channel frequency or frequen

- - Open configuration editor (any previous unsaved work will be lost)
- - Reload selection list -Include old-style trunking TSV files + - Open configuration editor (any previous unsaved work will be lost)
+ - Reload selection list + Include old-style trunking TSV files
- - Run flowgraph using selected configuration
- - End running flowgraph
+ - Run flowgraph using selected configuration
+ - End running flowgraph

diff --git a/op25/gr-op25_repeater/www/www-static/main.css b/op25/gr-op25_repeater/www/www-static/main.css old mode 100644 new mode 100755 index 597d553..2641d7f --- a/op25/gr-op25_repeater/www/www-static/main.css +++ b/op25/gr-op25_repeater/www/www-static/main.css @@ -70,7 +70,7 @@ hr { .control-button { /* skip/hold/lockout buttons */ border-color: gray; - height: 38px; + height: 42px; color: white; padding: 10px 10px; text-decoration: none; @@ -84,6 +84,7 @@ hr { background: linear-gradient(#31687e, #56a0bd); } + .control-button:hover { background: linear-gradient(#56a0bd, #31687e); @@ -289,7 +290,7 @@ div.adjacent { /* adjacent sites container that holds the table */ font-family: Arial, Helvetica, sans-serif; color: #000060; - font-size: 10pt; +/* font-size: 10px; */ } .nav-ul { @@ -324,6 +325,7 @@ div.adjacent { /* adjacent sites container that holds the table */ background-color: #bbb; background: linear-gradient(#bbbbbb, #cccccc); color: #000; + width: 85px; border: 0px; padding: 20px; display: block; @@ -399,7 +401,7 @@ div.adjacent { /* adjacent sites container that holds the table */ #div_settings input[type=button] { max-width: 75px; padding: 10px; - color: blue; + color: red; border: 0; } @@ -444,3 +446,19 @@ div#cfg_list_area select { max-width: 640px; font-family: Arial, Helvetica, sans-serif; } + + +.aboutTable { + width: 730px; + border: 1px solid #aaa; + vertical-align: top; + height: 178px; + padding: 2px; + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 3px 10px 0 rgba(0,0,0,0.19); + background: LightGray; /* For browsers that do not support gradients */ + background: linear-gradient(White, Silver); +} + +.aboutLogo { + background-image: url("op25.png"); +} diff --git a/op25/gr-op25_repeater/www/www-static/main.js b/op25/gr-op25_repeater/www/www-static/main.js old mode 100644 new mode 100755 index 8395a22..9a4a91c --- a/op25/gr-op25_repeater/www/www-static/main.js +++ b/op25/gr-op25_repeater/www/www-static/main.js @@ -2,23 +2,24 @@ // Copyright 2017, 2018 Max H. Parke KA1RBI // // This file is part of OP25 -// +// // OP25 is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. -// +// // OP25 is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public // License for more details. -// +// // You should have received a copy of the GNU General Public License // along with OP25; see the file COPYING. If not, write to the Free // Software Foundation, Inc., 51 Franklin Street, Boston, MA // 02110-1301, USA. -var d_debug = 1; +var d_debug = 0; +var update_interval = 500; // UI update interval, ms (default=1000) var http_req = new XMLHttpRequest(); var counter1 = 0; @@ -80,7 +81,7 @@ function edit_d(d, to_ui) { var hexints = {"nac":1}; var ints = {"if_rate":1, "ppm":1, "rate":1, "offset":1, "nac":1, "logfile-workers":1, "decim-amt":1, "seek":1, "hamlib-model":1 }; var bools = {"active":1, "trunked":1, "rate":1, "offset":1, "phase2_tdma": 1, "phase2-tdma":1, "wireshark":1, "udp-player":1, "audio-if":1, "tone-detect":1, "vocoder":1, "audio":1, "pause":1 }; - var floats = {"costas-alpha":1, "gain-mu":1, "calibration":1, "fine-tune":1, "gain":1, "excess-bw":1, "offset":1, "excess_bw":1} + var floats = {"costas-alpha":1, "gain-mu":1, "calibration":1, "fine-tune":1, "gain":1, "excess-bw":1, "offset":1, "excess_bw":1}; var lists = {"blacklist":1, "whitelist":1, "cclist":1}; var freqs = {"frequency":1, "cclist":1}; @@ -216,8 +217,8 @@ function amend_d(myrow, mytbl, command) { } function nav_update(command) { - var names = ["b1", "b2", "b3", "b4", "b5"]; - var bmap = { "status": "b1", "settings": "b2", "rx": "b3", "help": "b4", "about": "b5" }; + var names = ["b1", "b2", "b3", "b4", "b5", "b7"]; + var bmap = { "status": "b1", "settings": "b2", "rx": "b3", "help": "b4", "view": "b5", "about": "b7" }; var id = bmap[command]; for (var id1 in names) { b = document.getElementById(names[id1]); @@ -277,12 +278,20 @@ function rx_update(d) { } } error_val = d["error"]; + fine_tune = d["fine_tune"]; // displays Fine Tune value as supplied in the command line arguments } // frequency, system, and talkgroup display function change_freq(d) { + var xj = document.getElementById("stx"); // display FDMA or TDMA (untested, no P2 system here) + xj.innerHTML = " $nbsp; "; // trip 01/2021 + t = "TDMA"; // + if (!d['tdma']) // + t = "FDMA"; // + xj.innerHTML = t; // + var displayTgid = "—"; var displayTag = " "; var display_src = "—"; @@ -390,7 +399,7 @@ function trunk_summary(d) { var html = ""; html += "
"; html += "
"; - html += ""; + html += "
"; html += ""; for (nac in d) { if (!is_digit(nac.charAt(0))) @@ -418,12 +427,12 @@ function trunk_summary(d) { var ns = parseInt(nac).toString(16); html += ""; var checked = enable_status[nac] ? "checked" : ""; - html += ""; + html += ""; - html += ""; - html += ""; - html += ""; - html += ""; + html += ""; + html += ""; + html += ""; + html += ""; html += ""; } var display = ""; @@ -464,14 +473,14 @@ function trunk_detail(d) { last_alg[nac] = d[nac]['alg']; last_algid[nac] = d[nac]['algid']; last_keyid[nac] = d[nac]['keyid']; - html += "
"; // open div-content + html += "
"; // open div-content html += ""; - html += d[nac]["sysname"] + " . . . . . . . . "; - html += "NAC " + "0x" + parseInt(nac).toString(16) + " "; + html += "
" + d[nac]["sysname"] + "
"; + html += "NAC " + "0x" + parseInt(nac).toString(16) + "       "; html += d[nac]['rxchan'] / 1000000.0; html += " / "; html += d[nac]['txchan'] / 1000000.0; - html += " tsbks " + d[nac]['tsbks']; + html += "       tsbks " + comma(d[nac]['tsbks']); html += "

"; html += "WACN: " + "0x" + parseInt(d[nac]['wacn']).toString(16) + " "; @@ -482,12 +491,13 @@ function trunk_detail(d) { html += "Secondary control channel(s): "; for (i=0; iFrequency error: " + error_val + " Hz. (approx)
"; + html += "Frequency error: " + error_val + " Hz.   "; + html += "Fine tune: " + fine_tune + "
"; } // system frequencies table @@ -654,7 +664,7 @@ function http_req_cb() { function do_onload() { var ele = document.getElementById("div_status"); ele.style["display"] = ""; - setInterval(do_update, 1000); + var intv = setInterval(do_update, update_interval); // UI update interval b = document.getElementById("b1"); b.className = "nav-button-active"; } @@ -707,7 +717,7 @@ function f_goto_button(command) { command = "hold" if (current_tgid != null) _tgid = current_tgid; - _tgid = parseInt(prompt("Enter tgid to hold!!!", _tgid)); + _tgid = parseInt(prompt("Enter tgid to hold.", _tgid)); if (isNaN(_tgid) || (_tgid < 0) || (_tgid > 65535)) _tgid = 0; @@ -717,16 +727,18 @@ function f_goto_button(command) { function f_debug() { if (!d_debug) return; - var html = "busy " + send_busy; + var html = "

"; + html += "busy " + send_busy; html += " qfull " + send_qfull; html += " sendq size " + send_queue.length; html += " requests " + request_count; - html += "
callbacks:"; + html += " update int=" + update_interval; + html += "
callbacks: "; html += " total=" + req_cb_count; html += " incomplete=" + nfinal_count; html += " error=" + n200_count; html += " OK=" + r200_count; - html += "
"; + html += "
"; var div_debug = document.getElementById("div_debug"); div_debug.innerHTML = html; } @@ -951,3 +963,78 @@ function f_tags(o) { var tbl = mydiv.querySelector(".tgtable"); toggle_show_hide(o, tbl); } + +// added UI functions - triptolemus + +// popout the UI to a minimal browser window +function popOut() { + var myWindow = window.open(window.location.href, "", "width=760,height=400"); +} + +// toggle dark/light mode +function toggleCSS() { + var a = document.getElementById("style"); + a.x = 'dark' == a.x ? 'main' : 'dark'; // short if + a.href = a.x + '.css'; +} + +// add comma formatting to number (tsbk) +function comma(x) { + return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); +} + +// keyboard shortcuts + +document.onkeydown = function(evt) { + evt = evt || window.event; + if (evt.keyCode == 71) { // 'g' key - GOTO + f_goto_button("goto"); + } + + if (evt.keyCode == 76) { // 'l' key - LOCKOUT + f_scan_button("lockout"); + } + + if (evt.keyCode == 72) { // 'h' key - HOLD + f_scan_button("hold"); + } + + if (evt.keyCode == 83) { // 's' key - SKIP + f_scan_button("skip"); + } + + if (evt.keyCode == 86) { // 'v' key - VIEW (light/dark) + toggleCSS(); + } + + if (evt.keyCode == 82) { // 'r' key - RX screen + f_select("rx"); + } + + if (evt.keyCode == 74) { // 'j' key - HOME screen + f_select("status"); + } + + if (evt.keyCode == 77) { // 'm' key - MINIFY + minify("nav-bar"); + minify("div_images"); + minify("div_s1"); + } + + if (evt.keyCode == 66) { // 'b' key - bold + document.getElementById("valFontStyle").value="bold" + } + + if (evt.keyCode == 78) { // 'n' key - normal + document.getElementById("valFontStyle").value="normal" + } +} + +function minify(div) { + var x = document.getElementById(div); + if (x.style.display === "none") { + x.style.display = "block"; + } else { + x.style.display = "none"; + } +}
EnabledNACSystemLast ActiveTSBK Count
" + ns + "" + d[nac]['sysname'] + "" + times + "" + d[nac]['tsbks'] + "" + ns + "" + d[nac]['sysname'] + "" + times + "" + comma(d[nac]['tsbks']) + "