- 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!
-
-
-
diff --git a/console/src/index.js b/console/src/index.js
deleted file mode 100755
index 01360fedfd..0000000000
--- a/console/src/index.js
+++ /dev/null
@@ -1,123 +0,0 @@
-$(function() {
- const ipcRenderer = require('electron').ipcRenderer;
- const HFProcess = require('./modules/hf-process.js');
-
- var settingsButton = $('#manage-server #settings');
-
- const DISABLED_HREF_ATTR = 'data-disabled-href';
- function toggleManageButton(button, enabled) {
- if (enabled) {
- button.attr('href', button.attr(DISABLED_HREF_ATTR));
- button.removeAttr(DISABLED_HREF_ATTR);
- button.removeClass('disabled');
- } else {
- button.attr(DISABLED_HREF_ATTR, button.attr('href'));
- button.removeAttr('href');
- button.addClass('disabled');
- }
- }
-
- function onProcessUpdate(event, arg) {
- console.log("update", event, arg);
-
- // var interfaceState = arg.interface.state;
- // $('#process-interface .status').text(interfaceState);
- // var interfaceOn = interfaceState != 'stopped';
- // $('#process-interface .power-on').prop('disabled', interfaceOn);
- // $('#process-interface .power-off').prop('disabled', !interfaceOn);
-
- var sendingProcess = arg;
-
- var processCircle = null;
- if (sendingProcess.name == "domain-server") {
- processCircle = $('#ds-status .circle');
- } else if (sendingProcess.name == "ac-monitor") {
- processCircle = $('#ac-status .circle');
- } else {
- return;
- }
-
- if (sendingProcess.name == "domain-server") {
- toggleManageButton(settingsButton,
- sendingProcess.state == HFProcess.ProcessStates.STARTED);
- }
-
- switch (sendingProcess.state) {
- case HFProcess.ProcessStates.STOPPED:
- processCircle.attr('class', 'circle stopped');
- break;
- case HFProcess.ProcessStates.STOPPING:
- processCircle.attr('class', 'circle stopping');
- break;
- case HFProcess.ProcessStates.STARTED:
- processCircle.attr('class', 'circle started');
- break;
- }
- }
-
- 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
- toggleManageButton(goButton, false);
-
- // 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
- toggleManageButton(goButton, true);
-
- // hide the server stopped text
- serverStopped.hide();
-
- break;
- }
- }
-
- $('#last-visited-link').click(function() {
- ipcRenderer.send('start-interface');
- });
-
- $('#go-server-button').click(function(e){
- if ($(this).hasClass('disabled')) {
- e.preventDefault();
- } else {
- ipcRenderer.send('start-interface', { url: 'hifi://localhost' });
- }
- });
-
- $('#manage-server #restart').click(function() {
- ipcRenderer.send('restart-server', { name: 'home' });
- });
-
- $('#manage-server #stop').click(function(e) {
- if ($(this).hasClass('disabled')) {
- e.preventDefault();
- } else {
- ipcRenderer.send('stop-server', { name: 'home' });
- }
- });
-
- $('#open-logs').click(function() {
- ipcRenderer.send('open-logs');
- });
-
- ipcRenderer.on('process-update', onProcessUpdate);
- ipcRenderer.on('process-group-update', onProcessGroupUpdate);
-
- ipcRenderer.send('update-all-processes');
-});
diff --git a/console/src/main.js b/console/src/main.js
index 4901553f35..10b2b3b15f 100644
--- a/console/src/main.js
+++ b/console/src/main.js
@@ -2,7 +2,6 @@
var electron = require('electron');
var app = electron.app; // Module to control application life.
-var BrowserWindow = require('browser-window'); // Module to create native browser window.
var Menu = require('menu');
var Tray = require('tray');
var shell = require('shell');
@@ -16,71 +15,13 @@ var ProcessGroup = hfprocess.ProcessGroup;
const ipcMain = electron.ipcMain;
-// Keep a global reference of the window object, if you don't, the window will
-// be closed automatically when the JavaScript object is garbage collected.
-var mainWindow = null;
var tray = null;
var path = require('path');
var TRAY_ICON = path.join(__dirname, '../resources/console-tray.png');
-var APP_ICON = path.join(__dirname, '../resources/console.png');
-
-// Don't quit when all windows are closed, make user explicitly quit from tray
-app.on('window-all-closed', function() {});
-
-function createNewWindow() {
- // Create the browser window.
- mainWindow = new BrowserWindow({
- title: "High Fidelity",
- width: 970,
- height: 775,
- icon: APP_ICON,
- resizable: false
- });
-
- // In debug mode, keep the menu bar, but auto-hide it so the UI still looks the same.
- if (debug) {
- mainWindow.setAutoHideMenuBar(true);
- } else {
- mainWindow.setMenu(null);
- }
-
- // and load the index.html of the app.
- mainWindow.loadURL('file://' + __dirname + '/index.html');
-
- // Open the DevTools.
- mainWindow.webContents.openDevTools();
-
- // Emitted when the window is closed.
- mainWindow.on('closed', function() {
- // Dereference the window object, usually you would store windows
- // in an array if your app supports multi windows, this is the time
- // when you should delete the corresponding element.
- mainWindow = null;
- });
-
- // When a link is clicked that has `_target="_blank"`, open it in the user's native browser
- mainWindow.webContents.on('new-window', function(e, url) {
- e.preventDefault();
- shell.openExternal(url);
- });
-}
-
-// When a user clicks on dock icon, re-create the window if we don't have one
-app.on('activate', function(){
- if (!mainWindow) {
- createNewWindow();
- }
-})
var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
- // Someone tried to run a second instance, we should focus our window
- if (mainWindow) {
- if (mainWindow.isMinimized()) {
- mainWindow.restore();
- }
- mainWindow.focus();
- }
+ // Someone tried to run a second instance, focus the window (if there is one)
return true;
});
@@ -122,6 +63,9 @@ function openFileBrowser(path) {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', function() {
+ // hide the dock icon
+ app.dock.hide()
+
// Create tray icon
tray = new Tray(TRAY_ICON);
tray.setToolTip('High Fidelity');
@@ -132,11 +76,6 @@ app.on('ready', function() {
}]);
tray.setContextMenu(contextMenu);
- // Require electron-compile to use LESS files in place of basic CSS
- require('electron-compile').init();
-
- createNewWindow();
-
var logPath = path.join(app.getAppPath(), 'logs');
if (interfacePath && dsPath && acPath) {
@@ -154,22 +93,9 @@ app.on('ready', function() {
home: homeServer
};
- function sendProcessUpdate(process) {
- if (mainWindow) {
- console.log("Sending process update to web view for " + process.name);
- mainWindow.webContents.send('process-update', process);
- }
- };
-
- function sendProcessGroupUpdate(processGroup) {
- if (mainWindow) {
- mainWindow.webContents.send('process-group-update', processGroup);
- }
- }
-
// handle process updates
- homeServer.on('process-update', sendProcessUpdate);
- homeServer.on('state-update', sendProcessGroupUpdate);
+ // homeServer.on('process-update', sendProcessUpdate);
+ // homeServer.on('state-update', sendProcessGroupUpdate);
// start the home server
homeServer.start();
@@ -199,13 +125,13 @@ app.on('ready', function() {
});
ipcMain.on('update-all-processes', function(event, arg) {
- // enumerate our processes and call sendProcessUpdate to update
- // the window with their status
- for (let process of homeServer.processes) {
- sendProcessUpdate(process);
- }
-
- sendProcessGroupUpdate(homeServer);
+ // // enumerate our processes and call sendProcessUpdate to update
+ // // the window with their status
+ // for (let process of homeServer.processes) {
+ // sendProcessUpdate(process);
+ // }
+ //
+ // sendProcessGroupUpdate(homeServer);
});
}
});
diff --git a/console/src/vendor/Raleway/OFL.txt b/console/src/vendor/Raleway/OFL.txt
deleted file mode 100755
index 1c9779ddcd..0000000000
--- a/console/src/vendor/Raleway/OFL.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-Copyright (c) 2010, Matt McInerney (matt@pixelspread.com),
-Copyright (c) 2011, Pablo Impallari (www.impallari.com|impallari@gmail.com),
-Copyright (c) 2011, Rodrigo Fuenzalida (www.rfuenzalida.com|hello@rfuenzalida.com), with Reserved Font Name Raleway
-This Font Software is licensed under the SIL Open Font License, Version 1.1.
-This license is copied below, and is also available with a FAQ at:
-http://scripts.sil.org/OFL
-
-
------------------------------------------------------------
-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
------------------------------------------------------------
-
-PREAMBLE
-The goals of the Open Font License (OFL) are to stimulate worldwide
-development of collaborative font projects, to support the font creation
-efforts of academic and linguistic communities, and to provide a free and
-open framework in which fonts may be shared and improved in partnership
-with others.
-
-The OFL allows the licensed fonts to be used, studied, modified and
-redistributed freely as long as they are not sold by themselves. The
-fonts, including any derivative works, can be bundled, embedded,
-redistributed and/or sold with any software provided that any reserved
-names are not used by derivative works. The fonts and derivatives,
-however, cannot be released under any other type of license. The
-requirement for fonts to remain under this license does not apply
-to any document created using the fonts or their derivatives.
-
-DEFINITIONS
-"Font Software" refers to the set of files released by the Copyright
-Holder(s) under this license and clearly marked as such. This may
-include source files, build scripts and documentation.
-
-"Reserved Font Name" refers to any names specified as such after the
-copyright statement(s).
-
-"Original Version" refers to the collection of Font Software components as
-distributed by the Copyright Holder(s).
-
-"Modified Version" refers to any derivative made by adding to, deleting,
-or substituting -- in part or in whole -- any of the components of the
-Original Version, by changing formats or by porting the Font Software to a
-new environment.
-
-"Author" refers to any designer, engineer, programmer, technical
-writer or other person who contributed to the Font Software.
-
-PERMISSION & CONDITIONS
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Font Software, to use, study, copy, merge, embed, modify,
-redistribute, and sell modified and unmodified copies of the Font
-Software, subject to the following conditions:
-
-1) Neither the Font Software nor any of its individual components,
-in Original or Modified Versions, may be sold by itself.
-
-2) Original or Modified Versions of the Font Software may be bundled,
-redistributed and/or sold with any software, provided that each copy
-contains the above copyright notice and this license. These can be
-included either as stand-alone text files, human-readable headers or
-in the appropriate machine-readable metadata fields within text or
-binary files as long as those fields can be easily viewed by the user.
-
-3) No Modified Version of the Font Software may use the Reserved Font
-Name(s) unless explicit written permission is granted by the corresponding
-Copyright Holder. This restriction only applies to the primary font name as
-presented to the users.
-
-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
-Software shall not be used to promote, endorse or advertise any
-Modified Version, except to acknowledge the contribution(s) of the
-Copyright Holder(s) and the Author(s) or with their explicit written
-permission.
-
-5) The Font Software, modified or unmodified, in part or in whole,
-must be distributed entirely under this license, and must not be
-distributed under any other license. The requirement for fonts to
-remain under this license does not apply to any document created
-using the Font Software.
-
-TERMINATION
-This license becomes null and void if any of the above conditions are
-not met.
-
-DISCLAIMER
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/console/src/vendor/Raleway/Raleway-Regular.ttf b/console/src/vendor/Raleway/Raleway-Regular.ttf
deleted file mode 100755
index 252cad14a6..0000000000
Binary files a/console/src/vendor/Raleway/Raleway-Regular.ttf and /dev/null differ