Skip to content

Commit

Permalink
feat(header): back to main button at top
Browse files Browse the repository at this point in the history
  • Loading branch information
DEgITx committed Mar 26, 2018
1 parent 6313414 commit 0cb81ec
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
39 changes: 38 additions & 1 deletion src/app/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,51 @@ const Header = (props) => {
minHeight: 360,
backgroundSize: 'cover'
}}>
<RaisedButton
label="Search"
onClick={() => {
window.router('/')
}}
backgroundColor='#69238c'
labelColor='white'
style={{height: 60, borderRadius: 6, margin: 5, zIndex: 1}}
buttonStyle={{borderRadius: 5}}
icon={<svg fill='white' style={{height: 28}} viewBox="0 0 512 512">
<g>
<path d="M310,190c-5.52,0-10,4.48-10,10s4.48,10,10,10c5.52,0,10-4.48,10-10S315.52,190,310,190z"/>
</g>
<g>
<path d="M500.281,443.719l-133.48-133.48C388.546,277.485,400,239.555,400,200C400,89.72,310.28,0,200,0S0,89.72,0,200
s89.72,200,200,200c39.556,0,77.486-11.455,110.239-33.198l36.895,36.895c0.005,0.005,0.01,0.01,0.016,0.016l96.568,96.568
C451.276,507.838,461.319,512,472,512c10.681,0,20.724-4.162,28.278-11.716C507.837,492.731,512,482.687,512,472
S507.837,451.269,500.281,443.719z M305.536,345.727c0,0.001-0.001,0.001-0.002,0.002C274.667,368.149,238.175,380,200,380
c-99.252,0-180-80.748-180-180S100.748,20,200,20s180,80.748,180,180c0,38.175-11.851,74.667-34.272,105.535
C334.511,320.988,320.989,334.511,305.536,345.727z M326.516,354.793c10.35-8.467,19.811-17.928,28.277-28.277l28.371,28.371
c-8.628,10.183-18.094,19.65-28.277,28.277L326.516,354.793z M486.139,486.139c-3.78,3.78-8.801,5.861-14.139,5.861
s-10.359-2.081-14.139-5.861l-88.795-88.795c10.127-8.691,19.587-18.15,28.277-28.277l88.798,88.798
C489.919,461.639,492,466.658,492,472C492,477.342,489.919,482.361,486.139,486.139z"/>
</g>
<g>
<path d="M200,40c-88.225,0-160,71.775-160,160s71.775,160,160,160s160-71.775,160-160S288.225,40,200,40z M200,340
c-77.196,0-140-62.804-140-140S122.804,60,200,60s140,62.804,140,140S277.196,340,200,340z"/>
</g>
<g>
<path d="M312.065,157.073c-8.611-22.412-23.604-41.574-43.36-55.413C248.479,87.49,224.721,80,200,80c-5.522,0-10,4.478-10,10
c0,5.522,4.478,10,10,10c41.099,0,78.631,25.818,93.396,64.247c1.528,3.976,5.317,6.416,9.337,6.416
c1.192,0,2.405-0.215,3.584-0.668C311.472,168.014,314.046,162.229,312.065,157.073z"/>
</g>
</svg>

}
/>
<RaisedButton
label="Downloads"
onClick={() => {
window.router('/downloads')
}}
backgroundColor='#2080E4'
labelColor='white'
style={{height: 60, borderRadius: 5, margin: 5, zIndex: 1}}
style={{height: 60, borderRadius: 6, margin: 5, zIndex: 1}}
buttonStyle={{borderRadius: 5}}
icon={<svg fill='white' style={{height: 30}} viewBox="0 0 548.176 548.176">
<path d="M524.326,297.352c-15.896-19.89-36.21-32.782-60.959-38.684c7.81-11.8,11.704-24.934,11.704-39.399
Expand Down
4 changes: 4 additions & 0 deletions src/app/top-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,16 @@ export default class TopPage extends Page {
return <TorrentLine key={index} torrent={torrent} />
})
}
{
torrents.length > 0
&&
<div>
<ListItem innerDivStyle={{textAlign: 'center', padding: '1em'}} primaryText={<span>More Torrents</span>} onClick={() => {
this.loadMoreTorrents(type)
}} />
<Divider />
</div>
}
</List>
</Tab>
)
Expand Down

0 comments on commit 0cb81ec

Please sign in to comment.