WebUI: Update Check, Cleanup and Hyperion Switcher IPv6 Fix

Update Check:
- New Property which allows you to select stable or beta branch checks.
- This would rely on current versions.json. It selects the first version in list with you branch (stable, beta). If it is newer hyperion tells you that a update is available
- For this we should keep our deployment pipeline in mind to format the json this way.

Cleanup:
- I cleaned up the WebUI from dead links and the support page with the affiliate links and donation adresses as we don't have them under our control. Currently only disabled, not deleated

Switcher:
- If the address which is published via bonjour serve is IPv6 the Switcher was bugged. Fixed that.
This commit is contained in:
birdhouse 2019-06-20 19:27:22 +02:00
parent e4bc5d0990
commit c1d794cd02
11 changed files with 132 additions and 87 deletions

View File

@ -20,33 +20,33 @@
var libh = ""; var libh = "";
var lang = []; var lang = [];
var dcount = 0; var dcount = 0;
for(var i = 0; i<availLang.length; i++) for(var i = 0; i<availLang.length; i++)
lang.push($.i18n('general_speech_'+availLang[i])); lang.push($.i18n('general_speech_'+availLang[i]));
for(key in libs) for(key in libs)
libh += '<a href="'+libs[key]+'" target="_blank">'+key+'</a>, '; libh += '<a href="'+libs[key]+'" target="_blank">'+key+'</a>, ';
libh += "<br/>"+$.i18n("about_credits"); libh += "<br/>"+$.i18n("about_credits");
lang = lang.toString().replace(/,/g,", "); lang = lang.toString().replace(/,/g,", ");
var fc = ['<span id="danger_trig">'+$.i18n("about_version")+'<span>',$.i18n("about_build"),$.i18n("about_builddate"),$.i18n("about_translations"),$.i18n("about_resources", $.i18n("general_webui_title"))]; var fc = ['<span id="danger_trig">'+$.i18n("about_version")+'<span>',$.i18n("about_build"),$.i18n("about_builddate"),$.i18n("about_translations"),$.i18n("about_resources", $.i18n("general_webui_title"))];
var sc = [currentVersion,si.build,si.time,'('+availLang.length+')<p>'+lang+'</p><p><a href="https://hyperion-project.org/contribute/?pk_campaign=WebUI&pk_kwd=about_contribute" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh]; var sc = [currentVersion,si.build,si.time,'('+availLang.length+')<p>'+lang+'</p><p><a href="https://github.com/hyperion-project/hyperion.ng" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh];
createTable("","atb","about_cont"); createTable("","atb","about_cont");
for(var i = 0; i<fc.length; i++) for(var i = 0; i<fc.length; i++)
$('.atb').append(createTableRow([fc[i],sc[i]], "atb", false)); $('.atb').append(createTableRow([fc[i],sc[i]], "atb", false));
$('#danger_trig').off().on('click',function(){ $('#danger_trig').off().on('click',function(){
dcount++; dcount++;
if(dcount > 2) if(dcount > 2)
$('#danger_act').toggle(true); $('#danger_act').toggle(true);
}); });
$('#reset_cache').off().on('click',function(){ $('#reset_cache').off().on('click',function(){
localStorage.clear(); localStorage.clear();
}); });
$('#hyp_restart').off().on('click',function(){ $('#hyp_restart').off().on('click',function(){
initRestart(); initRestart();
}); });
</script> </script>

View File

