Merge remote-tracking branch 'upstream/master' into fadecandy

This commit is contained in:
Paulchen-Panther 2019-07-02 19:42:42 +02:00
commit fb850bb40b
No known key found for this signature in database
GPG Key ID: 84E3B692456B6840
15 changed files with 212 additions and 103 deletions

View File

@ -20,33 +20,33 @@
var libh = "";
var lang = [];
var dcount = 0;
for(var i = 0; i<availLang.length; i++)
lang.push($.i18n('general_speech_'+availLang[i]));
for(key in libs)
libh += '<a href="'+libs[key]+'" target="_blank">'+key+'</a>, ';
libh += "<br/>"+$.i18n("about_credits");
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 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");
for(var i = 0; i<fc.length; i++)
$('.atb').append(createTableRow([fc[i],sc[i]], "atb", false));
$('#danger_trig').off().on('click',function(){
dcount++;
if(dcount > 2)
$('#danger_act').toggle(true);
});
$('#reset_cache').off().on('click',function(){
localStorage.clear();
});
$('#hyp_restart').off().on('click',function(){
initRestart();
});
</script>
</script>

View File

@ -7,11 +7,13 @@
<hr />
<div id="log_content"><span style="font-weight:bold;font-size:17px" data-i18n="conf_logging_nomessage"></span></div>
<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>
<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="upl_link" style="margin-top:10px;font-weight:bold;"></div>
<div id="prev_reports"></div>
</div>
</div>
</div>
</div>

View File

@ -37,6 +37,10 @@
<td data-i18n="dashboard_infobox_label_currenthyp">Hyperion version:</td>
<td id="dash_currv">unknown</td>
</tr>
<tr>
<td data-i18n="dashboard_infobox_label_versionbranch">Version Branch:</td>
<td id="dash_versionbranch">unknown</td>
</tr>
<tr>
<td data-i18n="dashboard_infobox_label_latesthyp">Latest version:</td>
<td id="dash_latev">unknown</td>
@ -71,7 +75,7 @@
</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-heading">
<i class="fa fa-newspaper-o fa-fw"></i>
@ -90,5 +94,5 @@
<!-- /.row -->
</div>
<!-- /.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">
<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>
<h4 style="font-weight: bold" data-i18n="support_label_spreadtheword">Spread the word</h4>
<a href="https://www.facebook.com/Hyperion-1415088231896140/" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-facebook bg-color-fb"></i>
<h4>Facebook</h4>
<p data-i18n="support_label_fbtext">Share our Hyperion Facebook page and get a notice when new updates are released</p>
</div>
</a>
<a href="https://twitter.com/HyperionAmbient" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-twitter bg-color-tw"></i>
<h4>Twitter</h4>
<p data-i18n="support_label_twtext">Share and follow on Twitter, be always up to date with latest post about the Hyperion development</p>
</div>
</a>
<a href="https://plus.google.com/103082579494653418604" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-google-plus bg-color-g"></i>
<h4>Google+</h4>
<p data-i18n="support_label_ggtext">Circle us on Google +!</p>
</div>
</a>
<a href="https://www.youtube.com/channel/UCCah_idbSMqgo4UwP6R9H-A" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-youtube bg-color-g"></i>
<h4>Youtube</h4>
<p data-i18n="support_label_yttext">Bored from pictures? Checkout our Youtube channel!</p>
</div>
</a>
<a href="https://www.instagram.com/hyperionambient/" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-instagram bg-color-ig"></i>
<h4>Instagram</h4>
<p data-i18n="support_label_igtext"></p>
</div>
</a>
</div>
<div class="col-xs-12">
<hr>
<div style="display:none">
<h4 style="font-weight: bold" data-i18n="support_label_spreadtheword">Spread the word</h4>
<a href="https://www.facebook.com/Hyperion-1415088231896140/" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-facebook bg-color-fb"></i>
<h4>Facebook</h4>
<p data-i18n="support_label_fbtext">Share our Hyperion Facebook page and get a notice when new updates are released</p>
</div>
</a>
<a href="https://twitter.com/HyperionAmbient" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-twitter bg-color-tw"></i>
<h4>Twitter</h4>
<p data-i18n="support_label_twtext">Share and follow on Twitter, be always up to date with latest post about the Hyperion development</p>
</div>
</a>
<a href="https://plus.google.com/103082579494653418604" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-google-plus bg-color-g"></i>
<h4>Google+</h4>
<p data-i18n="support_label_ggtext">Circle us on Google +!</p>
</div>
</a>
<a href="https://www.youtube.com/channel/UCCah_idbSMqgo4UwP6R9H-A" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-youtube bg-color-g"></i>
<h4>Youtube</h4>
<p data-i18n="support_label_yttext">Bored from pictures? Checkout our Youtube channel!</p>
</div>
</a>
<a href="https://www.instagram.com/hyperionambient/" target="_blank" class="unlink">
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-instagram bg-color-ig"></i>
<h4>Instagram</h4>
<p data-i18n="support_label_igtext"></p>
</div>
</a>
</div>
</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>
<ol>
<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.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.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.it/?tag=hyperionpro00-21" target="_blank" data-i18n="general_country_it">Italy</a></li>
</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/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/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/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>
@ -78,14 +80,14 @@
<h4>Paypal</h4>
<p data-i18n="support_label_donationpp">Donation:</p><a href="https://www.paypal.me/hyperionproject/10" target="_blank">Paypal</a>
</div>
<div class="col-xs-12 col-sm-6 col-lg-3 support-container">
<i class="fa fa-btc bg-color-btc"></i>
<h4>Bitcoin</h4>
<p data-i18n="support_label_btctext">Address:</p>
<p style="word-break: break-all;">1GGZbsT6fH3cGq25H5HS2PfisPfDnffSJR</p>
</div>
</div>
<div class="col-xs-12">
<hr>
@ -125,4 +127,5 @@
<script type="text/javascript">
performTranslation();
createHintH("intro", $.i18n('support_label_intro'), "supp_intro");
removeOverlay();
</script>

