This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... imports | |
export default class DeckController { | |
private facadeService:IFacadeService; | |
constructor(facadeService:IFacadeService) { | |
this.facadeService = facadeService; | |
} | |
public getDecks():IDeck[] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... imports | |
export default class FacadeService implements IFacadeService { | |
private dataService:IDataService; | |
private uiStateService:IUIStateService; | |
constructor(dataService:IDataService, uiStateService:IUIStateService) { | |
this.dataService = dataService; | |
this.uiStateService = uiStateService; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var remote = require('remote'); | |
var Tray = remote.require('tray'); | |
var Menu = remote.require('menu'); | |
var path = require('path'); | |
var trayIcon = null; | |
if (process.platform === 'darwin') { | |
trayIcon = new Tray(path.join(__dirname, 'img/tray-iconTemplate.png')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var nconf = require('nconf').file({file: getUserHome() + '/sound-machine-config.json'}); | |
function saveSettings(settingKey, settingValue) { | |
nconf.set(settingKey, settingValue); | |
nconf.save(); | |
} | |
function readSettings(settingKey) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var soundButtons = document.querySelectorAll('.button-sound'); | |
for (var i = 0; i < soundButtons.length; i++) { | |
var soundButton = soundButtons[i]; | |
var soundName = soundButton.attributes['data-sound'].value; | |
prepareButton(soundButton, soundName); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.button-sound { | |
... | |
-webkit-app-region: no-drag; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, | |
body { | |
... | |
-webkit-app-region: drag; | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var app = require('app'); | |
var BrowserWindow = require('browser-window'); | |
var mainWindow = null; | |
app.on('ready', function() { | |
mainWindow = new BrowserWindow({ | |
frame: false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Sound Machine</title> | |
<link href="css/bootstrap.css" rel="stylesheet" type="text/css"/> | |
<link href="css/index.css" rel="stylesheet" type="text/css"/> | |
</head> | |
<body> | |
<div id="main" class="container-fluid"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Hello, world!</h1> |