1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

Merge pull request #333 from catborise/master

spice console password fix & translate additions
This commit is contained in:
Anatoliy Guskov 2020-06-26 15:27:03 +03:00 committed by GitHub
commit 6c79c2bace
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 15 deletions

View file

@ -62,7 +62,7 @@
password = document.getElementById("password").value;
if ((!host) || (!port)) {
console.log("must set host and port");
console.log('{% trans "must set host and port" %}');
return;
}
@ -88,7 +88,7 @@
}
function disconnect() {
console.log(">> disconnect");
console.log(">>" + '{% trans "disconnect" %}');
if (sc) {
sc.stop();
}
@ -102,7 +102,7 @@
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
}
console.log("<< disconnect");
console.log("<<" + '{% trans "disconnect" %}');
}
function agent_connected(sc) {
@ -119,7 +119,7 @@
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
}
else {
console.log("File API is not supported");
console.log('{% trans "File API is not supported" %}');
}
}
@ -202,12 +202,14 @@
{% block content %}
<div id="login">
<span class="logo">SPICE</span>
<label for="host">{% trans 'Host' %}:</label> <input type='text' id='host' value='{{ ws_host }}'> <!-- localhost -->
<label for="port">{% trans 'Port' %}:</label> <input type='text' id='port' value='{{ ws_port }}'>
<label for="password">{% trans 'Password' %}:</label> <input type='password' id='password'
value='{{ console_passwd }}'>
<label for="show_console">{% trans 'Show console' %}</label><input type="checkbox" id="show_console" value="1"
onchange="toggle_console()" checked>
<label for="host">{% trans 'Host' %}:</label>
<input type='text' id='host' value='{{ ws_host }}'>
<label for="port">{% trans 'Port' %}:</label>
<input type='text' id='port' value='{{ ws_port }}'>
<label for="password">{% trans 'Password' %}:</label>
<input type='password' id='password'>
<label for="show_console">{% trans 'Show console' %}</label>
<input type="checkbox" id="show_console" value="1" onchange="toggle_console()" checked>
<button id="connectButton">{% trans 'Start' %}</button>
</div>

View file

@ -104,14 +104,14 @@
if (password === undefined) {
password = spice_query_var('password', '');
password = '{{ console_passwd | safe }}';
//password = '{{ console_passwd | safe }}';
}
if (password === 'None') password = '';
var path = spice_query_var('path', 'websockify');
if ((!host) || (!port)) {
console.log(_("must specify host and port in URL"));
console.log('{% trans "must specify host and port in URL" %}');
return;
}
@ -139,7 +139,7 @@
}
function disconnect() {
console.log(">> disconnect");
console.log(">>" + '{% trans "disconnect" %}');
if (sc) {
sc.stop();
}
@ -151,7 +151,7 @@
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
}
console.log("<< disconnect");
console.log("<<" + '{% trans "disconnect" %}');
}
function agent_connected(sc) {
@ -168,7 +168,7 @@
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
}
else {
console.log("File API is not supported");
console.log('{% trans "File API is not supported" %}');
}
}