better vnc viewer page

This commit is contained in:
Richard Klafter 2017-05-22 16:32:26 -07:00
parent 797136d033
commit a200aded4f
1 changed files with 14 additions and 6 deletions

View File

@ -69,15 +69,18 @@
</div></td> </div></td>
</tr></table> </tr></table>
</div> </div>
<div> <div style="display: flex;">
<div id="vnc-input" tabindex="-1" style="display:inline-block; float:left; margin:10px;"> <div id="vnc-input" tabindex="-1" style="margin:10px; width:1280px; height:800px; background-color:black; overflow:visible;">
<canvas id="noVNC_canvas" width="640px" height="20px" style="position:inherit;"> <canvas id="noVNC_canvas">
Canvas not supported. Canvas not supported.
</canvas> </canvas>
</div> </div>
<div style="width:20%; display:inline-block; float:left; margin:10px;"> <div style="margin:10px; flex: 1; display: flex; align-self:stretch; flex-direction: column;">
<h3 style="color:white; margin:10px;">Remote Clipboard</h3> <h3 style="color:white; margin-top:0px; margin-bottom:5px;">Remote Clipboard</h3>
<textarea id="copyBox" style="height:752px;width:98%;overflow:scroll;"></textarea> <p id="use-yakpal" style="color:white; font-size:14px; margin-top:1px; margin-bottom:1px;">Make copy &amp; paste better by installing
<a style="color:white;" href="https://chrome.google.com/webstore/detail/yakpal/gcjaibancpkbofjlkgihljhdheaokifb?hl=en">YakPal</a>
</p>
<textarea id="copyBox" style="width:100%;overflow:scroll;flex:1;"></textarea>
</div> </div>
</div> </div>
@ -215,6 +218,11 @@
setInterval(function(){ setInterval(function(){
if(!window.yakpal || !window.yakpal.getClipboard) return; if(!window.yakpal || !window.yakpal.getClipboard) return;
//hide use-yakpal if they have it
try{
document.getElementById('use-yakpal').style.display = 'none';
} catch(e){ console.log(e); }
//update clipboard
window.yakpal.getClipboard().then((result)=>{ window.yakpal.getClipboard().then((result)=>{
if(result !== lastClipboard){ if(result !== lastClipboard){
$D('copyBox').value = result; $D('copyBox').value = result;