@ -7,11 +7,13 @@
<hr /> <hr />
<div id="log_content"><span style="font-weight:bold;font-size:17px" data-i18n="conf_logging_nomessage"></span></div> <div id="log_content"><span style="font-weight:bold;font-size:17px" data-i18n="conf_logging_nomessage"></span></div>
<hr> <hr>
<div style="display:none">
<h4 style="font-weight:bold"><i class="fa fa-reorder fa-fw"></i><span data-i18n="conf_logging_report">Bericht</span></h4> <h4 style="font-weight:bold"><i class="fa fa-reorder fa-fw"></i><span data-i18n="conf_logging_report">Bericht</span></h4>
<button class="btn btn-primary" id="btn_logupload"><i class="fa fa-upload fa-fw"></i><span data-i18n="conf_logging_btn_pbupload"></span></button> <button class="btn btn-primary" id="btn_logupload"><i class="fa fa-upload fa-fw"></i><span data-i18n="conf_logging_btn_pbupload"></span></button>
<div id="log_upl_pol"></div> <div id="log_upl_pol"></div>
<div id="upl_link" style="margin-top:10px;font-weight:bold;"></div> <div id="upl_link" style="margin-top:10px;font-weight:bold;"></div>
<div id="prev_reports"></div> <div id="prev_reports"></div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -37,6 +37,10 @@
<td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td> <td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td>
<td id="dash_currv">unknown</td> <td id="dash_currv">unknown</td>
</tr> </tr>
<tr>
<td data-i18n="dashboard_infobox_label_versionbranch">Version Branch:</td>
<td id="dash_versionbranch">unknown</td>
</tr>
<tr> <tr>
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td> <td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>
<td id="dash_latev">unknown</td> <td id="dash_latev">unknown</td>
@ -71,7 +75,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-md-12 col-xxl-5"> <div class="col-md-12 col-xxl-5" style="display:none">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
<i class="fa fa-newspaper-o fa-fw"></i> <i class="fa fa-newspaper-o fa-fw"></i>
@ -90,5 +94,5 @@
<!-- /.row --> <!-- /.row -->
</div> </div>
<!-- /.container-fluid --> <!-- /.container-fluid -->
<script src="/js/content_dashboard.js"></script> <script src="/js/content_dashboard.js"></script>

View File

