From 80316c066e96786449a5c5717ca83c98f5c4c3d0 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Fri, 26 Oct 2018 11:36:37 -0700 Subject: [PATCH] add info to menu selected challenge panel --- src/state/index.js | 11 +++++++---- src/templates/menu.html | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/state/index.js b/src/state/index.js index 0258ab2..2cf4ef3 100644 --- a/src/state/index.js +++ b/src/state/index.js @@ -490,11 +490,14 @@ function computeMenuSelectedChallengeIndex (state) { } function computeMenuSelectedChallengeInfoText (state) { - const numBeats = state.menuSelectedChallenge.numBeats; - const songLength = state.menuSelectedChallenge.songLength; + const challenge = state.menuSelectedChallenge; + + const numBeats = challenge.numBeats; + const songLength = challenge.songLength; if (!numBeats || !songLength) { return; } - state.menuSelectedChallenge.songInfoText = - `${formatSongLength(songLength)} / ${numBeats} beats`; + + challenge.songInfoText = + `${challenge.author}\n${challenge.downloadsText}\n${formatSongLength(songLength)} / ${numBeats} beats`; } function formatSongLength (songLength) { diff --git a/src/templates/menu.html b/src/templates/menu.html index b7c9de2..9492d9d 100644 --- a/src/templates/menu.html +++ b/src/templates/menu.html @@ -215,10 +215,10 @@ bind__text="value: menuSelectedChallenge.songName"> + text="align: center; color: #999; wrapCount: 30; lineHeight: 60; width: 0.8; baseline: bottom" + bind__text="value: menuSelectedChallenge.songInfoText">