mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
WebUi: Beauty Tweaks (Instance, 3rd party Licenses) (#597)
* WebUi: Instance Management Tweaks and Chars Needed Information * WebUi: 3rd Party Licenses Tweaks * WebUi: Apply changes from Brindosch PR #596 * WebUi: Changing i18n tokens and adding catch event for connection error * WebUi: Adding Link to GitHub License Ressource if an error is catched
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div id="about_cont"></div>
|
||||
|
||||
</div>
|
||||
<div id="danger_act"class="col-lg-6" style="display:none;padding-top:20px">
|
||||
<h4>You found a hidden service menu!</h4>
|
||||
@@ -26,12 +27,10 @@
|
||||
for(key in libs)
|
||||
libh += '<a href="'+libs[key]+'" target="_blank">'+key+'</a>, ';
|
||||
libh += "<br/>"+$.i18n("about_credits");
|
||||
libh += "<br/><a target='_blank' rel='noopener noreferrer' href='https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/3RD_PARTY_LICENSES'>"+$.i18n("about_3rd_party_licenses")+"</a>";
|
||||
|
||||
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://github.com/hyperion-project/hyperion.ng" target="_blank">'+$.i18n("about_contribute")+'</a></p>',libh];
|
||||
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")), $.i18n("about_3rd_party_licenses")];
|
||||
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, '<pre><div id="3rdpartylicenses" style="overflow:scroll;max-height:400px"></div></pre>'];
|
||||
|
||||
createTable("","atb","about_cont");
|
||||
for(var i = 0; i<fc.length; i++)
|
||||
@@ -51,5 +50,23 @@
|
||||
initRestart();
|
||||
});
|
||||
|
||||
var url = 'https://raw.githubusercontent.com/hyperion-project/hyperion.ng/master/3RD_PARTY_LICENSES';
|
||||
fetch(url)
|
||||
.then(function(response) {
|
||||
if(!response.ok)
|
||||
{
|
||||
$("#3rdpartylicenses").html('<a href="' + url + '">' + $.i18n("about_3rd_party_licenses_error") + '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
response.text().then(function(text) {
|
||||
$("#3rdpartylicenses").text(text);
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(function(rejected) {
|
||||
$("#3rdpartylicenses").html('<a href="' + url + '">' + $.i18n("about_3rd_party_licenses_error") + '</a>');
|
||||
});
|
||||
|
||||
removeOverlay();
|
||||
</script>
|
||||
|
@@ -18,10 +18,13 @@
|
||||
<div class="col-lg-6">
|
||||
<input class="form-control" id="inst_name" type="text"></input>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<span id="inst_chars_needed"><br /></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-primary" id="btn_create_inst" data-i18n="conf_general_createInst_btn" disabled>Create New Token</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-footer" style="text-align: right;">
|
||||
<button class="btn btn-primary" id="btn_create_inst" data-i18n="conf_general_createInst_btn" disabled>Create New Instance</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user