View File

@ -4,6 +4,7 @@
<h3 class="page-header"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></h3>
<div class="introd">
<h4 data-i18n="update_label_intro">Overview about all available Hyperion versions. On top you could update or downgrade your version of Hyperion whenever you want. Sorted from newest to oldest</h4>
<h4> At the moment the install buttons are not working. Development is still ongoing here. </h4>
<hr />
</div>
<h4 id="update_currver"></h4>
@ -15,12 +16,29 @@
</div>
<script>
// performTranslation('trans_update');
performTranslation();
$(document).ready( function(error) {
performTranslation();
getReleases(function (callback){
for (key in parsedUpdateJSON)
if(callback)
{
$('#versionlist').append('<div class="col-lg-6"><div class="panel panel-default"><div class="panel-heading"><i class="fa fa-television fa-fw"></i>Hyperion V'+parsedUpdateJSON[key].versionnr+'</div><div class="panel-body"><p><span style="font-weight:bold;">'+$.i18n('update_label_type')+'</span> '+ parsedUpdateJSON[key].channel +'</p><p><span style="font-weight:bold;">'+$.i18n('update_label_description')+'</span> '+parsedUpdateJSON[key].versiondesc+'</p><hr><a class="btn btn-primary" href="'+ parsedUpdateJSON[key].versionchangelog +'" target="_blank"><i class="fa fa-list fa-fw"></i><span style="font-weight:bold;">'+$.i18n('update_button_changelog')+'</span></a><button type="button" class="btn btn-warning pull-right"><i class="fa fa-download fa-fw"></i>'+$.i18n('update_button_install')+'</button></div></div></div>');
for (var key in window.gitHubVersionList)
{
if(window.gitHubVersionList[key].name == null || (window.serverConfig.general.versionBranch == "Stable" && window.gitHubVersionList[key].prerelease == true))
{
continue;
}
$('#versionlist').append('<div class="col-lg-6"><div class="panel panel-'+ (window.gitHubVersionList[key].prerelease == true ? "danger" : "default") +'"><div class="panel-heading"><i class="fa fa-television fa-fw"></i>Hyperion V'+window.gitHubVersionList[key].tag_name+'</div><div class="panel-body"><p><span style="font-weight:bold;">'+$.i18n('update_label_type') + '</span> ' + (window.gitHubVersionList[key].prerelease == true ? "Beta" : "Stable") + '</p><p><span style="font-weight:bold;">'+$.i18n('update_label_description')+'</span> '+window.gitHubVersionList[key].body+'</p><hr><a class="btn btn-primary" href="'+ window.gitHubVersionList[key].html_url +'" target="_blank"><i class="fa fa-list fa-fw"></i><span style="font-weight:bold;">'+$.i18n('update_button_changelog')+'</span></a><button type="button" class="btn btn-warning pull-right" ' + (window.gitHubVersionList[key].tag_name == window.currentVersion ? "disabled":"") + '><i class="fa fa-download fa-fw"></i>'+$.i18n('update_button_install')+'</button></div></div></div>');
}
$('#update_currver').append($.i18n('update_versreminder', currentVersion));
}
$('#update_currver').append($.i18n('update_versreminder', currentVersion));
else
{
$('#versionlist').append($.i18n('update_error_getting_versions'));
}
});
removeOverlay();
});
</script>

