Commit 925374eb authored by Florent Berthelot's avatar Florent Berthelot

changeVisibilityKara button karaLine is clickable

parent 735b3851
......@@ -138,6 +138,11 @@ class KaraLine extends Component {
}
};
changeVisibilityKara = () => {
axios.put('/api/playlists/' + this.props.idPlaylist + '/karas/' + this.props.kara.playlistcontent_id,
{ flag_visible: true });
};
karaFamilies = this.props.kara.families ? this.props.kara.families.map(tag => {
return <div key={tag.name} className="tag" title={this.getTagInLocale(tag)}>{tag.short ? tag.short : '?'}</div>;
}) : [] ;
......@@ -212,13 +217,12 @@ class KaraLine extends Component {
</button> : null}
{scope === 'admin' && idPlaylist > 0 ? <button title={i18next.t('TOOLTIP_PLAYKARA')} className="btn btn-sm btn-action playKara"
onClick={this.playKara}><i className="fas fa-play"></i></button> : null}
{scope === 'admin' && idPlaylist > 0 && !kara.flag_visible && this.props.playlistInfo
&& (this.props.playlistInfo.flag_current || this.props.playlistInfo.flag_public) ? (
<button
type="button"
className={'btn btn-sm btn-action btn-primary'}
><i className="fas fa-eye-slash"></i></button>
) : null}
{scope === 'admin' && this.props.playlistInfo && idPlaylist > 0 && !kara.flag_visible
&& (this.props.playlistInfo.flag_current || this.props.playlistInfo.flag_public) ?
<button type="button" className={'btn btn-sm btn-action btn-primary'} onClick={this.changeVisibilityKara}>
<i className="fas fa-eye-slash"></i>
</button> : null
}
{scope !== 'admin' && this.props.playlistInfo && this.props.playlistInfo.flag_public ?
<button className={'likeKara btn btn-sm btn-action ' + (this.state.isLike ? 'currentLike' : '')}
onClick={this.likeKara}><i className="fas fa-thumbs-up"></i></button> : null}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment