Skip to content

Commit

Permalink
Merge pull request #11545 from nanaya/video-icon-beatmap
Browse files Browse the repository at this point in the history
Show video icon on beatmap page
  • Loading branch information
notbakaneko authored Oct 11, 2024
2 parents ebba365 + a685477 commit 4993f64
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions resources/js/beatmapsets-show/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ import Stats from './stats';

const favouritesToShow = 50;

function statusIcon(type: 'storyboard' | 'video') {
const iconClass = type === 'video' ? 'fas fa-film' : 'fas fa-image';

return (
<div
className='beatmapset-status beatmapset-status--show-icon'
title={trans(`beatmapsets.show.info.${type}`)}
>
<span className={iconClass} />
</div>
);
}

interface DownloadButtonOptions {
bottomTextKey?: string;
href: string;
Expand Down Expand Up @@ -352,14 +365,8 @@ export default class Header extends React.Component<Props> {
private renderStatusBar() {
return (
<div className='beatmapset-header__status'>
{this.controller.beatmapset.storyboard &&
<div
className='beatmapset-status beatmapset-status--show-icon'
title={trans('beatmapsets.show.info.storyboard')}
>
<span className='fas fa-image' />
</div>
}
{this.controller.beatmapset.video && statusIcon('video')}
{this.controller.beatmapset.storyboard && statusIcon('storyboard')}
<a className='beatmapset-status beatmapset-status--show' href={this.statusToWikiLink(this.controller.currentBeatmap.status)}>
{trans(`beatmapsets.show.status.${this.controller.currentBeatmap.status}`)}
</a>
Expand Down

0 comments on commit 4993f64

Please sign in to comment.