From ddd51264d92795d3b33eae1981c162ab9514be23 Mon Sep 17 00:00:00 2001
From: Stephen Birarda
Date: Tue, 22 Dec 2015 15:14:25 -0700
Subject: [PATCH] hook up the go button to localhost
---
console/src/css/style.less | 13 +++++++++++++
console/src/images/go-hmd.svg | 18 ++++++++++++++++++
console/src/index.html | 3 +++
console/src/index.js | 7 ++++++-
console/src/main.js | 4 ++--
5 files changed, 42 insertions(+), 3 deletions(-)
create mode 100644 console/src/images/go-hmd.svg
diff --git a/console/src/css/style.less b/console/src/css/style.less
index dd68d4c4ab..613dd89693 100644
--- a/console/src/css/style.less
+++ b/console/src/css/style.less
@@ -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;
+ }
+ }
}
}
}
diff --git a/console/src/images/go-hmd.svg b/console/src/images/go-hmd.svg
new file mode 100644
index 0000000000..4e4fc8566e
--- /dev/null
+++ b/console/src/images/go-hmd.svg
@@ -0,0 +1,18 @@
+
+
+
diff --git a/console/src/index.html b/console/src/index.html
index 20d4d460dc..990adb3285 100644
--- a/console/src/index.html
+++ b/console/src/index.html
@@ -73,6 +73,9 @@
to build, explore, and share. We’ve started you off with a
home full of goodies to help you learn the ropes. Enjoy!
+
diff --git a/console/src/index.js b/console/src/index.js
index f57e5aa6c0..dd7af7f754 100755
--- a/console/src/index.js
+++ b/console/src/index.js
@@ -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' });
});
diff --git a/console/src/main.js b/console/src/main.js
index 2a92f395c8..062746bac6 100644
--- a/console/src/main.js
+++ b/console/src/main.js
@@ -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();
});