mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 23:55:24 +00:00
spice console password fix & translate additions
This commit is contained in:
parent
ce123d1f22
commit
1320753d6c
2 changed files with 17 additions and 15 deletions
|
@ -62,7 +62,7 @@
|
||||||
password = document.getElementById("password").value;
|
password = document.getElementById("password").value;
|
||||||
|
|
||||||
if ((!host) || (!port)) {
|
if ((!host) || (!port)) {
|
||||||
console.log("must set host and port");
|
console.log('{% trans "must set host and port" %}');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function disconnect() {
|
function disconnect() {
|
||||||
console.log(">> disconnect");
|
console.log(">>" + '{% trans "disconnect" %}');
|
||||||
if (sc) {
|
if (sc) {
|
||||||
sc.stop();
|
sc.stop();
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
||||||
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||||
}
|
}
|
||||||
console.log("<< disconnect");
|
console.log("<<" + '{% trans "disconnect" %}');
|
||||||
}
|
}
|
||||||
|
|
||||||
function agent_connected(sc) {
|
function agent_connected(sc) {
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log("File API is not supported");
|
console.log('{% trans "File API is not supported" %}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,12 +202,14 @@
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<span class="logo">SPICE</span>
|
<span class="logo">SPICE</span>
|
||||||
<label for="host">{% trans 'Host' %}:</label> <input type='text' id='host' value='{{ ws_host }}'> <!-- localhost -->
|
<label for="host">{% trans 'Host' %}:</label>
|
||||||
<label for="port">{% trans 'Port' %}:</label> <input type='text' id='port' value='{{ ws_port }}'>
|
<input type='text' id='host' value='{{ ws_host }}'>
|
||||||
<label for="password">{% trans 'Password' %}:</label> <input type='password' id='password'
|
<label for="port">{% trans 'Port' %}:</label>
|
||||||
value='{{ console_passwd }}'>
|
<input type='text' id='port' value='{{ ws_port }}'>
|
||||||
<label for="show_console">{% trans 'Show console' %}</label><input type="checkbox" id="show_console" value="1"
|
<label for="password">{% trans 'Password' %}:</label>
|
||||||
onchange="toggle_console()" checked>
|
<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>
|
<button id="connectButton">{% trans 'Start' %}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -104,14 +104,14 @@
|
||||||
|
|
||||||
if (password === undefined) {
|
if (password === undefined) {
|
||||||
password = spice_query_var('password', '');
|
password = spice_query_var('password', '');
|
||||||
password = '{{ console_passwd | safe }}';
|
//password = '{{ console_passwd | safe }}';
|
||||||
}
|
}
|
||||||
if (password === 'None') password = '';
|
if (password === 'None') password = '';
|
||||||
|
|
||||||
var path = spice_query_var('path', 'websockify');
|
var path = spice_query_var('path', 'websockify');
|
||||||
|
|
||||||
if ((!host) || (!port)) {
|
if ((!host) || (!port)) {
|
||||||
console.log(_("must specify host and port in URL"));
|
console.log('{% trans "must specify host and port in URL" %}');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function disconnect() {
|
function disconnect() {
|
||||||
console.log(">> disconnect");
|
console.log(">>" + '{% trans "disconnect" %}');
|
||||||
if (sc) {
|
if (sc) {
|
||||||
sc.stop();
|
sc.stop();
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
document.getElementById('spice-area').removeEventListener('dragover', SpiceHtml5.handle_file_dragover, false);
|
||||||
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
document.getElementById('spice-area').removeEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||||
}
|
}
|
||||||
console.log("<< disconnect");
|
console.log("<<" + '{% trans "disconnect" %}');
|
||||||
}
|
}
|
||||||
|
|
||||||
function agent_connected(sc) {
|
function agent_connected(sc) {
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
document.getElementById('spice-area').addEventListener('drop', SpiceHtml5.handle_file_drop, false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log("File API is not supported");
|
console.log('{% trans "File API is not supported" %}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue