hook up the go button to localhost

This commit is contained in:
Stephen Birarda 2015-12-22 15:14:25 -07:00
parent e7f943db2c
commit ddd51264d9
5 changed files with 42 additions and 3 deletions

View file

@ -201,6 +201,19 @@ header {
&#right-box {
position: absolute;
margin-left: @title-margin-left;
#go-server-button {
cursor: pointer;
border: none;
margin-top: 10px;
background-color: #08A6E0;
width: 150px;
img {
padding: 10px 0px;
width: 50px;
}
}
}
}
}

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="96.3px" height="32px" viewBox="0 0 96.3 32" enable-background="new 0 0 96.3 32" xml:space="preserve">
<path fill="#FFFFFF" d="M32.8,26.8h-6.3c-1.7,0-2.7-1.6-3.7-3c-0.4-0.6-1-1.5-1.3-1.7c-0.3,0.2-1,1.1-1.3,1.6
c-1,1.4-2.1,3.1-3.9,3.1h-6.1c-2.6,0-5.4-1.3-7.1-3.4c-1.4-1.7-2-3.7-1.6-5.6l0.9-4.2C3.1,9.8,5.9,5.2,11,5.2h21
c5.4,0,7.7,5.8,8.7,8.3l0.1,0.2l0.9,4.1c0.4,2-0.2,4-1.5,5.7C38.3,25.5,35.6,26.8,32.8,26.8L32.8,26.8z M21.5,19.7
c1.4,0,2.4,1.4,3.3,2.8c0.4,0.6,1.3,2,1.7,2h6.3c2.1,0,4.2-1,5.4-2.5c0.6-0.8,1.3-2,1-3.7l-0.8-4c-1.4-3.5-3.2-6.8-6.5-6.8H11
c-3.6,0-5.7,3.4-6.4,6.7l-0.8,4.1c-0.2,1.2,0.2,2.5,1.1,3.7c1.3,1.6,3.3,2.5,5.3,2.5h6.1c0.5,0,1.4-1.3,2-2.1
C19.1,21.1,20,19.8,21.5,19.7C21.4,19.7,21.4,19.7,21.5,19.7z"/>
<g>
<path fill="#FFFFFF" d="M55.2,16c0-5.7,4.2-9.5,9.4-9.5c3.3,0,5.5,1.4,7.1,3.4L70,11c-1.2-1.5-3.1-2.5-5.3-2.5
c-4,0-7.1,3.1-7.1,7.5c0,4.3,3.1,7.5,7.1,7.5c2.2,0,4-1,5-2v-3.7h-6.3v-2h8.6v6.6c-1.7,1.9-4.2,3.2-7.2,3.2
C59.4,25.5,55.2,21.7,55.2,16z"/>
<path fill="#FFFFFF" d="M76.8,16c0-5.4,3.7-9.5,9.1-9.5s9.1,4.1,9.1,9.5s-3.7,9.5-9.1,9.5S76.8,21.4,76.8,16z M92.7,16
c0-4.3-2.7-7.5-6.8-7.5c-4.1,0-6.7,3.2-6.7,7.5c0,4.3,2.6,7.5,6.7,7.5C90,23.4,92.7,20.2,92.7,16z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -73,6 +73,9 @@
to build, explore, and share. Weve started you off with a<br>
home full of goodies to help you learn the ropes. Enjoy!
</p>
<button id="go-server-button">
<img src="images/go-hmd.svg" />
</button>
</div>
</div>
<div id="manage-server">

View file

@ -72,8 +72,13 @@ $(function() {
}
$('#last-visited-link').click(function() {
ipcRenderer.send('start-interface', { url: 'hifi://testing-url' });
ipcRenderer.send('start-interface');
});
$('#go-server-button').click(function(){
ipcRenderer.send('start-interface', { url: 'hifi://localhost' });
})
$('#manage-server #restart').click(function() {
ipcRenderer.send('restart-server', { name: 'home' });
});

View file

@ -155,13 +155,13 @@ app.on('ready', function() {
homeServer.start();
ipcMain.on('start-interface', function(event, arg) {
// create a new Interface instance - Interface makes sure only one is running at a time
// check if we have a url parameter to include
var argArray = [];
if (arg.url) {
argArray = ["--url", arg.url]
console.log(argArray);
}
// create a new Interface instance - Interface makes sure only one is running at a time
var pInterface = new Process('interface', interfacePath, argArray);
pInterface.start();
});