иконка xxx

This commit is contained in:
Alexey Kasyanchuk
2017-02-01 11:48:19 +03:00
parent 7c6df55780
commit f923e74d57

View File

@ -3,7 +3,28 @@ import formatBytes from './format-bytes'
import {ListItem} from 'material-ui/List'; import {ListItem} from 'material-ui/List';
import Divider from 'material-ui/Divider'; import Divider from 'material-ui/Divider';
const contentIcon = (type) => { const contentIcon = (type, category) => {
if(category == 'xxx')
{
return (
<svg viewBox="0 0 18.282 18.282" fill="grey">
<g>
<path d="M16.435,3.832H1.847C0.827,3.832,0,4.659,0,5.678v6.925c0,1.021,0.827,1.848,1.847,1.848h14.588
c1.021,0,1.847-0.827,1.847-1.848V5.678C18.282,4.659,17.455,3.832,16.435,3.832z M3.194,7.123H2.583v4.042h0.611v0.54H1.876V6.583
h1.318V7.123z M6.197,10.986l-0.392-0.784C5.644,9.9,5.541,9.676,5.419,9.425H5.406c-0.09,0.251-0.199,0.476-0.334,0.777
l-0.36,0.784H3.593l1.254-2.191L3.638,6.654h1.125l0.379,0.791C5.27,7.709,5.367,7.921,5.47,8.165h0.013
c0.103-0.276,0.187-0.47,0.296-0.72l0.366-0.791h1.118L6.042,8.768l1.285,2.218C7.327,10.986,6.197,10.986,6.197,10.986z
M10.068,10.986l-0.392-0.784C9.515,9.9,9.412,9.676,9.29,9.425H9.277c-0.091,0.251-0.2,0.476-0.335,0.777l-0.359,0.784H7.464
l1.253-2.191L7.509,6.654h1.125l0.379,0.791c0.128,0.264,0.225,0.476,0.328,0.72h0.013c0.103-0.276,0.186-0.47,0.295-0.72
l0.366-0.791h1.119L9.913,8.768l1.284,2.218C11.197,10.986,10.068,10.986,10.068,10.986z M13.94,10.986l-0.393-0.784
c-0.16-0.302-0.263-0.526-0.386-0.777h-0.012c-0.091,0.251-0.2,0.476-0.335,0.777l-0.36,0.784h-1.117l1.253-2.191l-1.209-2.141
h1.125l0.379,0.791c0.129,0.264,0.226,0.476,0.328,0.72h0.013c0.104-0.276,0.187-0.47,0.296-0.72l0.366-0.791h1.118l-1.221,2.114
l1.286,2.218C15.071,10.986,13.94,10.986,13.94,10.986z M16.756,11.705h-1.311v-0.54h0.611V7.116h-0.611v-0.54h1.311V11.705z"/>
</g>
</svg>
)
}
switch(type) switch(type)
{ {
case 'video': case 'video':
@ -182,7 +203,7 @@ return (
</div> </div>
</a> </a>
} }
leftIcon={contentIcon(torrent.contentType)} leftIcon={contentIcon(torrent.contentType, torrent.contentCategory)}
rightIcon={ rightIcon={
<a href={`magnet:?xt=urn:btih:${torrent.hash}`}> <a href={`magnet:?xt=urn:btih:${torrent.hash}`}>
<svg style={{ <svg style={{