diff --git a/console/src/css/style.less b/console/src/css/style.less index df6d310406..64c202482b 100644 --- a/console/src/css/style.less +++ b/console/src/css/style.less @@ -16,14 +16,14 @@ html { body { height: 100%; overflow: auto; - font-family: 'Raleway', sans-serif; + font-family: 'Raleway'; background-image: url('../images/background.jpg'); margin: 0; font-size: 11px; - letter-spacing: 1px; + letter-spacing: 0.075rem; } -input, textarea, select, a { +input, textarea, select, a, button { outline: none; } @@ -48,6 +48,11 @@ header { margin: 0px 75px; color: white; + a { + color: white; + text-decoration: none; + } + p { text-align: center; } @@ -132,19 +137,27 @@ header { height: @focus-height - @info-padding-top-bottom - @info-padding-top-bottom; padding: @info-padding-top-bottom 75px; + @title-margin-left: 255px; + h2 { color: black; font-size: 36px; - margin-left: 255px; + margin-left: @title-margin-left; margin-bottom: 0px; } .server-box { float: left; + margin-top: 5px; .title { border-bottom: 1px solid @dark-gray; margin-bottom: 20px; + + p { + color: white; + margin-top: 0px; + } } .process-status { @@ -184,6 +197,37 @@ header { width: 215px; } } + + &#right-box { + position: absolute; + margin-left: @title-margin-left; + + #go-server-button { + float: left; + box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.5); + cursor: pointer; + border: none; + margin-top: 10px; + background-color: #129EC0; + width: 150px; + + &.disabled { + cursor: default; + background-color: #86888F; + } + + img { + padding: 10px 0px; + width: 50px; + } + } + + #server-stopped-text { + float: left; + margin: 20px 0px 0px 20px; + color: red; + } + } } } } 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 99dcf064c9..8a54567c14 100644 --- a/console/src/index.html +++ b/console/src/index.html @@ -28,10 +28,12 @@

Search

@@ -64,6 +66,18 @@
+

hifi://localhost

+
+

+ This is your domain. 4096 cubic kilometers of space for you
+ to build, explore, and share. We’ve started you off with a
+ home full of goodies to help you learn the ropes. Enjoy! +

+ +
+ Server stopped
Click "Restart"
diff --git a/console/src/index.js b/console/src/index.js index 937b0ad970..6da2986a0f 100755 --- a/console/src/index.js +++ b/console/src/index.js @@ -47,8 +47,6 @@ $(function() { processCircle.attr('class', 'circle stopping'); break; case HFProcess.ProcessStates.STARTED: - - processCircle.attr('class', 'circle started'); break; } @@ -57,26 +55,44 @@ $(function() { function onProcessGroupUpdate(event, arg) { var sendingGroup = arg; var stopButton = $('#manage-server #stop'); + var goButton = $('#go-server-button'); + var serverStopped = $('#server-stopped-text'); switch (sendingGroup.state) { case HFProcess.ProcessGroupStates.STOPPED: case HFProcess.ProcessGroupStates.STOPPING: // if the process group is stopping, the stop button should be disabled toggleManageButton(stopButton, false); + + // disable the go button + goButton.addClass('disabled'); + + // show the server stopped text + serverStopped.show(); + break; case HFProcess.ProcessGroupStates.STARTED: // if the process group is going, the stop button should be active toggleManageButton(stopButton, true); + + // enable the go button + goButton.removeClass('disabled'); + + // hide the server stopped text + serverStopped.hide(); + break; } } - $('#process-interface .power-on').click(function() { - ipcRenderer.send('start-process', { name: 'interface' }); - }); - $('#process-interface .power-off').click(function() { - ipcRenderer.send('stop-process', { name: 'interface' }); + $('#last-visited-link').click(function() { + ipcRenderer.send('start-interface'); }); + + $('#go-server-button:not(.disabled)').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 4dc7c82ab9..062746bac6 100644 --- a/console/src/main.js +++ b/console/src/main.js @@ -120,8 +120,6 @@ app.on('ready', function() { var logPath = path.join(app.getAppPath(), 'logs'); if (interfacePath && dsPath && acPath) { - var pInterface = new Process('interface', interfacePath); - var homeServer = new ProcessGroup('home', [ new Process('domain-server', dsPath), new Process('ac-monitor', acPath, ['-n6', '--log-directory', logPath]) @@ -129,12 +127,10 @@ app.on('ready', function() { // make sure we stop child processes on app quit app.on('quit', function(){ - pInterface.stop(); homeServer.stop(); }); var processes = { - interface: pInterface, home: homeServer }; @@ -152,19 +148,23 @@ app.on('ready', function() { } // handle process updates - // pInterface.on('state-update', sendProcessUpdate); homeServer.on('process-update', sendProcessUpdate); homeServer.on('state-update', sendProcessGroupUpdate); // start the home server homeServer.start(); - // ipcMain.on('start-process', function(event, arg) { - // pInterface.start(); - // }); - // ipcMain.on('stop-process', function(event, arg) { - // pInterface.stop(); - // }); + ipcMain.on('start-interface', function(event, arg) { + // check if we have a url parameter to include + var argArray = []; + if (arg.url) { + argArray = ["--url", arg.url] + } + + // create a new Interface instance - Interface makes sure only one is running at a time + var pInterface = new Process('interface', interfacePath, argArray); + pInterface.start(); + }); ipcMain.on('restart-server', function(event, arg) { homeServer.restart(); diff --git a/console/src/modules/hf-process.js b/console/src/modules/hf-process.js index 0d9c72c7d0..c8b9f8e57a 100755 --- a/console/src/modules/hf-process.js +++ b/console/src/modules/hf-process.js @@ -117,7 +117,7 @@ Process.prototype = extend(Process.prototype, { console.warn("Can't start process that is not stopped."); return; } - console.log("Starting " + this.command); + console.log("Starting " + this.command + " " + this.commandArgs.join(' ')); var logStdout = 'ignore', logStderr = 'ignore';