mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-12 07:57:41 +00:00
Improve styling, add disable sound setting.
This commit is contained in:
@@ -92,19 +92,45 @@
|
||||
|
||||
<h2>Settings</h2>
|
||||
<div id="settings">
|
||||
|
||||
<!-- Auto-fit display -->
|
||||
<dl>
|
||||
<dt>
|
||||
<input type="checkbox" id="auto-fit"/>
|
||||
Auto-fit display to browser window.
|
||||
Auto-fit display to browser window
|
||||
</dt>
|
||||
<dd>
|
||||
If checked, remote displays are automatically
|
||||
scaled to exactly fit within the browser window. If
|
||||
unchecked, remote displays are always shown at their
|
||||
natural resolution, even if doing so causes the display
|
||||
to extend beyond the bounds of the window.
|
||||
<p>
|
||||
If checked, remote displays are automatically
|
||||
scaled to exactly fit within the browser window. If
|
||||
unchecked, remote displays are always shown at their
|
||||
natural resolution, even if doing so causes the
|
||||
display to extend beyond the bounds of the window.
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<!-- Enable/disable sound -->
|
||||
<dl>
|
||||
<dt>
|
||||
<input type="checkbox" id="disable-sound"/>
|
||||
Disable sound
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
If on a device or network where bandwidth usage must
|
||||
be kept to a minimum, you may wish to check this box
|
||||
and disable sound. This can also be necessary if a
|
||||
device doesn't actually support sound, but claims
|
||||
to, resulting in wasted bandwidth.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Changing this setting will only affect
|
||||
future connections.</strong>
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -121,12 +147,17 @@
|
||||
|
||||
var state = new GuacamoleSessionState();
|
||||
var auto_fit = document.getElementById("auto-fit");
|
||||
var disable_sound = document.getElementById("disable-sound");
|
||||
var clipboard = document.getElementById("clipboard");
|
||||
|
||||
auto_fit.onchange = auto_fit.onclick = function() {
|
||||
state.setProperty("auto-fit", auto_fit.checked);
|
||||
};
|
||||
|
||||
disable_sound.onchange = disable_sound.onclick = function() {
|
||||
state.setProperty("disable-sound", disable_sound.checked);
|
||||
};
|
||||
|
||||
clipboard.onchange = function() {
|
||||
state.setProperty("clipboard", clipboard.value);
|
||||
};
|
||||
@@ -136,6 +167,8 @@
|
||||
clipboard.value = new_state[name];
|
||||
else if (name == "auto-fit")
|
||||
auto_fit.checked = new_state[name];
|
||||
else if (name == "disable-sound")
|
||||
disable_sound.checked = new_state[name];
|
||||
};
|
||||
|
||||
// Update clipboard with current data
|
||||
@@ -149,6 +182,9 @@
|
||||
// Update auto-fit setting in UI
|
||||
auto_fit.checked = state.getProperty("auto-fit");
|
||||
|
||||
// Update disable-sound setting in UI
|
||||
disable_sound.checked = state.getProperty("disable-sound");
|
||||
|
||||
// Constructs the URL for a client which connects to the connection
|
||||
// with the given id.
|
||||
function getClientURL(id) {
|
||||
|
Reference in New Issue
Block a user