@ -3,45 +3,47 @@
<div class="col-xs-12"> <div class="col-xs-12">
<h3 class="page-header"><i class="fa fa-info fa-fw"></i><span data-i18n="support_label_title">Support Hyperion</span></h3> <h3 class="page-header"><i class="fa fa-info fa-fw"></i><span data-i18n="support_label_title">Support Hyperion</span></h3>
<div id="supp_intro"></div> <div id="supp_intro"></div>
<h4 style="font-weight: bold" data-i18n="support_label_spreadtheword">Spread the word</h4> <div style="display:none">
<a href="https://www.facebook.com/Hyperion-1415088231896140/" target="_blank" class="unlink"> <h4 style="font-weight: bold" data-i18n="support_label_spreadtheword">Spread the word</h4>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container"> <a href="https://www.facebook.com/Hyperion-1415088231896140/" target="_blank" class="unlink">
<i class="fa fa-facebook bg-color-fb"></i> <div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<h4>Facebook</h4> <i class="fa fa-facebook bg-color-fb"></i>
<p data-i18n="support_label_fbtext">Share our Hyperion Facebook page and get a notice when new updates are released</p> <h4>Facebook</h4>
</div> <p data-i18n="support_label_fbtext">Share our Hyperion Facebook page and get a notice when new updates are released</p>
</a> </div>
<a href="https://twitter.com/HyperionAmbient" target="_blank" class="unlink"> </a>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container"> <a href="https://twitter.com/HyperionAmbient" target="_blank" class="unlink">
<i class="fa fa-twitter bg-color-tw"></i> <div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<h4>Twitter</h4> <i class="fa fa-twitter bg-color-tw"></i>
<p data-i18n="support_label_twtext">Share and follow on Twitter, be always up to date with latest post about the Hyperion development</p> <h4>Twitter</h4>
</div> <p data-i18n="support_label_twtext">Share and follow on Twitter, be always up to date with latest post about the Hyperion development</p>
</a> </div>
<a href="https://plus.google.com/103082579494653418604" target="_blank" class="unlink"> </a>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container"> <a href="https://plus.google.com/103082579494653418604" target="_blank" class="unlink">
<i class="fa fa-google-plus bg-color-g"></i> <div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<h4>Google+</h4> <i class="fa fa-google-plus bg-color-g"></i>
<p data-i18n="support_label_ggtext">Circle us on Google +!</p> <h4>Google+</h4>
</div> <p data-i18n="support_label_ggtext">Circle us on Google +!</p>
</a> </div>
<a href="https://www.youtube.com/channel/UCCah_idbSMqgo4UwP6R9H-A" target="_blank" class="unlink"> </a>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container"> <a href="https://www.youtube.com/channel/UCCah_idbSMqgo4UwP6R9H-A" target="_blank" class="unlink">
<i class="fa fa-youtube bg-color-g"></i> <div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<h4>Youtube</h4> <i class="fa fa-youtube bg-color-g"></i>
<p data-i18n="support_label_yttext">Bored from pictures? Checkout our Youtube channel!</p> <h4>Youtube</h4>
</div> <p data-i18n="support_label_yttext">Bored from pictures? Checkout our Youtube channel!</p>
</a> </div>
<a href="https://www.instagram.com/hyperionambient/" target="_blank" class="unlink"> </a>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container"> <a href="https://www.instagram.com/hyperionambient/" target="_blank" class="unlink">
<i class="fa fa-instagram bg-color-ig"></i> <div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<h4>Instagram</h4> <i class="fa fa-instagram bg-color-ig"></i>
<p data-i18n="support_label_igtext"></p> <h4>Instagram</h4>
</div> <p data-i18n="support_label_igtext"></p>
</a> </div>
</div> </a>
<div class="col-xs-12"> </div>
<hr> </div>
<div class="col-xs-12" style="display:none">
<hr>
<h4 style="font-weight: bold" data-i18n="support_label_donate">Donate or use our affiliate links</h4> <h4 style="font-weight: bold" data-i18n="support_label_donate">Donate or use our affiliate links</h4>
<ol> <ol>
<li data-i18n="support_label_affinstr1">Click on the appropriate link of your country</li> <li data-i18n="support_label_affinstr1">Click on the appropriate link of your country</li>
@ -55,7 +57,7 @@
<li><a href="http://www.amazon.de/?tag=hyperionproje-21" target="_blank" data-i18n="general_country_de">Germany</a></li> <li><a href="http://www.amazon.de/?tag=hyperionproje-21" target="_blank" data-i18n="general_country_de">Germany</a></li>
<li><a href="http://www.amazon.com/?tag=hyperionpro05-20" target="_blank" data-i18n="general_country_us">United States</a></li> <li><a href="http://www.amazon.com/?tag=hyperionpro05-20" target="_blank" data-i18n="general_country_us">United States</a></li>
<li><a href="http://www.amazon.co.uk/?tag=hyperionpro02-21" target="_blank" data-i18n="general_country_uk">United Kingdom</a></li> <li><a href="http://www.amazon.co.uk/?tag=hyperionpro02-21" target="_blank" data-i18n="general_country_uk">United Kingdom</a></li>
<li><a href="http://www.amazon.fr/?tag=hyperionpro0c-21" target="_blank" data-i18n="general_country_fr">France</a></li> <li><a href="http://www.amazon.fr/?tag=hyperionpro0c-21" target="_blank" data-i18n="general_country_fr">France</a></li>
<li><a href="http://www.amazon.es/?tag=hyperionpro07-21" target="_blank" data-i18n="general_country_es">Spain</a></li> <li><a href="http://www.amazon.es/?tag=hyperionpro07-21" target="_blank" data-i18n="general_country_es">Spain</a></li>
<li><a href="http://www.amazon.it/?tag=hyperionpro00-21" target="_blank" data-i18n="general_country_it">Italy</a></li> <li><a href="http://www.amazon.it/?tag=hyperionpro00-21" target="_blank" data-i18n="general_country_it">Italy</a></li>
</ul> </ul>
@ -67,7 +69,7 @@
<li><a href="http://rover.ebay.com/rover/1/707-53477-19255-0/1?pub=5575174930&toolid=10001&campid=707-53477-19255-0&customid=&mpt=9592320&mpre=http%3A%2F%2Fwww.ebay.de" target="_blank" data-i18n="general_country_de">Germany</a></li> <li><a href="http://rover.ebay.com/rover/1/707-53477-19255-0/1?pub=5575174930&toolid=10001&campid=707-53477-19255-0&customid=&mpt=9592320&mpre=http%3A%2F%2Fwww.ebay.de" target="_blank" data-i18n="general_country_de">Germany</a></li>
<li><a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?pub=5575174930&toolid=10001&campid=711-53200-19255-0&customid=&mpt=8091563&mpre=http%3A%2F%2Fwww.ebay.com" target="_blank" data-i18n="general_country_us">United States</a></li> <li><a href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?pub=5575174930&toolid=10001&campid=711-53200-19255-0&customid=&mpt=8091563&mpre=http%3A%2F%2Fwww.ebay.com" target="_blank" data-i18n="general_country_us">United States</a></li>
<li><a href="http://rover.ebay.com/rover/1/710-53481-19255-0/1?pub=5575174930&toolid=10001&campid=710-53481-19255-0&customid=&mpt=9837178&mpre=http%3A%2F%2Fwww.ebay.co.uk" target="_blank" data-i18n="general_country_uk">United Kingdom</a></li> <li><a href="http://rover.ebay.com/rover/1/710-53481-19255-0/1?pub=5575174930&toolid=10001&campid=710-53481-19255-0&customid=&mpt=9837178&mpre=http%3A%2F%2Fwww.ebay.co.uk" target="_blank" data-i18n="general_country_uk">United Kingdom</a></li>
<li><a href="http://rover.ebay.com/rover/1/1346-53482-19255-0/1?pub=5575174930&toolid=10001&campid=1346-53482-19255-0&customid=&mpt=9890408&mpre=http%3A%2F%2Fwww.ebay.nl" target="_blank" data-i18n="general_country_nl">Netherlands</a></li> <li><a href="http://rover.ebay.com/rover/1/1346-53482-19255-0/1?pub=5575174930&toolid=10001&campid=1346-53482-19255-0&customid=&mpt=9890408&mpre=http%3A%2F%2Fwww.ebay.nl" target="_blank" data-i18n="general_country_nl">Netherlands</a></li>
<li><a href="http://rover.ebay.com/rover/1/709-53476-19255-0/1?pub=5575174930&toolid=10001&campid=709-53476-19255-0&customid=&mpt=9865977&mpre=http%3A%2F%2Fwww.ebay.fr" target="_blank" data-i18n="general_country_fr">France</a></li> <li><a href="http://rover.ebay.com/rover/1/709-53476-19255-0/1?pub=5575174930&toolid=10001&campid=709-53476-19255-0&customid=&mpt=9865977&mpre=http%3A%2F%2Fwww.ebay.fr" target="_blank" data-i18n="general_country_fr">France</a></li>
<li><a href="http://rover.ebay.com/rover/1/1185-53479-19255-0/1?pub=5575174930&toolid=10001&campid=1185-53479-19255-0&customid=&mpt=1016300&mpre=http%3A%2F%2Fwww.ebay.es" target="_blank" data-i18n="general_country_es">Spain</a></li> <li><a href="http://rover.ebay.com/rover/1/1185-53479-19255-0/1?pub=5575174930&toolid=10001&campid=1185-53479-19255-0&customid=&mpt=1016300&mpre=http%3A%2F%2Fwww.ebay.es" target="_blank" data-i18n="general_country_es">Spain</a></li>
</ul> </ul>
@ -78,14 +80,14 @@
<h4>Paypal</h4> <h4>Paypal</h4>
<p data-i18n="support_label_donationpp">Donation:</p><a href="https://www.paypal.me/hyperionproject/10" target="_blank">Paypal</a> <p data-i18n="support_label_donationpp">Donation:</p><a href="https://www.paypal.me/hyperionproject/10" target="_blank">Paypal</a>
</div> </div>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container"> <div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-btc bg-color-btc"></i> <i class="fa fa-btc bg-color-btc"></i>
<h4>Bitcoin</h4> <h4>Bitcoin</h4>
<p data-i18n="support_label_btctext">Address:</p> <p data-i18n="support_label_btctext">Address:</p>
<p style="word-break: break-all;">1GGZbsT6fH3cGq25H5HS2PfisPfDnffSJR</p> <p style="word-break: break-all;">1GGZbsT6fH3cGq25H5HS2PfisPfDnffSJR</p>
</div> </div>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<hr> <hr>

