mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-07 21:51:23 +00:00
Persist and update clipboard, improve styling.
This commit is contained in:
@@ -113,6 +113,10 @@
|
|||||||
clipboard.value = new_state[name];
|
clipboard.value = new_state[name];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Update clipboard with current data
|
||||||
|
if (state.getProperty("clipboard"))
|
||||||
|
clipboard.value = state.getProperty("clipboard");
|
||||||
|
|
||||||
// Constructs the URL for a client which connects to the connection
|
// Constructs the URL for a client which connects to the connection
|
||||||
// with the given id.
|
// with the given id.
|
||||||
function getClientURL(id) {
|
function getClientURL(id) {
|
||||||
@@ -193,14 +197,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create link to client
|
// Create link to client
|
||||||
var clientLink = document.createElement("a");
|
|
||||||
var url = getClientURL(configs[i].id)
|
var url = getClientURL(configs[i].id)
|
||||||
connection.onclick = new_client(url);
|
connection.onclick = new_client(url);
|
||||||
|
|
||||||
protocol.appendChild(protocolIcon);
|
protocol.appendChild(protocolIcon);
|
||||||
|
|
||||||
clientLink.textContent = configs[i].id;
|
id.textContent = configs[i].id;
|
||||||
id.appendChild(clientLink);
|
|
||||||
|
|
||||||
// Assemble caption
|
// Assemble caption
|
||||||
caption.appendChild(protocol);
|
caption.appendChild(protocol);
|
||||||
|
@@ -233,6 +233,8 @@ GuacamoleUI.attach = function(guac) {
|
|||||||
|
|
||||||
var guac_display = guac.getDisplay();
|
var guac_display = guac.getDisplay();
|
||||||
|
|
||||||
|
var state = new GuacamoleSessionState();
|
||||||
|
|
||||||
// Set document title appropriately, based on prefix and connection name
|
// Set document title appropriately, based on prefix and connection name
|
||||||
function updateTitle() {
|
function updateTitle() {
|
||||||
|
|
||||||
@@ -478,6 +480,10 @@ GuacamoleUI.attach = function(guac) {
|
|||||||
GuacamoleUI.hideStatus();
|
GuacamoleUI.hideStatus();
|
||||||
title_prefix = null;
|
title_prefix = null;
|
||||||
|
|
||||||
|
// Update clipboard with current data
|
||||||
|
if (state.getProperty("clipboard"))
|
||||||
|
guac.setClipboard(state.getProperty("clipboard"));
|
||||||
|
|
||||||
// Regularly update screenshot if storage available
|
// Regularly update screenshot if storage available
|
||||||
if (localStorage)
|
if (localStorage)
|
||||||
window.setInterval(updateThumbnail, 5000);
|
window.setInterval(updateThumbnail, 5000);
|
||||||
@@ -548,8 +554,6 @@ GuacamoleUI.attach = function(guac) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var state = new GuacamoleSessionState();
|
|
||||||
|
|
||||||
// Server copy handler
|
// Server copy handler
|
||||||
guac.onclipboard = function(data) {
|
guac.onclipboard = function(data) {
|
||||||
state.setProperty("clipboard", data);
|
state.setProperty("clipboard", data);
|
||||||
|
@@ -134,6 +134,11 @@ div#login-dialog #login-fields input {
|
|||||||
border: 1px solid #777;
|
border: 1px solid #777;
|
||||||
border-radius: 0.2em;
|
border-radius: 0.2em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
box-shadow:
|
||||||
|
1px 1px 0 rgba(255, 255, 255, 0.25),
|
||||||
|
inset 1px 1px 1px rgba(0, 0, 0, 0.25);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div#login-dialog #login-fields img.logo {
|
div#login-dialog #login-fields img.logo {
|
||||||
@@ -291,8 +296,7 @@ div#recent-connections div.connection {
|
|||||||
background: #CDA;
|
background: #CDA;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection .name a {
|
.connection .name {
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
color: black;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
padding: 0.1em;
|
padding: 0.1em;
|
||||||
|
Reference in New Issue
Block a user