View File

@ -50,6 +50,7 @@
"dashboard_infobox_label_platform" : "Plattform:",
"dashboard_infobox_label_instance" : "Instanz:",
"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_updatesuccess" : "Du nutzt die aktuellste Version von Hyperion.",
"dashboard_infobox_label_statush" : "Hyperion Status:",
@ -255,12 +256,13 @@
"update_button_changelog" : "Zeige Änderungsprotokoll",
"update_label_type" : "Art:",
"update_versreminder" : "Deine Version: $1",
"update_error_getting_versions" : "Wir hatten Probleme die verfügbaren Versionen zu ermitteln.",
"about_version" : "Version",
"about_build" : "Build",
"about_builddate" : "Build Datum",
"about_translations" : "Übersetzungen",
"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!",
"info_conlost_label_title" : "Verbindung zum Hyperion Service unterbrochen!",
"info_conlost_label_reason" : "Mögliche Ursachen:",
@ -438,6 +440,8 @@
"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_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_channelAdjustment_header_title" : "Anpassung Farbkanäle",
"edt_conf_color_channelAdjustment_header_itemtitle" : "Profil",

View File

@ -50,6 +50,7 @@
"dashboard_infobox_label_platform" : "Platform:",
"dashboard_infobox_label_instance" : "Instance:",
"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_updatesuccess" : "You run the latest version of Hyperion.",
"dashboard_infobox_label_statush" : "Hyperion status:",
@ -60,7 +61,7 @@
"dashboard_componentbox_label_comp" : "Component",
"dashboard_componentbox_label_status" : "Status",
"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_readmore" : "Read more",
"dashboard_alert_message_confedit_t" : "Configuration modified",
@ -255,12 +256,13 @@
"update_button_changelog" : "Full changelog",
"update_label_type" : "Type:",
"update_versreminder" : "Your version: $1",
"update_error_getting_versions" : "We had trouble to determinate the available Versions.",
"about_version" : "Version",
"about_build" : "Build",
"about_builddate" : "Build date",
"about_translations" : "Translations",
"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!",
"info_conlost_label_title" : "Lost connection to Hyperion service!",
"info_conlost_label_reason" : "Possible reasons:",
@ -439,6 +441,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_showOptHelp_title" : "Show explanations",
"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_channelAdjustment_header_itemtitle" : "Profile",
"edt_conf_color_channelAdjustment_header_title" : "Color channel adjustments",

View File

@ -179,11 +179,8 @@
<ul class="nav nav-second-level">
<li> <a class="inactive mnava" href="#conf_webconfig" id="load_webconfig"><i class="fa fa-wrench fa-fw"></i><span data-i18n="main_menu_webconfig_token">Webconfiguration</span></a> </li>
<li> <a class="inactive mnava" href="#conf_logging"><i class="fa fa-reorder fa-fw"></i><span data-i18n="main_menu_logging_token">Log</span></a> </li>
<!-- Update is disabled
<li> <a class="inactive mnava" href="#update"><i class="fa fa-download fa-fw"></i><span data-i18n="main_menu_update_token">Update</span></a> </li>
-->
<li> <a class="inactive mnava" href="#about"><i class="fa fa-info-circle fa-fw"></i><span data-i18n="main_menu_about_token">Update</span></a> </li>
<li> <a class="inactive mnava" href="#about"><i class="fa fa-info-circle fa-fw"></i><span data-i18n="main_menu_about_token">About</span></a> </li>
</ul>
</li>
</ul>

View File

