Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sobachef committed Oct 28, 2020
0 parents commit 03b9c42
Show file tree
Hide file tree
Showing 8 changed files with 3,153 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2020 sobachef

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Starfish Desktop

Starfish desktop is a cross platform (Mac, Windows, Linux) desktop app that wraps [starfish-server](https://github.com/sobachef/starfish-server), a web server that runs in the background and signs any incoming request to sign a message using its internal private keys.

Learn more about Starfish here: https://starfish.computer

# Usage

- Download the apps at https://starfish.computer/download.html
- Learn how to use at https://starfish.computer

# Build

To build this repository, first install `electron-builder`.

```
npm install -g electron-builder
```

Then run:

```
npm run build
```
Binary file added extraResources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const {app, Menu, Tray } = require('electron')
const starfishd = require('starfishd')
const open = require('open')
let tray = null
const init = () => {
const homedir = require('os').homedir();
starfishd({ db: homedir + "/.starfish" })
createTray()
open("http://localhost:21000")
}
const createTray = () => {
tray = new Tray(process.resourcesPath + "/extraResources/icon.png")
const contextMenu = Menu.buildFromTemplate([{
label: 'Dashboard',
click: () => {
open("http://localhost:21000")
}
}, {
label: 'Exit',
click: () => {
app.quit()
}
}])
if (process.platform === 'win32') {
tray.on('click', () => {
tray.popUpContextMenu(contextMenu)
})
}
tray.setToolTip('Starfish')
tray.setContextMenu(contextMenu)
}
app.whenReady().then(() => {
init()
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
if (app.dock) app.dock.hide()
Loading

0 comments on commit 03b9c42

Please sign in to comment.