appending the copied item, in the text area
This commit is contained in:
parent
4cb5aa45ae
commit
3a1b6c2c51
11
app/ui.js
11
app/ui.js
|
|
@ -45,6 +45,7 @@ const UI = {
|
||||||
inhibitReconnect: true,
|
inhibitReconnect: true,
|
||||||
reconnectCallback: null,
|
reconnectCallback: null,
|
||||||
reconnectPassword: null,
|
reconnectPassword: null,
|
||||||
|
lastTextCopiedFromTerminal: null,
|
||||||
|
|
||||||
async start(options={}) {
|
async start(options={}) {
|
||||||
UI.customSettings = options.settings || {};
|
UI.customSettings = options.settings || {};
|
||||||
|
|
@ -996,8 +997,14 @@ const UI = {
|
||||||
|
|
||||||
clipboardReceive(e) {
|
clipboardReceive(e) {
|
||||||
Log.Debug(">> UI.clipboardReceive: " + e.detail.text.substr(0, 40) + "...");
|
Log.Debug(">> UI.clipboardReceive: " + e.detail.text.substr(0, 40) + "...");
|
||||||
document.getElementById('noVNC_clipboard_text').value = e.detail.text;
|
const clipboard = document.getElementById('noVNC_clipboard_text');
|
||||||
Log.Debug("<< UI.clipboardReceive");
|
if(this.lastCopiedTextFromTerminal !== e.detail.text) {
|
||||||
|
clipboard.value += (clipboard.value ? "\n" : "") + e.detail.text;
|
||||||
|
Log.Debug("<< UI.clipboardReceive");
|
||||||
|
this.lastCopiedTextFromTerminal = e.detail.text;
|
||||||
|
}else {
|
||||||
|
Log.Debug("<< UI.clipboardReceive, no change");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
clipboardSend() {
|
clipboardSend() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue