Skip to content

Commit ba78f9a

Browse files
committed
Initial commit
0 parents  commit ba78f9a

File tree

131 files changed

+14748
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+14748
-0
lines changed

.babelrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": [ "env", "stage-0", "react" ],
3+
"plugins": ["emotion"]
4+
}

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Generated files
2+
dist/
3+
4+
# Node modules
5+
node_modules/
6+
7+
#macOS files
8+
.DS_Store
9+
10+
#Sensitive info
11+
wallet.json
12+

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# spin-protocol-admin-tool
2+
Administration App for SpinProtocol decentralized environment
3+
4+
## Installing dependencies
5+
6+
```
7+
# Install nvm
8+
brew install nvm
9+
10+
# Install node.js
11+
nvm node v8.12.0
12+
13+
# Install node modules (run in the project directory)
14+
npm install
15+
16+
# Install electron
17+
npm install -g electron
18+
19+
# Install browserify
20+
npm install -g browserify
21+
22+
```
23+
24+
## Running app
25+
26+
1. Clone sub-project to your local `git clone https://github.com/spinprotocol/ethers.js.git`
27+
2. `nvm use v8.12.0`
28+
3. Install sub-project as npm module locally `npm link <path_to_sub_project/ethers.js>`
29+
4. For development stage run `npm run buildRun-dev` in project directory
30+
5. For production stage run `npm run buildRun-prod` in project directory

app.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
const {app, BrowserWindow, Menu} = require('electron')
2+
const electron = require('electron')
3+
const path = require('path')
4+
const url = require('url')
5+
6+
7+
// Keep a global reference of the window object, if you don't, the window will
8+
// be closed automatically when the JavaScript object is garbage collected.
9+
let win
10+
11+
function createWindow () {
12+
// Create the browser window.
13+
win = new BrowserWindow({width: 1300, height: 880, frame: true})
14+
15+
// and load the index.html of the app.
16+
win.loadURL(url.format({
17+
pathname: path.join(__dirname, './html/index.html'),
18+
protocol: 'file:',
19+
slashes: true
20+
}));
21+
22+
// Open the DevTools.
23+
win.webContents.openDevTools();
24+
25+
// Emitted when the window is closed.
26+
win.on('closed', () => {
27+
// Dereference the window object, usually you would store windows
28+
// in an array if your app supports multi windows, this is the time
29+
// when you should delete the corresponding element.
30+
win = null;
31+
});
32+
}
33+
34+
// This method will be called when Electron has finished
35+
// initialization and is ready to create browser windows.
36+
// Some APIs can only be used after this event occurs.
37+
app.on('ready', createWindow);
38+
39+
app.on('activate', () => {
40+
// On macOS it's common to re-create a window in the app when the
41+
// dock icon is clicked and there are no other windows open.
42+
if (win === null) {
43+
createWindow();
44+
}
45+
});

html/index.html

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta
7+
name="viewport"
8+
content="minimum-scale=1, initial-scale=1, width=device-width, shrink-to-fit=no"
9+
>
10+
<title>Simple Wallet</title>
11+
<!-- Latest compiled and minified CSS -->
12+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
13+
<!-- Optional theme -->
14+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
15+
<style>
16+
body {background-color: #b3e5fc;}
17+
</style>
18+
</head>
19+
20+
<body>
21+
<div id="app"/>
22+
</body>
23+
24+
<script src="../dist/bundle.js"></script>
25+
26+
</html>

0 commit comments

Comments
 (0)