View File

@ -50,6 +50,7 @@
"dashboard_infobox_label_platform" : "Plattform:", "dashboard_infobox_label_platform" : "Plattform:",
"dashboard_infobox_label_instance" : "Instanz:", "dashboard_infobox_label_instance" : "Instanz:",
"dashboard_infobox_label_ports" : "Ports (flat|proto):", "dashboard_infobox_label_ports" : "Ports (flat|proto):",
"dashboard_infobox_label_versionbranch" : "Versionszweig:",
"dashboard_infobox_message_updatewarning" : "Eine aktuellere Version von Hyperion ist verfügbar! (V$1)", "dashboard_infobox_message_updatewarning" : "Eine aktuellere Version von Hyperion ist verfügbar! (V$1)",
"dashboard_infobox_message_updatesuccess" : "Du nutzt die aktuellste Version von Hyperion.", "dashboard_infobox_message_updatesuccess" : "Du nutzt die aktuellste Version von Hyperion.",
"dashboard_infobox_label_statush" : "Hyperion Status:", "dashboard_infobox_label_statush" : "Hyperion Status:",
@ -260,7 +261,7 @@
"about_builddate" : "Build Datum", "about_builddate" : "Build Datum",
"about_translations" : "Übersetzungen", "about_translations" : "Übersetzungen",
"about_resources" : "$1 Bibliotheken", "about_resources" : "$1 Bibliotheken",
"about_contribute" : "Übersetze Hyperion in weitere Sprachen!", "about_contribute" : "Entwickel Hyperion mit uns weiter!",
"about_credits" : "Einen Dank an alle Entwickler!", "about_credits" : "Einen Dank an alle Entwickler!",
"info_conlost_label_title" : "Verbindung zum Hyperion Service unterbrochen!", "info_conlost_label_title" : "Verbindung zum Hyperion Service unterbrochen!",
"info_conlost_label_reason" : "Mögliche Ursachen:", "info_conlost_label_reason" : "Mögliche Ursachen:",
@ -438,6 +439,8 @@
"edt_conf_gen_name_expl" : "Der Name wird verwendet, um Hyperion besser zu identifizieren. (Hilfreich bei mehreren Instanzen)", "edt_conf_gen_name_expl" : "Der Name wird verwendet, um Hyperion besser zu identifizieren. (Hilfreich bei mehreren Instanzen)",
"edt_conf_gen_showOptHelp_title" : "Zeige Erklärungen", "edt_conf_gen_showOptHelp_title" : "Zeige Erklärungen",
"edt_conf_gen_showOptHelp_expl" : "Zeige alle verfügbaren Options-Erklärungen. Empfohlen für Anfänger", "edt_conf_gen_showOptHelp_expl" : "Zeige alle verfügbaren Options-Erklärungen. Empfohlen für Anfänger",
"edt_conf_gen_versionBranch_title" : "Versionszweig",
"edt_conf_gen_versionBranch_expl" : "Gibt an, welcher Versionszweig für die Suche von neuen Hyperion Versionen genutzt werden soll.",
"edt_conf_color_heading_title" : "Farbkalibrierung", "edt_conf_color_heading_title" : "Farbkalibrierung",
"edt_conf_color_channelAdjustment_header_title" : "Anpassung Farbkanäle", "edt_conf_color_channelAdjustment_header_title" : "Anpassung Farbkanäle",
"edt_conf_color_channelAdjustment_header_itemtitle" : "Profil", "edt_conf_color_channelAdjustment_header_itemtitle" : "Profil",