@ -52,7 +52,7 @@ $(document).ready( function() {
{
var components = window.comps;
var components_html = "";
for ( var idx=0; idx<components.length;idx++)
for (var idx=0; idx<components.length;idx++)
{
if(components[idx].name != "ALL")
components_html += '<tr><td>'+$.i18n('general_comp_'+components[idx].name)+'</td><td><i class="fa fa-circle component-'+(components[idx].enabled?"on":"off")+'"></i></td></tr>';
@ -78,22 +78,26 @@ $(document).ready( function() {
$('#dash_currv').html(window.currentVersion);
$('#dash_instance').html(window.serverConfig.general.name);
$('#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 ) {
window.parsedUpdateJSON = JSON.parse(data);
window.latestVersion = window.parsedUpdateJSON[0].versionnr;
// var cleanLatestVersion = window.latestVersion.replace(/\./g, '');
// var cleanCurrentVersion = window.currentVersion.replace(/\./g, '');
getReleases(function(callback){
if(callback)
{
var cleanLatestVersion = window.latestVersion.tag_name.replace(/\./g, '');
var cleanCurrentVersion = window.currentVersion.replace(/\./g, '');
$('#dash_latev').html(window.currentVersion);
// $('#dash_latev').html(window.latestVersion);
$('#dash_latev').html(window.currentVersion);
$('#dash_latev').html(window.latestVersion.tag_name + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')');
// if ( cleanCurrentVersion < cleanLatestVersion )
// $('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion)+'</div>');
// else
$('#versioninforesult').html('<div class="bs-callout bs-callout-success" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatesuccess')+'</div>');
if ( cleanCurrentVersion < cleanLatestVersion )
$('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion.tag_name) + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')</div>');
else
$('#versioninforesult').html('<div class="bs-callout bs-callout-success" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatesuccess')+'</div>');
}
});
//determine platform
var grabbers = window.serverInfo.grabbers.available;
var html = "";

View File

@ -2,10 +2,13 @@
window.webPrio = 1;
window.webOrigin = "Web Configuration";
window.showOptHelp = true;
window.gitHubReleaseApiUrl = "https://api.github.com/repos/hyperion-project/hyperion.ng/releases";
window.currentVersion = null;
window.latestVersion = null;
window.latestStableVersion = null;
window.latestBetaVersion = null;
window.gitHubVersionList = null;
window.serverInfo = {};
window.parsedUpdateJSON = {};
window.serverSchema = {};
window.serverConfig = {};
window.schema = {};

View File

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

View File

@ -198,7 +198,7 @@ function showInfoDialog(type,header,message)
$('#id_body').append(message);
$('#id_footer').html('<button type="button" class="btn btn-primary" data-dismiss="modal">'+$.i18n('general_btn_ok')+'</button>');
}
$('#id_body').append('<h4 style="font-weight:bold;text-transform:uppercase;">'+header+'</h4>');
$('#id_body').append(message);
@ -709,3 +709,51 @@ function encode_utf8(s)
{
return unescape(encodeURIComponent(s));
}
function getReleases(callback)
{
$.ajax({
url: window.gitHubReleaseApiUrl,
method: 'get',
error: function(XMLHttpRequest, textStatus, errorThrown)
{
callback(false);
},
success: function(releases)
{
window.gitHubVersionList = releases;
for(var i in releases)
{
if(releases[i].prerelease == true)
{
window.latestBetaVersion = releases[i];
break;
}
}
$.ajax({
url: window.gitHubReleaseApiUrl + "/latest",
method: 'get',
error: function(XMLHttpRequest, textStatus, errorThrown)
{
callback(false);
},
success: function(latest)
{
window.latestStableVersion = latest;
if(window.serverConfig.general.versionBranch == "Beta" && window.latestStableVersion.tag_name.replace(/\./g, '') <= window.latestBetaVersion.tag_name.replace(/\./g, ''))
{
window.latestVersion = window.latestBetaVersion;
}
else
{
window.latestVersion = window.latestStableVersion;
}
callback(true);
}
});
}
})
}

View File

@ -6,10 +6,12 @@
{
/// general Settings
/// * '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.
"general" :
{
"name" : "MyHyperionConfig",
"versionBranch" : "Stable",
"showOptHelp" : true
},
/// set log level: silent warn verbose debug

View File

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

View File

@ -14,13 +14,26 @@
"required" : true,
"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" :
{
"type" : "boolean",
"title" : "edt_conf_gen_showOptHelp_title",
"default" : true,
"required" : true,
"propertyOrder" : 2
"propertyOrder" : 3
}
},
"additionalProperties" : false