add assets and config for packaging

This commit is contained in:
Paul Frazee
2015-06-24 12:24:53 -05:00
parent 7dbf0b46a5
commit af5b5c5706
12 changed files with 61 additions and 4 deletions

BIN
app/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

36
app/index.js Normal file
View File

@@ -0,0 +1,36 @@
var app = require('app')
var Tray = require('tray')
var Menu = require('menu')
var shell = require('shell')
var config = require('ssb-config')
// Report crashes to our server.
//require('crash-reporter').start();
var tray
app.on('ready', function ready () {
// start sbot
require('scuttlebot').init(config, function (err, sbot) {
// setup tray icon
tray = new Tray(__dirname+'/icon.png')
var contextMenu = Menu.buildFromTemplate([
{ label: 'Open App', click: onopen },
{ label: 'Quit', click: onquit }
])
tray.setContextMenu(contextMenu)
tray.setToolTip('Secure Scuttlebutt: Running on port 8008')
tray.on('double-clicked', onopen)
function onopen () {
shell.openExternal('http://localhost:8008')
}
function onquit () {
tray = null
sbot.close()
process.exit()
}
})
});