View File

@ -50,6 +50,7 @@
"dashboard_infobox_label_platform" : "Platform:", "dashboard_infobox_label_platform" : "Platform:",
"dashboard_infobox_label_instance" : "Instance:", "dashboard_infobox_label_instance" : "Instance:",
"dashboard_infobox_label_ports" : "Ports (flat|proto):", "dashboard_infobox_label_ports" : "Ports (flat|proto):",
"dashboard_infobox_label_versionbranch" : "Version Branch:",
"dashboard_infobox_message_updatewarning" : "A newer version of Hyperion is available! ($1)", "dashboard_infobox_message_updatewarning" : "A newer version of Hyperion is available! ($1)",
"dashboard_infobox_message_updatesuccess" : "You run the latest version of Hyperion.", "dashboard_infobox_message_updatesuccess" : "You run the latest version of Hyperion.",
"dashboard_infobox_label_statush" : "Hyperion status:", "dashboard_infobox_label_statush" : "Hyperion status:",
@ -60,7 +61,7 @@
"dashboard_componentbox_label_comp" : "Component", "dashboard_componentbox_label_comp" : "Component",
"dashboard_componentbox_label_status" : "Status", "dashboard_componentbox_label_status" : "Status",
"dashboard_newsbox_label_title" : "Hyperion-Blog", "dashboard_newsbox_label_title" : "Hyperion-Blog",
"dashboard_newsbox_visitblog" : "Visit Hyperion-Blog", "dashboard_newsbox_visitblog" : "Visit Hyperion-Blog",
"dashboard_newsbox_noconn" : "Can't connect to Hyperion Server to retrieve latest posts, does your internet connection work?", "dashboard_newsbox_noconn" : "Can't connect to Hyperion Server to retrieve latest posts, does your internet connection work?",
"dashboard_newsbox_readmore" : "Read more", "dashboard_newsbox_readmore" : "Read more",
"dashboard_alert_message_confedit_t" : "Configuration modified", "dashboard_alert_message_confedit_t" : "Configuration modified",
@ -260,7 +261,7 @@
"about_builddate" : "Build date", "about_builddate" : "Build date",
"about_translations" : "Translations", "about_translations" : "Translations",
"about_resources" : "$1 libraries", "about_resources" : "$1 libraries",
"about_contribute" : "Add more languages to Hyperion!", "about_contribute" : "Develop Hyperion further with us!",
"about_credits" : "Credits to all these developers!", "about_credits" : "Credits to all these developers!",
"info_conlost_label_title" : "Lost connection to Hyperion service!", "info_conlost_label_title" : "Lost connection to Hyperion service!",
"info_conlost_label_reason" : "Possible reasons:", "info_conlost_label_reason" : "Possible reasons:",
@ -439,6 +440,8 @@
"edt_conf_gen_name_expl" : "A user defined name which is used to detect Hyperion. (Helpful with more than one Hyperion instance)", "edt_conf_gen_name_expl" : "A user defined name which is used to detect Hyperion. (Helpful with more than one Hyperion instance)",
"edt_conf_gen_showOptHelp_title" : "Show explanations", "edt_conf_gen_showOptHelp_title" : "Show explanations",
"edt_conf_gen_showOptHelp_expl" : "Show all available explanations in each section. Highly recommended for beginners!", "edt_conf_gen_showOptHelp_expl" : "Show all available explanations in each section. Highly recommended for beginners!",
"edt_conf_gen_versionBranch_title" : "Version Branch",
"edt_conf_gen_versionBranch_expl" : "Selects which version branch should be used for searching new Hyperion versions.",
"edt_conf_color_heading_title" : "Color Calibration", "edt_conf_color_heading_title" : "Color Calibration",
"edt_conf_color_channelAdjustment_header_itemtitle" : "Profile", "edt_conf_color_channelAdjustment_header_itemtitle" : "Profile",
"edt_conf_color_channelAdjustment_header_title" : "Color channel adjustments", "edt_conf_color_channelAdjustment_header_title" : "Color channel adjustments",

