Merge pull request #8795 from Atlante45/fix/content-update-window

Update window size automaticatlly
This commit is contained in:
Clément Brisset 2016-10-13 10:53:56 -07:00 committed by GitHub
commit b53559a64a
3 changed files with 12 additions and 4 deletions

View file

@ -6,7 +6,7 @@
<link rel="stylesheet" type="text/css" href="content-update.css"></link>
</head>
<body onload="ready()">
<div class="colmask">
<div class="colmask" id="content">
<h3>We backed up your old Sandbox content, just in case.</h3>
<p><b>To restore it, follow these steps:</b>
@ -45,9 +45,9 @@
</div>
<div class="footer">
<p>For more information about managing your high Fidelity Sandbox Server, check out our docs: <a href="https://wiki.highfidelity.com/wiki/Sandbox" target="_blank">wiki.highfidelity.com/wiki/Sandbox</a>
<p>For more information about managing your high Fidelity Sandbox Server, check out our docs: <a href="https://wiki.highfidelity.com/wiki/Sandbox" target="_blank">wiki.highfidelity.com/wiki/Sandbox</a>
</p>
</div>
</div>
</div>
</body>
</html>

View file

@ -6,6 +6,11 @@ function ready() {
electron.ipcRenderer.on('update', function(event, message) {
$('#directory').html(message);
electron.ipcRenderer.send('setSize', {
width: $(window).width(),
height: $('#content').height() + 50
});
});
electron.ipcRenderer.send('ready');

View file

@ -530,6 +530,9 @@ function openBackupInstructions(folder) {
}
window.show();
electron.ipcMain.on('setSize', function(event, obj) {
window.setSize(obj.width, obj.height);
});
electron.ipcMain.on('ready', function() {
console.log("got ready");
window.webContents.send('update', folder);