-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
Release v0.2.0
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build/ | ||
/dist/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"standard" | ||
], | ||
"globals": { | ||
"Atomics": "readonly", | ||
"SharedArrayBuffer": "readonly" | ||
}, | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react" | ||
], | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"rules": { | ||
"indent": [ | ||
2, | ||
4 | ||
], | ||
"arrow-parens": [ | ||
2, | ||
"always" | ||
], | ||
"semi": [ | ||
2, | ||
"always" | ||
], | ||
"comma-dangle": [ | ||
2, | ||
"always-multiline" | ||
], | ||
"jsx-quotes": [ | ||
2 | ||
], | ||
"dot-notation": [ | ||
2, | ||
{ | ||
"allowPattern": "^[0-9A-Za-z]+(_[0-9A-Za-z]+)+$" | ||
} | ||
], | ||
"curly": [ | ||
2, | ||
"all" | ||
], | ||
"react/jsx-first-prop-new-line": [ | ||
2, | ||
"multiline-multiprop" | ||
], | ||
"react/jsx-indent-props": [ | ||
2, | ||
"first" | ||
], | ||
"react/sort-prop-types": [ | ||
2, | ||
{ | ||
"callbacksLast": true, | ||
"requiredFirst": true | ||
} | ||
], | ||
"react/jsx-sort-props": [ | ||
2, | ||
{ | ||
"callbacksLast": true, | ||
"reservedFirst": true, | ||
"shorthandFirst": true | ||
} | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
/dist | ||
/bin | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const builder = require('electron-builder'); | ||
|
||
builder.build({ | ||
targets: builder.Platform.current().createTarget(), | ||
config: { | ||
productName: 'Sentinel Desktop', | ||
compression: process.env.NODE_ENV === 'production' ? 'maximum' : 'store', | ||
extraResources: [ | ||
'bin/manager', | ||
], | ||
linux: { | ||
category: 'Utility', | ||
executableName: 'sentinel-desktop', | ||
icon: 'build/electron/', | ||
target: process.env.NODE_ENV === 'production' ? [ | ||
'AppImage', | ||
'deb', | ||
] : [ | ||
'dir', | ||
], | ||
}, | ||
mac: { | ||
category: 'public.app-category.utilities', | ||
icon: 'build/electron/icon.icns', | ||
}, | ||
win: { | ||
icon: 'build/electron/icon.ico', | ||
}, | ||
}, | ||
}).then(() => { | ||
console.log('Build OK!'); | ||
}).catch(console.error); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"name": "sentinel-desktop", | ||
"version": "0.2.0", | ||
"description": "Sentinel Desktop Client", | ||
"author": { | ||
"name": "Sentinel Development Team", | ||
"email": "[email protected]", | ||
"url": "https://sentinel.co" | ||
}, | ||
"license": "MIT", | ||
"private": false, | ||
"homepage": ".", | ||
"main": "public/electron.js", | ||
"scripts": { | ||
"build": "react-scripts build", | ||
"build:app": "GENERATE_SOURCEMAP=false react-scripts build && NODE_ENV=production node build.js", | ||
"build:app:development": "react-scripts build && NODE_ENV=development node build.js", | ||
"start:app": "react-scripts build && electron .", | ||
"start:app:development": "NODE_ENV=development electron .", | ||
"start:server": "BROWSER=none HTTPS=true react-scripts start" | ||
}, | ||
"devDependencies": { | ||
"@material-ui/core": "^4.9.9", | ||
"@material-ui/icons": "^4.9.1", | ||
"@material-ui/lab": "^4.0.0-alpha.48", | ||
"axios": "^0.19.2", | ||
"bech32": "^1.1.3", | ||
"classnames": "^2.2.6", | ||
"electron": "^8.2.0", | ||
"electron-builder": "^22.4.1", | ||
"eslint": "^6.8.0", | ||
"eslint-config-standard": "^14.1.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-react": "^7.19.0", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"moment": "^2.24.0", | ||
"prop-types": "^15.7.2", | ||
"qrcode.react": "^1.0.0", | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react-redux": "^7.2.0", | ||
"react-router": "^5.1.2", | ||
"react-router-dom": "^5.1.2", | ||
"react-scripts": "^3.4.1", | ||
"redux": "^4.0.5", | ||
"redux-devtools-extension": "^2.13.8", | ||
"redux-thunk": "^2.3.0" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const { app, BrowserWindow, Menu } = require('electron'); | ||
const path = require('path'); | ||
const menu = require('./electron/menu'); | ||
const { spawn } = require('child_process'); | ||
|
||
const iconPath = path.join(__dirname, 'electron/icon.png'); | ||
|
||
let mainWindow = null; | ||
let manager = null; | ||
|
||
Menu.setApplicationMenu(menu); | ||
|
||
const createWindow = () => { | ||
mainWindow = new BrowserWindow({ | ||
title: 'Sentinel', | ||
height: 720, | ||
width: 1280, | ||
minHeight: 720, | ||
minWidth: 1280, | ||
webPreferences: { | ||
nodeIntegration: true, | ||
devTools: true, | ||
}, | ||
icon: iconPath, | ||
}); | ||
|
||
mainWindow.loadFile('build/index.html').then(); | ||
|
||
mainWindow.on('closed', () => { | ||
mainWindow = null; | ||
}); | ||
}; | ||
|
||
app.on('ready', () => { | ||
const bin = path.resolve(__dirname, '../../bin/manager'); | ||
|
||
manager = spawn(bin, { detached: true }); | ||
manager.stdout.on('data', (data) => { | ||
if (data.toString() === '..') { | ||
createWindow(); | ||
} | ||
}); | ||
}); | ||
app.on('window-all-closed', () => { | ||
manager.kill(); | ||
app.quit(); | ||
}); | ||
app.on('activate', () => { | ||
if (mainWindow === null) { | ||
createWindow(); | ||
} | ||
}); | ||
|
||
app.commandLine.appendSwitch('ignore-certificate-errors', 'true'); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../assets/logos/sentinel_512x512.png |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const { Menu } = require('electron'); | ||
|
||
const template = [{ | ||
label: 'View', | ||
submenu: [{ | ||
role: 'reload', | ||
}, { | ||
role: 'toggleDevTools', | ||
}, { | ||
type: 'separator', | ||
}, { | ||
role: 'resetZoom', | ||
}, { | ||
role: 'zoomIn', | ||
}, { | ||
role: 'zoomOut', | ||
}, { | ||
type: 'separator', | ||
}, { | ||
role: 'toggleFullScreen', | ||
}], | ||
}, { | ||
role: 'Window', | ||
submenu: [{ | ||
role: 'minimize', | ||
}, { | ||
role: 'close', | ||
}], | ||
}]; | ||
|
||
module.exports = Menu.buildFromTemplate(template); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"/> | ||
<meta content="width=device-width, initial-scale=1" name="viewport"/> | ||
<meta content="#000000" name="theme-color"/> | ||
<meta content="Sentinel Desktop Client" name="description"/> | ||
<link href="./manifest.json" rel="manifest"/> | ||
<link href="./favicon.ico" rel="icon"/> | ||
<link href="./assets/logos/sentinel_192x192.png" rel="apple-touch-icon"/> | ||
<link href="https://fonts.googleapis.com/css?family=Overpass:100,100i,200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i&display=swap" | ||
rel="stylesheet"> | ||
<title>Sentinel</title> | ||
</head> | ||
|
||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
</body> | ||
|
||
</html> |