View File

@ -78,19 +78,28 @@ $(document).ready( function() {
$('#dash_currv').html(window.currentVersion); $('#dash_currv').html(window.currentVersion);
$('#dash_instance').html(window.serverConfig.general.name); $('#dash_instance').html(window.serverConfig.general.name);
$('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port); $('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port);
$('#dash_versionbranch').html(window.serverConfig.general.versionBranch);
$.get( "https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/version.json", function( data ) { $.get( "https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/version.json", function( data ) {
window.parsedUpdateJSON = JSON.parse(data); window.parsedUpdateJSON = JSON.parse(data);
window.latestVersion = window.parsedUpdateJSON[0].versionnr;
// var cleanLatestVersion = window.latestVersion.replace(/\./g, ''); for(let i=0; i<window.parsedUpdateJSON.length; i++) {
// var cleanCurrentVersion = window.currentVersion.replace(/\./g, ''); if(window.parsedUpdateJSON[i].channel == window.serverConfig.general.versionBranch) {
window.latestVersion = window.parsedUpdateJSON[i].versionnr;
break;
}
else window.latestVersion = window.currentVersion;
}
var cleanLatestVersion = window.latestVersion.replace(/\./g, '');
var cleanCurrentVersion = window.currentVersion.replace(/\./g, '');
$('#dash_latev').html(window.currentVersion); $('#dash_latev').html(window.currentVersion);
// $('#dash_latev').html(window.latestVersion); $('#dash_latev').html(window.latestVersion);
// if ( cleanCurrentVersion < cleanLatestVersion ) if ( cleanCurrentVersion < cleanLatestVersion )
// $('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion)+'</div>'); $('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion)+'</div>');
// else else
$('#versioninforesult').html('<div class="bs-callout bs-callout-success" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatesuccess')+'</div>'); $('#versioninforesult').html('<div class="bs-callout bs-callout-success" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatesuccess')+'</div>');
}); });

