Browse Source

fix(pull-master): merge in master

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
04285830de
  1. 1
      .stylelintignore
  2. 18
      app/animated_checkmark.scss
  3. 57
      app/app.global.scss
  4. 2
      app/components/Contacts/ContactsForm.scss
  5. 7
      app/components/Contacts/Network.scss
  6. 2
      app/components/LoadingBolt/LoadingBolt.scss
  7. 2
      app/components/Wallet/ReceiveModal.scss
  8. 34
      app/keyframes.scss
  9. 15
      app/lnd/lib/lightning.js
  10. 2
      app/main.dev.js
  11. 6
      app/package.json
  12. 17
      app/reducers/contactsform.js
  13. 8
      app/reducers/transaction.js
  14. 11
      app/routes/activity/components/Activity.scss
  15. 2
      app/routes/app/components/App.scss
  16. 117
      app/tooltip.scss
  17. 24
      app/variables.scss
  18. 11
      app/yarn.lock
  19. 33
      package.json
  20. 1154
      yarn.lock

1
.stylelintignore

@ -0,0 +1 @@
app/reset.scss

18
app/animated_checkmark.scss

@ -1,4 +1,4 @@
$curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
$curve: cubic-bezier(0.65, 0, 0.45, 1);
.checkmark__circle {
stroke-dasharray: 166;
@ -7,7 +7,7 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
stroke-miterlimit: 10;
stroke: $green;
fill: none;
animation: stroke .6s $curve forwards;
animation: stroke 0.6s $curve forwards;
}
.checkmark {
@ -17,15 +17,15 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
stroke-width: 2;
stroke: #fff;
stroke-miterlimit: 10;
box-shadow: inset 0px 0px 0px $green;
animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
box-shadow: inset 0 0 0 $green;
animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}
.checkmark__check {
transform-origin: 50% 50%;
stroke-dasharray: 48;
stroke-dashoffset: 48;
animation: stroke .3s $curve .8s forwards;
animation: stroke 0.3s $curve 0.8s forwards;
}
@keyframes stroke {
@ -35,9 +35,11 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
}
@keyframes scale {
0%, 100% {
0%,
100% {
transform: none;
}
50% {
transform: scale3d(1.1, 1.1, 1);
}
@ -45,6 +47,6 @@ $curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
@keyframes fill {
100% {
box-shadow: inset 0px 0px 0px 30px $green;
box-shadow: inset 0 0 0 30px $green;
}
}
}

57
app/app.global.scss

@ -20,13 +20,16 @@ body {
height: 100vh;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: rgba(255,255,255,0);
font-family: 'Roboto';
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
font-family: 'Roboto', Arial, Helvetica, sans-serif;
}
// disable the pinball scrollers for windows
*, input[type=text], input[type=number] {
&::-webkit-inner-spin-button, &::-webkit-outer-spin-button {
*,
input[type=text],
input[type=number] {
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
-webkit-appearance: none;
}
}
@ -60,15 +63,18 @@ body {
opacity: 1;
stroke: $main;
}
15%{
15% {
opacity: 1;
stroke: $main;
}
70%{
70% {
opacity: 1;
stroke: $main;
}
100%{
100% {
stroke-dashoffset: 0;
opacity: 1;
stroke: darken($main, 10%);
@ -83,26 +89,19 @@ body {
// buttons
.buttonPrimary, .buttonSecondary {
.buttonPrimary,
.buttonSecondary {
-webkit-user-select: none;
cursor: pointer;
display: block;
padding-left: 30px;
padding-right: 30px;
padding-top: 18px;
padding-bottom: 15px;
padding: 18px 30px 15px;
border-radius: 2px;
text-align: center;
font-size: 16px;
letter-spacing: 1.5px;
transition: none;
position: relative;
color: white;
&:active {
transform: translate(0px, 3px);
outline: 0;
}
color: $white;
}
.buttonPrimary {
@ -110,7 +109,7 @@ body {
box-shadow: 0 3px 0 0 darken($main, 10%);
&:active {
box-shadow: inset 0 1px 1px 1px darken($main, 10%);
box-shadow: inset 0 1px 1px 1px darken($main, 10%);
}
}
@ -129,10 +128,16 @@ body {
box-shadow: 0 3px 0 0 darken($secondary, 10%);
&:active {
box-shadow: inset 0 1px 1px 1px darken($secondary, 10%);
box-shadow: inset 0 1px 1px 1px darken($secondary, 10%);
}
}
.buttonPrimary:active,
.buttonSecondary:active {
transform: translate(0, 3px);
outline: 0;
}
.buttonContainer.circleContainer {
display: inline-block;
width: auto;
@ -162,7 +167,7 @@ body {
.buttonContainer .small.active {
box-shadow: inset 0 1px 1px 1px #1f4b2e;
transform: translate(0px, 3px);
transform: translate(0, 3px);
outline: 0;
background: #002280;
}
@ -181,9 +186,9 @@ body {
}
// each node in the map
.network-node {
}
// .network-node {
//
// }
// each channel in the map
.network-link {
@ -191,12 +196,12 @@ body {
}
.active-peer {
fill: #5589F3;
fill: #5589f3;
}
.active-channel {
opacity: 1;
stroke: #88D4A2;
stroke: #88d4a2;
stroke-width: 15;
stroke-dasharray: 100;
animation: dash 2.5s infinite linear;

2
app/components/Contacts/ContactsForm.scss

@ -48,7 +48,7 @@
}
.networkResults {
overflow-y: scroll;
overflow-y: auto;
height: 250px;
margin-top: 30px;
padding: 20px 0;

7
app/components/Contacts/Network.scss

@ -42,7 +42,7 @@
.channels {
padding: 20px;
height: 100%;
overflow-y: scroll;
overflow-y: auto;
.listHeader {
position: relative;
@ -101,8 +101,9 @@
ul {
margin-top: 20px;
height: 100%;
overflow-y: scroll;
height: auto;
overflow-y: auto;
overflow-x: hidden;
}
.fade {

2
app/components/LoadingBolt/LoadingBolt.scss

@ -17,7 +17,7 @@
min-height: 250px;
.bolt svg {
height: 150px;
height: 155px;
width: 150px;
}

2
app/components/Wallet/ReceiveModal.scss

@ -106,7 +106,7 @@
.data {
flex: 9;
overflow-x: scroll;
overflow-y: auto;
}
.copy {

34
app/keyframes.scss

@ -2,13 +2,15 @@
@keyframes fadeinOutD6 {
0% {
transform: rotate(0deg);
transform: rotate(0deg);
}
50% {
transform: rotate(6deg);
transform: rotate(6deg);
}
100% {
transform: rotate(0deg);
transform: rotate(0deg);
}
}
@ -16,28 +18,30 @@
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(13deg);
}
100% {
transform: rotate(0deg);
}
}
@keyframes colorchange {
0% { color: $white; }
25% { color: $gold; }
50% { color: $white; }
75% { color: $gold; }
0% { color: $white; }
25% { color: $gold; }
50% { color: $white; }
75% { color: $gold; }
100% { color: $white; }
}
@keyframes spin {
from {
transform:rotate(0deg)
}
to {
transform:rotate(360deg);
}
}
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}

15
app/lnd/lib/lightning.js

@ -3,6 +3,21 @@ import path from 'path'
import grpc from 'grpc'
import config from '../config'
// Default is ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384
// https://github.com/grpc/grpc/blob/master/doc/environment_variables.md
//
// Current LND cipher suites here:
// https://github.com/lightningnetwork/lnd/blob/master/lnd.go#L80
//
// We order the suites by priority, based on the recommendations provided by SSL Labs here:
// https://github.com/ssllabs/research/wiki/SSL-and-TLS-Deployment-Best-Practices#23-use-secure-cipher-suites
process.env.GRPC_SSL_CIPHER_SUITES = process.env.GRPC_SSL_CIPHER_SUITES || [
'ECDHE-ECDSA-AES128-GCM-SHA256',
'ECDHE-ECDSA-AES256-GCM-SHA384',
'ECDHE-ECDSA-AES128-CBC-SHA256',
'ECDHE-ECDSA-CHACHA20-POLY1305'
].join(':')
const lightning = (rpcpath, host) => {
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'
process.env.GRPC_SSL_CIPHER_SUITES = 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384'

2
app/main.dev.js

@ -164,7 +164,7 @@ const startLnd = (alias, autopilot) => {
'--bitcoin.active',
'--bitcoin.testnet',
'--bitcoin.node=neutrino',
'--neutrino.connect=188.166.148.62:18333',
'--neutrino.connect=btcd.jackmallers.com:18333',
'--neutrino.addpeer=btcd.jackmallers.com:18333',
'--neutrino.addpeer=159.65.48.139:18333',
'--neutrino.connect=127.0.0.1:18333',

6
app/package.json

@ -10,12 +10,12 @@
"url": "https://github.com/LN-Zap/zap-desktop"
},
"scripts": {
"postinstall": "npm rebuild --runtime=electron --target=1.6.16 --disturl=https://atom.io/download/atom-shell --build-from-source",
"install-grpc": "cd node_modules/grpc && git submodule update --init && npm run electron-build -- --target=1.6.16"
"postinstall": "npm rebuild --runtime=electron --target=1.8.4 --disturl=https://atom.io/download/atom-shell --build-from-source",
"install-grpc": "cd node_modules/grpc && git submodule update --init && npm run electron-build -- --target=1.8.4"
},
"license": "MIT",
"dependencies": {
"grpc": "1.7.1",
"grpc": "1.10.0",
"ps-node": "^0.1.6",
"react-icons": "^2.2.5"
}

17
app/reducers/contactsform.js

@ -95,6 +95,19 @@ const networkNodesSelector = state => state.network.nodes
const searchQuerySelector = state => state.contactsform.searchQuery
const manualSearchQuerySelector = state => state.contactsform.manualSearchQuery
const contactable = node => (
node.addresses.length > 0
)
// comparator to sort the contacts list with contactable contacts first
const contactableFirst = (a, b) => {
if (contactable(a) && !contactable(b)) {
return -1
} else if (!contactable(a) && contactable(b)) {
return 1
}
return 0
}
contactFormSelectors.filteredNetworkNodes = createSelector(
networkNodesSelector,
@ -102,13 +115,13 @@ contactFormSelectors.filteredNetworkNodes = createSelector(
(nodes, searchQuery) => {
// If there is no search query default to showing the first 20 nodes from the nodes array
// (performance hit to render the entire thing by default)
if (!searchQuery.length) { return nodes.slice(0, 20) }
if (!searchQuery.length) { return nodes.sort(contactableFirst).slice(0, 20) }
// if there is an '@' in the search query we are assuming they are using the format pubkey@host
// we can ignore the '@' and the host and just grab the pubkey for our search
const query = searchQuery.includes('@') ? searchQuery.split('@')[0] : searchQuery
return filter(nodes, node => node.alias.includes(query) || node.pub_key.includes(query))
return filter(nodes, node => node.alias.includes(query) || node.pub_key.includes(query)).sort(contactableFirst)
}
)

8
app/reducers/transaction.js

@ -105,7 +105,13 @@ const ACTION_HANDLERS = {
[RECEIVE_TRANSACTIONS]: (state, { transactions }) => ({ ...state, transactionLoading: false, transactions }),
[TRANSACTION_SUCCESSFULL]: state => ({ ...state, sendingTransaction: false }),
[TRANSACTION_FAILED]: state => ({ ...state, sendingTransaction: false }),
[ADD_TRANSACTION]: (state, { transaction }) => ({ ...state, transactions: [transaction, ...state.transactions] })
[ADD_TRANSACTION]: (state, { transaction }) => (
// add the transaction only if we are not already aware of it
state.transactions.find(tx => (tx.tx_hash === transaction.tx_hash)) ? state : {
...state,
transactions: [transaction, ...state.transactions]
}
)
}
// ------------------------------------

11
app/routes/activity/components/Activity.scss

@ -32,7 +32,6 @@
.activities {
background: $white;
height: 100%;
.header {
background: $spaceblue;
@ -85,11 +84,11 @@
.activityContainer {
background: $spaceblue;
transition: opacity 0.25s;
padding-bottom: 50px;
min-height: 100vh;
height: 100vh;
overflow-y: scroll;
height: calc(100vh - 304px);
overflow-y: auto;
overflow-x: hidden;
padding-top: 20px;
padding-bottom: 20px;
&.pulldown {
opacity: 0.15;
@ -100,7 +99,7 @@
padding: 0 40px;
&:hover {
}
.left, .center, .right {

2
app/routes/app/components/App.scss

@ -5,7 +5,7 @@
width: 80%;
display: inline-block;
vertical-align: top;
overflow-y: scroll;
overflow-y: auto;
}
.titleBar {

117
app/tooltip.scss

@ -1,10 +1,12 @@
/* Tooltips */
[data-hint] {
position: relative;
/*display: inline-block;*/
// display: inline-block;
}
[data-hint]:before,
[data-hint]:after {
[data-hint]::before,
[data-hint]::after {
position: absolute;
will-change: transform;
visibility: hidden;
@ -14,19 +16,16 @@
transition: 0.2s ease;
transition-delay: 0ms;
}
[data-hint]:hover:before,
[data-hint]:hover:after {
visibility: visible;
opacity: 1;
}
[data-hint]:before {
[data-hint]::before {
content: '';
position: absolute;
background: transparent;
border: 6px solid transparent;
z-index: 900006;
}
[data-hint]:after {
[data-hint]::after {
content: attr(data-hint);
background: #404040;
color: #e0e0e0;
@ -40,94 +39,122 @@
font-size: 12px;
font-weight: normal;
font-style: inherit;
font-family: 'Noto Sans','Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif;
font-family: 'Noto Sans', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, Sans-Serif;
}
[data-hint]:hover::before,
[data-hint]:hover::after {
visibility: visible;
opacity: 1;
}
.hint--bottom:before,
.hint--bottom-left:before {
.hint--bottom::before,
.hint--bottom-left::before {
border-bottom-color: #404040;
}
.hint--top:before,
.hint--top-left:before {
.hint--top::before,
.hint--top-left::before {
border-top-color: #404040;
}
.hint--bottom:before {
.hint--bottom::before {
margin-top: -12px;
}
.hint--bottom:after {
.hint--bottom::after {
margin-left: -18px;
}
.hint--bottom:before,
.hint--bottom:after {
.hint--bottom::before,
.hint--bottom::after {
top: 100%;
left: 50%;
}
.hint--bottom:hover:after,
.hint--bottom:hover:before {
.hint--bottom:hover::after,
.hint--bottom:hover::before {
-webkit-transform: translateY(8px);
transform: translateY(8px);
}
.hint--top:before {
.hint--top::before {
margin-bottom: -12px;
}
.hint--top:after {
.hint--top::after {
margin-left: -18px;
}
.hint--top:before,
.hint--top:after {
.hint--top::before,
.hint--top::after {
bottom: 100%;
left: 50%;
}
.hint--top:hover:after,
.hint--top:hover:before {
.hint--top:hover::after,
.hint--top:hover::before {
-webkit-transform: translateY(-8px);
transform: translateY(-8px);
}
.hint--top-left:before {
.hint--top-left::before {
margin-bottom: -12px;
}
.hint--top-left:after {
.hint--top-left::after {
margin-right: -6px;
}
.hint--top-left:before,
.hint--top-left:after {
.hint--top-left::before,
.hint--top-left::after {
bottom: 100%;
right: 30%;
}
.hint--top-left:hover:after,
.hint--top-left:hover:before {
.hint--top-left:hover::after,
.hint--top-left:hover::before {
-webkit-transform: translateY(-8px);
transform: translateY(-8px);
}
.hint--bottom-left:before {
.hint--bottom-left::before {
margin-top: -12px;
}
.hint--bottom-left:after {
.hint--bottom-left::after {
margin-right: -6px;
}
.hint--bottom-left:before,
.hint--bottom-left:after {
.hint--bottom-left::before,
.hint--bottom-left::after {
top: 100%;
right: 30%;
}
.hint--bottom-left:hover:after,
.hint--bottom-left:hover:before {
.hint--bottom-left:hover::after,
.hint--bottom-left:hover::before {
-webkit-transform: translateY(8px);
transform: translateY(8px);
}
.hint--left:before {
.hint--left::before {
margin-right: -12px;
margin-top: -6px;
}
.hint--left:after {
.hint--left::after {
margin-right: -14px;
}
.hint--left:before,
.hint--left:after {
.hint--left::before,
.hint--left::after {
right: 100%;
bottom: 50%;
}
.hint--left:hover:after,
.hint--left:hover:before {
.hint--left:hover::after,
.hint--left:hover::before {
-webkit-transform: translateX(-8px);
transform: translateX(-8px);
}

24
app/variables.scss

@ -4,21 +4,21 @@ $black: #000;
$main: #ebb864;
$secondary: #1d1d1d;
$grey: #f2f2f2;
$traditionalgrey: #cccccc;
$lightgrey: #F7F7F7;
$darkgrey: #EBEBEB;
$darkestgrey: #999999;
$bluegrey: #2A2D38;
$spacegrey: #222E2B;
$traditionalgrey: #ccc;
$lightgrey: #f7f7f7;
$darkgrey: #ebebeb;
$darkestgrey: #999;
$bluegrey: #2a2d38;
$spacegrey: #222e2b;
$spaceblue: #252832;
$darkspaceblue: #1c1e26;
$spaceborder: #404040;
$gold: #DEA326;
$gold: #dea326;
$green: #0bb634;
$terminalgreen: #00FF00;
$red: #FF556A;
$terminalgreen: #0f0;
$red: #ff556a;
$blue: #007bb6;
$orange: #FF8A65;
$yellow: #FFF680;
$curve: cubic-bezier(0.650, 0.000, 0.450, 1.000);
$orange: #ff8a65;
$yellow: #fff680;
$curve: cubic-bezier(0.65, 0, 0.45, 1);

11
app/yarn.lock

@ -28,10 +28,6 @@ are-we-there-yet@~1.1.2:
delegates "^1.0.0"
readable-stream "^2.0.6"
arguejs@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/arguejs/-/arguejs-0.2.3.tgz#b6f939f5fe0e3cd1f3f93e2aa9262424bf312af7"
asap@~2.0.3:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
@ -297,11 +293,10 @@ graceful-fs@^4.1.2:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
grpc@1.7.1:
version "1.7.1"
resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.7.1.tgz#a1eecd074e78ffe5bb3bb64dcc7417d14fdb5cc4"
grpc@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.10.0.tgz#a3bab7f7e6b37727c5a6eb8427fc58775823edce"
dependencies:
arguejs "^0.2.3"
lodash "^4.15.0"
nan "^2.0.0"
node-pre-gyp "^0.6.39"

33
package.json

@ -12,10 +12,10 @@
"flow": "flow",
"flow-typed": "rimraf flow-typed/npm && flow-typed install --overwrite || true",
"lint": "cross-env NODE_ENV=development eslint --cache --format=node_modules/eslint-formatter-pretty .",
"lint-ci": "npm run lint && npm run flow",
"lint-ci": "npm run lint && npm run lint-styles && npm run flow",
"lint-fix": "npm run lint -- --fix",
"lint-styles": "stylelint app/*.css app/components/*.css --syntax scss",
"lint-styles-fix": "stylefmt -r app/*.css app/components/*.css",
"lint-styles": "stylelint app/*.scss app/components/*.scss --syntax scss",
"lint-styles-fix": "stylelint --fix app/*.scss app/components/*.scss --syntax scss",
"package": "npm run build && build --publish never",
"package-all": "npm run build && build -mwl",
"package-linux": "npm run build && build --linux",
@ -27,15 +27,20 @@
"start-renderer-dev": "cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack-dev-server/bin/webpack-dev-server --config webpack.config.renderer.dev.js",
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js",
"test-ci": "npm run package && npm run test && npm run test-e2e",
"test-all": "npm run lint && npm run flow && npm run build && npm run test && npm run test-e2e",
"test-all": "npm run lint && npm run lint-styles && npm run flow && npm run build && npm run test && npm run test-e2e",
"test-e2e": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 node --trace-warnings ./test/runTests.js e2e",
"test-watch": "npm test -- --watch",
"install-grpc": "cd app && npm run install-grpc"
},
"browserslist": "electron 1.6",
"browserslist": "electron 1.8",
"engines": {
"node": ">=8.0.0",
"npm": ">=5.0.0"
"node": ">=8.2.1",
"npm": ">=5.3.0"
},
"devEngines": {
"node": ">=8.2.1",
"npm": ">=5.3.0",
"yarn": ">=0.21.3"
},
"build": {
"productName": "Zap",
@ -187,11 +192,10 @@
"rimraf": "^2.6.1",
"sass-loader": "^6.0.6",
"sinon": "^2.3.5",
"spectron": "^3.7.0",
"spectron": "^3.8.0",
"style-loader": "^0.18.1",
"stylefmt": "^6.0.0",
"stylelint": "^7.12.0",
"stylelint-config-standard": "^16.0.0",
"stylelint": "^9.1.1",
"stylelint-config-standard": "^18.2.0",
"url-loader": "^0.5.8",
"webpack": "^3.7.1",
"webpack-bundle-analyzer": "^2.8.2",
@ -207,7 +211,7 @@
"d3-selection": "^1.2.0",
"d3-zoom": "^1.7.1",
"devtron": "^1.4.0",
"electron": "1.6.16",
"electron": "1.8.4",
"electron-debug": "^1.2.0",
"font-awesome": "^4.7.0",
"history": "^4.6.3",
@ -233,11 +237,6 @@
"source-map-support": "^0.4.15",
"xtend": "^4.0.1"
},
"devEngines": {
"node": ">=7.x",
"npm": ">=4.x",
"yarn": ">=0.21.3"
},
"main": "webpack.config.base.js",
"directories": {
"test": "test"

1154
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save