From a685477a1f42fea87aedab4c1b2065ba759b88ae Mon Sep 17 00:00:00 2001 From: nanaya Date: Thu, 10 Oct 2024 21:52:45 +0900 Subject: [PATCH] Show video icon on beatmap page --- resources/js/beatmapsets-show/header.tsx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/resources/js/beatmapsets-show/header.tsx b/resources/js/beatmapsets-show/header.tsx index d22d61d9e61..2bf1ff64c37 100644 --- a/resources/js/beatmapsets-show/header.tsx +++ b/resources/js/beatmapsets-show/header.tsx @@ -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 ( +
+ +
+ ); +} + interface DownloadButtonOptions { bottomTextKey?: string; href: string; @@ -352,14 +365,8 @@ export default class Header extends React.Component { private renderStatusBar() { return (
- {this.controller.beatmapset.storyboard && -
- -
- } + {this.controller.beatmapset.video && statusIcon('video')} + {this.controller.beatmapset.storyboard && statusIcon('storyboard')} {trans(`beatmapsets.show.status.${this.controller.currentBeatmap.status}`)}