View File

@ -21,10 +21,10 @@ $(document).ready( function() {
$.i18n().load( "i18n", lc ).done( $.i18n().load( "i18n", lc ).done(
function() { function() {
performTranslation(); performTranslation();
}); });
} }
} }
if (storageComp()) if (storageComp())
{ {
storedLang = getStorage("langcode"); storedLang = getStorage("langcode");
@ -48,16 +48,16 @@ $(document).ready( function() {
$('#btn_setlang').attr("disabled", true); $('#btn_setlang').attr("disabled", true);
$('#btn_setaccess').attr("disabled", true); $('#btn_setaccess').attr("disabled", true);
} }
$('#btn_setlang').off().on('click',function() { $('#btn_setlang').off().on('click',function() {
var newLang; var newLang;
showInfoDialog('select', $.i18n('InfoDialog_lang_title'), $.i18n('InfoDialog_lang_text')); showInfoDialog('select', $.i18n('InfoDialog_lang_title'), $.i18n('InfoDialog_lang_text'));
for (var lcx = 0; lcx<availLang.length; lcx++) for (var lcx = 0; lcx<availLang.length; lcx++)
{ {
$('#id_select').append(createSelOpt(availLang[lcx], $.i18n('general_speech_'+availLang[lcx]))) $('#id_select').append(createSelOpt(availLang[lcx], $.i18n('general_speech_'+availLang[lcx])))
} }
if (storedLang != "auto") if (storedLang != "auto")
$('#id_select').val(storedLang); $('#id_select').val(storedLang);
@ -68,12 +68,12 @@ $(document).ready( function() {
else else
$('#id_btn_saveset').attr('disabled', false); $('#id_btn_saveset').attr('disabled', false);
}); });
$('#id_btn_saveset').off().on('click',function() { $('#id_btn_saveset').off().on('click',function() {
setStorage("langcode", newLang); setStorage("langcode", newLang);
reload(); reload();
}); });
$('#id_select').trigger('change'); $('#id_select').trigger('change');
}); });
@ -88,14 +88,14 @@ $(document).ready( function() {
$('#btn_setaccess').off().on('click',function() { $('#btn_setaccess').off().on('click',function() {
var newAccess; var newAccess;
showInfoDialog('select', $.i18n('InfoDialog_access_title'), $.i18n('InfoDialog_access_text')); showInfoDialog('select', $.i18n('InfoDialog_access_title'), $.i18n('InfoDialog_access_text'));
for (var lcx = 0; lcx<availAccess.length; lcx++) for (var lcx = 0; lcx<availAccess.length; lcx++)
{ {
$('#id_select').append(createSelOpt(availAccess[lcx], $.i18n('general_access_'+availAccess[lcx]))); $('#id_select').append(createSelOpt(availAccess[lcx], $.i18n('general_access_'+availAccess[lcx])));
} }
$('#id_select').val(storedAccess); $('#id_select').val(storedAccess);
$('#id_select').off().on('change',function() { $('#id_select').off().on('change',function() {
newAccess = $('#id_select').val(); newAccess = $('#id_select').val();
if (newAccess == storedAccess) if (newAccess == storedAccess)
@ -103,36 +103,42 @@ $(document).ready( function() {
else else
$('#id_btn_saveset').attr('disabled', false); $('#id_btn_saveset').attr('disabled', false);
}); });
$('#id_btn_saveset').off().on('click',function() { $('#id_btn_saveset').off().on('click',function() {
setStorage("accesslevel", newAccess); setStorage("accesslevel", newAccess);
reload(); reload();
}); });
$('#id_select').trigger('change'); $('#id_select').trigger('change');
}); });
//hide menu elements //hide menu elements
if (storedAccess != 'expert') if (storedAccess != 'expert')
$('#load_webconfig').toggle(false); $('#load_webconfig').toggle(false);
// instance switcher // instance switcher
$('#btn_instanceswitch').off().on('click',function() { $('#btn_instanceswitch').off().on('click',function() {
var lsys = window.sysInfo.system.hostName+':'+window.serverConfig.webConfig.port; var lsys = window.sysInfo.system.hostName+':'+window.serverConfig.webConfig.port;
showInfoDialog('iswitch', $.i18n('InfoDialog_iswitch_title'), $.i18n('InfoDialog_iswitch_text')); showInfoDialog('iswitch', $.i18n('InfoDialog_iswitch_title'), $.i18n('InfoDialog_iswitch_text'));
for (var i = 0; i<window.wSess.length; i++) for (var i = 0; i<window.wSess.length; i++)
{ {
if(lsys != window.wSess[i].host+':'+window.wSess[i].port) if(lsys != window.wSess[i].host+':'+window.wSess[i].port)
$('#id_select').append(createSelOpt('http://'+window.wSess[i].address+':'+window.wSess[i].port, window.wSess[i].name)) var hyperionAddress
if (window.wSess[i].address.indexOf(':') > -1 && window.wSess[i].address.length == 36)
hyperionAddress = 'http://['+window.wSess[i].address+']:'+window.wSess[i].port
else
hyperionAddress = 'http://'+window.wSess[i].address+':'+window.wSess[i].port
$('#id_select').append(createSelOpt(hyperionAddress, window.wSess[i].host))
} }
$('#id_btn_saveset').off().on('click',function() { $('#id_btn_saveset').off().on('click',function() {
$("#loading_overlay").addClass("overlay"); $("#loading_overlay").addClass("overlay");
window.location.href = $('#id_select').val() window.location.href = $('#id_select').val()
}); });
}); });
}); });

