Skip to content

Commit

Permalink
fix #157
Browse files Browse the repository at this point in the history
  • Loading branch information
sneljo1 committed Nov 16, 2018
1 parent f983148 commit b6ebd03
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 43 deletions.
2 changes: 1 addition & 1 deletion src/renderer/_shared/PageHeader/PageHeader.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "../../css/bootstrap.imports.scss";

.page-header {
padding: 20px 20px 15px 40px;
h2 {
Expand Down Expand Up @@ -83,6 +82,7 @@
}
h2 {
color: #fff;
user-select: text;
}
.header-content {
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
.track-grid-item {
padding: 10px;
max-width: 260px;
margin: 0 auto;
.trackCount {
position: absolute;
top: 0;
Expand Down Expand Up @@ -231,12 +230,12 @@
content: '';
border-radius: 0 0 .5rem .5rem;
width: 100%;
height: 140%;
height: 190%;
position: absolute;
z-index: -1;
left: 0;
bottom: 0;
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .55));
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .65));
}
.actions-dropdown {
.bp3-popover-target a {
Expand Down
57 changes: 28 additions & 29 deletions src/renderer/_shared/TracksGrid/TrackgridItem/TrackGridItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,38 @@ class TrackGridItem extends React.Component<AllProps> {

if (!track || !track.user) return null;

const isLiked = track.type && track.type.indexOf('like') !== -1;

return (
<div className='trackFooter d-flex justify-content-between align-items-center'>
<div className='trackStats'>
{
showInfo ? (<div>
<div className='stat'>
<i className='bx bxs-heart' />
<span>{abbreviate_number(track.likes_count)}</span>
</div>
<div className='stat'>
<i className='bx bx-repost' />
<span>{abbreviate_number(track.reposts_count)}</span>
</div>
</div>) : null
showInfo ? (
<>
<div className='stat'>
<i className='bx bxs-heart' />
<span>{abbreviate_number(track.likes_count)}</span>
</div>
<div className='stat'>
<i className='bx bx-repost' />
<span>{abbreviate_number(track.reposts_count)}</span>
</div>
</>
) : null
}
{
isLiked && (
<><span className='stat'><i className='bx bxs-heart text-danger' /> Liked</span></>
)
}

{
!showInfo && !isLiked && (
<><span className='stat'>
<i className={`bx bx-${track.sharing === 'public' ? 'lock-open' : 'lock'}`} />
{track.sharing === 'public' ? 'Public' : 'Private'}</span>
</>
)
}
</div>

Expand All @@ -180,25 +198,6 @@ class TrackGridItem extends React.Component<AllProps> {

const object_url = (track.kind === 'playlist' ? '/playlist/' : '/track/') + track.id;

// TODO check if liked playlists still work
if (track.type && track.type.indexOf('like') !== -1) {
return (
<div className='trackInfo flex align-items-center'>
<i className='bx bxs-heart' />
<div>
<div className='trackTitle'>
<Link to={object_url}>
<TextShortener text={track.title} />
</Link>
</div>
{
this.renderArtist()
}
</div>
</div>
);
}

return (
<div className='trackInfo'>
<div className='trackTitle'>
Expand Down
1 change: 1 addition & 0 deletions src/renderer/pages/artist/ArtistPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
padding: 30px 30px;
font-size: .9rem;
.artistInfo {
user-select: text;
padding: 10px;
}
}
Expand Down
14 changes: 4 additions & 10 deletions src/renderer/pages/track/TrackPage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
.trackDetails {
background: #f7f7f7;
padding-top: 1rem;

.track-info {
color: #6c757d;
font-size: 1rem;
Expand All @@ -29,19 +28,17 @@
display: inline-block;
}
}

.taglist {
.badge {
background: $brand-grey-lighter;
font-size: .9rem;
margin-bottom: .2rem
}
}

.trackHeader, .tracktabs {
.trackHeader,
.tracktabs {
flex-shrink: 0;
}

.trackPadding {
padding: 20px 40px;
}
Expand All @@ -51,25 +48,22 @@
.track-comments {
padding: 20px 40px;
}

.trackDescription {
color: #3a3e43;
background: #fbfbfb;
padding: 2rem;
border-radius: 1rem;
margin-bottom: 2rem;

user-select: text;
.descriptionInner.cut {
max-height: 200px;
overflow: hidden;
}

&.isOpen {
max-height: 500px;
}
}
.user_card_wrap {
flex-grow: 0;
}

}
}

0 comments on commit b6ebd03

Please sign in to comment.