|
|
@ -8,6 +8,7 @@ import plus from 'icons/plus.svg' |
|
|
|
import search from 'icons/search.svg' |
|
|
|
|
|
|
|
import Value from 'components/Value' |
|
|
|
import SuggestedNodes from './SuggestedNodes' |
|
|
|
|
|
|
|
import styles from './Network.scss' |
|
|
|
|
|
|
@ -139,6 +140,13 @@ class Network extends Component { |
|
|
|
</header> |
|
|
|
|
|
|
|
<div className={styles.channels}> |
|
|
|
{ |
|
|
|
!loadingChannelPubkeys.length && !currentChannels.length && |
|
|
|
<SuggestedNodes /> |
|
|
|
} |
|
|
|
|
|
|
|
{ |
|
|
|
loadingChannelPubkeys.length > 0 && currentChannels.length > 0 && |
|
|
|
<header className={styles.listHeader}> |
|
|
|
<section> |
|
|
|
<h2 onClick={toggleFilterPulldown} className={styles.filterTitle}> |
|
|
@ -154,22 +162,22 @@ class Network extends Component { |
|
|
|
} |
|
|
|
</ul> |
|
|
|
</section> |
|
|
|
|
|
|
|
<section className={styles.refreshContainer}> |
|
|
|
<span className={styles.refresh} onClick={refreshClicked} ref={(ref) => { this.repeat = ref }}> |
|
|
|
{ |
|
|
|
this.state.refreshing ? |
|
|
|
<FaRepeat /> |
|
|
|
: |
|
|
|
'Refresh' |
|
|
|
} |
|
|
|
</span> |
|
|
|
</section> |
|
|
|
<section className={styles.refreshContainer}> |
|
|
|
<span className={styles.refresh} onClick={refreshClicked} ref={(ref) => { this.repeat = ref }}> |
|
|
|
{ |
|
|
|
this.state.refreshing ? |
|
|
|
<FaRepeat /> |
|
|
|
: |
|
|
|
'Refresh' |
|
|
|
} |
|
|
|
</span> |
|
|
|
</section> |
|
|
|
</header> |
|
|
|
} |
|
|
|
|
|
|
|
<ul className={filterPulldown && styles.fade}> |
|
|
|
{ |
|
|
|
loadingChannelPubkeys.map((loadingPubkey) => { |
|
|
|
loadingChannelPubkeys.length > 0 && loadingChannelPubkeys.map((loadingPubkey) => { |
|
|
|
// TODO(jimmymow): refactor this out. same logic is in displayNodeName above
|
|
|
|
const node = find(nodes, n => loadingPubkey === n.pub_key) |
|
|
|
const nodeDisplay = () => { |
|
|
@ -264,20 +272,22 @@ class Network extends Component { |
|
|
|
} |
|
|
|
</ul> |
|
|
|
</div> |
|
|
|
|
|
|
|
<footer className={styles.search}> |
|
|
|
<label htmlFor='search' className={`${styles.label} ${styles.input}`}> |
|
|
|
<Isvg src={search} /> |
|
|
|
</label> |
|
|
|
<input |
|
|
|
id='search' |
|
|
|
type='text' |
|
|
|
className={`${styles.text} ${styles.input}`} |
|
|
|
placeholder='search by alias or pubkey' |
|
|
|
value={searchQuery} |
|
|
|
onChange={event => updateChannelSearchQuery(event.target.value)} |
|
|
|
/> |
|
|
|
</footer> |
|
|
|
{ |
|
|
|
loadingChannelPubkeys.length > 0 && currentChannels.length > 0 && |
|
|
|
<footer className={styles.search}> |
|
|
|
<label htmlFor='search' className={`${styles.label} ${styles.input}`}> |
|
|
|
<Isvg src={search} /> |
|
|
|
</label> |
|
|
|
<input |
|
|
|
id='search' |
|
|
|
type='text' |
|
|
|
className={`${styles.text} ${styles.input}`} |
|
|
|
placeholder='search by alias or pubkey' |
|
|
|
value={searchQuery} |
|
|
|
onChange={event => updateChannelSearchQuery(event.target.value)} |
|
|
|
/> |
|
|
|
</footer> |
|
|
|
} |
|
|
|
</div> |
|
|
|
) |
|
|
|
} |
|
|
|