diff --git a/app/app.global.scss b/app/app.global.scss index 0398282e..e24fe2be 100644 --- a/app/app.global.scss +++ b/app/app.global.scss @@ -25,7 +25,7 @@ body { } // disable the pinball scrollers for windows -* { +*, input[type=text], input[type=number] { &::-webkit-inner-spin-button, &::-webkit-outer-spin-button { -webkit-appearance: none; } diff --git a/app/app.icns b/app/app.icns deleted file mode 100644 index 4aa9cb2c..00000000 Binary files a/app/app.icns and /dev/null differ diff --git a/app/components/Contacts/ContactsForm.js b/app/components/Contacts/ContactsForm.js index 51a8d597..f821dbc8 100644 --- a/app/components/Contacts/ContactsForm.js +++ b/app/components/Contacts/ContactsForm.js @@ -102,7 +102,7 @@ class ContactsForm extends React.Component { updateManualFormSearchQuery('') return } - // clear any existing errors + // clear any existing errors updateManualFormErrors({ manualInput: null }) const [pubkey, host] = contactsform.manualSearchQuery && contactsform.manualSearchQuery.split('@') @@ -112,6 +112,16 @@ class ContactsForm extends React.Component { updateManualFormSearchQuery('') } + const searchUpdated = (search) => { + updateContactFormSearchQuery(search) + + console.log('search: ', search) + if (search.includes('@') && search.split('@')[0].length === 66) { + console.log('yo') + updateManualFormSearchQuery(search) + } + } + return (
updateContactFormSearchQuery(event.target.value)} + onChange={event => searchUpdated(event.target.value)} />
diff --git a/app/components/Contacts/ContactsForm.scss b/app/components/Contacts/ContactsForm.scss index 3c6b7a45..19123176 100644 --- a/app/components/Contacts/ContactsForm.scss +++ b/app/components/Contacts/ContactsForm.scss @@ -49,7 +49,7 @@ .networkResults { overflow-y: scroll; - height: 300px; + height: 250px; margin-top: 30px; padding: 20px 0; @@ -156,7 +156,7 @@ .manualFormSpinner { position: absolute; right: 0; - top: 50%; + top: 40%; padding: 0 10px; } } diff --git a/app/components/Nav/Nav.js b/app/components/Nav/Nav.js index 467b2caa..6b275af4 100644 --- a/app/components/Nav/Nav.js +++ b/app/components/Nav/Nav.js @@ -3,10 +3,10 @@ import PropTypes from 'prop-types' import { NavLink } from 'react-router-dom' import Isvg from 'react-inlinesvg' -import walletIcon from 'icons/wallet.svg' -import peersIcon from 'icons/peers.svg' -import networkIcon from 'icons/globe.svg' -import helpIcon from 'icons/help.svg' +import walletIcon from 'icons/wallet_2.svg' +import peersIcon from 'icons/channels.svg' +import networkIcon from 'icons/network.svg' +import helpIcon from 'icons/help_2.svg' import styles from './Nav.scss' diff --git a/app/components/Nav/Nav.scss b/app/components/Nav/Nav.scss index 028d4c63..88fa5ef5 100644 --- a/app/components/Nav/Nav.scss +++ b/app/components/Nav/Nav.scss @@ -3,7 +3,7 @@ .nav { display: inline-block; vertical-align: top; - width: 20%; + width: 15%; font-size: 24px; background: $secondary; height: 100vh; @@ -133,12 +133,11 @@ opacity: 0.5; cursor: pointer; text-decoration: none; - border-left: 20px solid transparent; transition: all 0.25s; li { margin: 12.5px 0; - min-width: 200px; + min-width: 150px; } &.active { @@ -151,15 +150,15 @@ } svg { - width: 32px; - height: 32px; + width: 28px; + height: 28px; vertical-align: middle; } span { margin-left: 15px; line-height: 22px; - font-size: 20px; + font-size: 18px; font-weight: 500; letter-spacing: .2px; } @@ -172,15 +171,17 @@ position: absolute; bottom: 10px; right: 12.5%; + + .button { + margin-bottom: 20px; + font-weight: bold; + cursor: pointer; + text-transform: uppercase; + letter-spacing: .2px; + font-size: 0.75em; + } } -.button { - margin-bottom: 20px; - font-weight: bold; - cursor: pointer; - text-transform: uppercase; - letter-spacing: .2px; -} .content { width: 80%; diff --git a/app/icons/contacts.svg b/app/icons/contacts.svg new file mode 100644 index 00000000..e14de286 --- /dev/null +++ b/app/icons/contacts.svg @@ -0,0 +1,15 @@ + + + + Group 7 + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff --git a/app/icons/help_2.svg b/app/icons/help_2.svg new file mode 100644 index 00000000..795edd1a --- /dev/null +++ b/app/icons/help_2.svg @@ -0,0 +1,18 @@ + + + + life-buoy + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/icons/network.svg b/app/icons/network.svg new file mode 100644 index 00000000..fdb679cb --- /dev/null +++ b/app/icons/network.svg @@ -0,0 +1,14 @@ + + + + Group 2 + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/app/icons/wallet_2.svg b/app/icons/wallet_2.svg new file mode 100644 index 00000000..40b89fc1 --- /dev/null +++ b/app/icons/wallet_2.svg @@ -0,0 +1,15 @@ + + + + Group 5 + Created with Sketch. + + + + + + + + + + \ No newline at end of file diff --git a/app/icons/zap.icns b/app/icons/zap.icns deleted file mode 100644 index 4aa9cb2c..00000000 Binary files a/app/icons/zap.icns and /dev/null differ diff --git a/app/reducers/activity.js b/app/reducers/activity.js index d7c1d06b..f8db7870 100644 --- a/app/reducers/activity.js +++ b/app/reducers/activity.js @@ -16,7 +16,8 @@ const initialState = { modal: { modalType: null, modalProps: {} - } + }, + searchText: '' } // ------------------------------------ @@ -29,6 +30,8 @@ export const CHANGE_FILTER = 'CHANGE_FILTER' export const TOGGLE_PULLDOWN = 'TOGGLE_PULLDOWN' +export const UPDATE_SEARCH_TEXT = 'UPDATE_SEARCH_TEXT' + // ------------------------------------ // Actions // ------------------------------------ @@ -59,6 +62,13 @@ export function toggleFilterPulldown() { } } +export function updateSearchText(searchText) { + return { + type: UPDATE_SEARCH_TEXT, + searchText + } +} + // ------------------------------------ // Action Handlers // ------------------------------------ @@ -66,7 +76,9 @@ const ACTION_HANDLERS = { [SHOW_ACTIVITY_MODAL]: (state, { modalType, modalProps }) => ({ ...state, modal: { modalType, modalProps } }), [HIDE_ACTIVITY_MODAL]: state => ({ ...state, modal: { modalType: null, modalProps: {} } }), [CHANGE_FILTER]: (state, { filter }) => ({ ...state, filter, filterPulldown: false }), - [TOGGLE_PULLDOWN]: state => ({ ...state, filterPulldown: !state.filterPulldown }) + [TOGGLE_PULLDOWN]: state => ({ ...state, filterPulldown: !state.filterPulldown }), + + [UPDATE_SEARCH_TEXT]: (state, { searchText }) => ({ ...state, searchText }) } // ------------------------------------ @@ -75,20 +87,34 @@ const ACTION_HANDLERS = { const activitySelectors = {} const filtersSelector = state => state.activity.filters const filterSelector = state => state.activity.filter +const searchSelector = state => state.activity.searchText const paymentsSelector = state => state.payment.payments const invoicesSelector = state => state.invoice.invoices const transactionsSelector = state => state.transaction.transactions const allActivity = createSelector( + searchSelector, paymentsSelector, invoicesSelector, transactionsSelector, - (payments, invoices, transactions) => [...payments, ...invoices, ...transactions].sort((a, b) => { - const aTimestamp = Object.prototype.hasOwnProperty.call(a, 'time_stamp') ? a.time_stamp : a.creation_date - const bTimestamp = Object.prototype.hasOwnProperty.call(b, 'time_stamp') ? b.time_stamp : b.creation_date - - return bTimestamp - aTimestamp - }) + (searchText, payments, invoices, transactions) => { + const searchedArr = [...payments, ...invoices, ...transactions].filter((tx) => { + if ((tx.tx_hash && tx.tx_hash.includes(searchText)) || + (tx.payment_hash && tx.payment_hash.includes(searchText)) || + (tx.r_hash && tx.r_hash.includes(searchText))) { + return true + } + + return false + }) + + return searchedArr.sort((a, b) => { + const aTimestamp = Object.prototype.hasOwnProperty.call(a, 'time_stamp') ? a.time_stamp : a.creation_date + const bTimestamp = Object.prototype.hasOwnProperty.call(b, 'time_stamp') ? b.time_stamp : b.creation_date + + return bTimestamp - aTimestamp + }) + } ) const lnActivity = createSelector( @@ -131,7 +157,6 @@ activitySelectors.nonActiveFilters = createSelector( (filters, filter) => filters.filter(f => f.key !== filter.key) ) - export { activitySelectors } diff --git a/app/routes/activity/components/Activity.js b/app/routes/activity/components/Activity.js index 2af22af4..60c83d5d 100644 --- a/app/routes/activity/components/Activity.js +++ b/app/routes/activity/components/Activity.js @@ -47,14 +47,14 @@ class Activity extends Component { render() { const { ticker, - searchInvoices, - invoice: { invoicesSearchText, invoiceLoading }, + updateSearchText, + invoice: { invoiceLoading }, address: { address }, balance, info, payment: { paymentLoading }, currentTicker, - activity: { modal, filter, filterPulldown }, + activity: { modal, filter, filterPulldown, searchText }, hideActivityModal, changeFilter, toggleFilterPulldown, @@ -84,10 +84,10 @@ class Activity extends Component { searchInvoices(event.target.value)} + value={searchText} + onChange={event => updateSearchText(event.target.value)} className={`${styles.text} ${styles.input}`} - placeholder='Search by amount, hash, memo, etc' + placeholder='Search by hash...' type='text' id='invoiceSearch' /> @@ -132,7 +132,7 @@ Activity.propTypes = { fetchBalance: PropTypes.func.isRequired, ticker: PropTypes.object.isRequired, - searchInvoices: PropTypes.func.isRequired, + updateSearchText: PropTypes.func.isRequired, invoice: PropTypes.object.isRequired, payment: PropTypes.object.isRequired, currentTicker: PropTypes.object.isRequired, diff --git a/app/routes/activity/containers/ActivityContainer.js b/app/routes/activity/containers/ActivityContainer.js index 3f0df128..1caa3a50 100644 --- a/app/routes/activity/containers/ActivityContainer.js +++ b/app/routes/activity/containers/ActivityContainer.js @@ -3,7 +3,6 @@ import { tickerSelectors } from 'reducers/ticker' import { fetchBalance } from 'reducers/balance' import { fetchInvoices, - searchInvoices, setInvoice, invoiceSelectors } from 'reducers/invoice' @@ -18,7 +17,8 @@ import { hideActivityModal, changeFilter, toggleFilterPulldown, - activitySelectors + activitySelectors, + updateSearchText } from 'reducers/activity' import { newAddress } from 'reducers/address' @@ -30,13 +30,13 @@ const mapDispatchToProps = { fetchPayments, fetchInvoices, fetchTransactions, - searchInvoices, showActivityModal, hideActivityModal, changeFilter, toggleFilterPulldown, newAddress, - fetchBalance + fetchBalance, + updateSearchText } const mapStateToProps = state => ({ diff --git a/app/routes/app/components/App.scss b/app/routes/app/components/App.scss index 3b0fb72a..52648e17 100644 --- a/app/routes/app/components/App.scss +++ b/app/routes/app/components/App.scss @@ -1,6 +1,6 @@ .content { position: relative; - width: 80%; + width: 85%; height: 100vh; display: inline-block; vertical-align: top; diff --git a/package.json b/package.json index b1f54ff4..8c9e92dd 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ }, "extraResources": [ { - "from": "./resources/bin/darwin/lnd", - "to": "./bin/lnd" + "from": "./resources/bin/win32/lnd.exe", + "to": "./bin/lnd.exe" } ] },