Skip to content

Commit

Permalink
Fixes transpose indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
mrharpo committed Sep 14, 2024
1 parent c25a0ea commit 8652d4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions src/Control.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ export const TransposeDown = ({ getState, update }) =>
'▼'
)

export const TransposeIndicator = ({ state: { transpose } }) =>
m(
'.control__indicator',
transpose > 0 ? `+${transpose}` : transpose == 0 ? null : transpose
)

export const TransposeReset = ({ state: { transpose }, update }) =>
m(
'button.control__reset.control__transpose',
Expand Down Expand Up @@ -148,11 +142,8 @@ export const Controls = cell =>
m('.control', {}, [
PrevSong(cell),
TransposeUp(cell),
TransposeReset(cell),
TransposeDown(cell),
cell.state.transpose != 0 && [
TransposeIndicator(cell),
TransposeReset(cell),
],
NextSong(cell),
// m(
// 'button.mode',
Expand Down
2 changes: 1 addition & 1 deletion src/ireal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const Style = ({ state }) => m('.page__header__style', state.song?.style)
export const Composer = ({ state }) =>
m('.page__header__composer', state.song? reverseComposerName(state.song.composer): '')

export const Key = ({ state }) => m('.page__header__key', state.key)
export const Key = ({ state }) => m('.page__header__key', [state.key, state.transpose ? ` (${state.transpose})` : ''])

export const Bpm = ({ state }) =>
state.song && state.song.bpm != 0
Expand Down

0 comments on commit 8652d4c

Please sign in to comment.