View File

@ -6,10 +6,12 @@
{ {
/// general Settings /// general Settings
/// * 'name' : The user friendly name of the hyperion instance (used for network things) /// * 'name' : The user friendly name of the hyperion instance (used for network things)
/// * 'versionBranch' : Which branch should be used for hyperion version
/// * 'showOptHelp' : Show option expanations at the webui. Highly recommended for beginners. /// * 'showOptHelp' : Show option expanations at the webui. Highly recommended for beginners.
"general" : "general" :
{ {
"name" : "MyHyperionConfig", "name" : "MyHyperionConfig",
"versionBranch" : "Stable",
"showOptHelp" : true "showOptHelp" : true
}, },
/// set log level: silent warn verbose debug /// set log level: silent warn verbose debug

View File

@ -2,6 +2,7 @@
"general" : "general" :
{ {
"name" : "My Hyperion Config", "name" : "My Hyperion Config",
"versionBranch" : "Stable",
"showOptHelp" : true "showOptHelp" : true
}, },
"logger" : "logger" :

View File

@ -14,13 +14,26 @@
"required" : true, "required" : true,
"propertyOrder" : 1 "propertyOrder" : 1
}, },
"versionBranch" :
{
"type" : "string",
"title" : "edt_conf_gen_versionBranch_title",
"enum" : ["Stable", "Beta"],
"required" : true,
"access" : "expert",
"default" : "Stable",
"options" : {
"enum_titles" : ["Stable", "Beta"]
},
"propertyOrder" : 2
},
"showOptHelp" : "showOptHelp" :
{ {
"type" : "boolean", "type" : "boolean",
"title" : "edt_conf_gen_showOptHelp_title", "title" : "edt_conf_gen_showOptHelp_title",
"default" : true, "default" : true,
"required" : true, "required" : true,
"propertyOrder" : 2 "propertyOrder" : 3
} }
}, },
"additionalProperties" : false "additionalProperties" : false