Browse Source

Adjust button positions

master
jeffvli 3 years ago
parent
commit
2e30ca6424
  1. 62
      src/components/player/NowPlayingMiniView.tsx
  2. 62
      src/components/player/NowPlayingView.tsx

62
src/components/player/NowPlayingMiniView.tsx

@ -339,38 +339,36 @@ const NowPlayingMiniView = () => {
/>
</StyledInputPickerContainer>
<br />
<ButtonToolbar>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addNext')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="plus-circle" style={{ marginRight: '10px' }} />
{t('Add (next)')}
</StyledButton>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addLater')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="plus" style={{ marginRight: '10px' }} />
{t('Add (later)')}
</StyledButton>
</ButtonToolbar>
<ButtonToolbar>
<StyledButton
block
appearance="primary"
onClick={() => handlePlayRandom('play')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="play" style={{ marginRight: '10px' }} />
{t('Play')}
</StyledButton>
</ButtonToolbar>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addNext')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
style={{ width: '50%' }}
>
<Icon icon="plus-circle" style={{ marginRight: '10px' }} />
{t('Add (next)')}
</StyledButton>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addLater')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
style={{ width: '50%' }}
>
<Icon icon="plus" style={{ marginRight: '10px' }} />
{t('Add (later)')}
</StyledButton>
<StyledButton
block
appearance="primary"
onClick={() => handlePlayRandom('play')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="play" style={{ marginRight: '10px' }} />
{t('Play')}
</StyledButton>
</Popup>
}
>

62
src/components/player/NowPlayingView.tsx

@ -359,38 +359,36 @@ const NowPlayingView = () => {
/>
</StyledInputPickerContainer>
<br />
<ButtonToolbar>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addNext')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="plus-circle" style={{ marginRight: '10px' }} />
{t('Add (next)')}
</StyledButton>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addLater')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="plus" style={{ marginRight: '10px' }} />
{t('Add (later)')}
</StyledButton>
</ButtonToolbar>
<ButtonToolbar>
<StyledButton
block
appearance="primary"
onClick={() => handlePlayRandom('play')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="play" style={{ marginRight: '10px' }} />
{t('Play')}
</StyledButton>
</ButtonToolbar>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addNext')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
style={{ width: '50%' }}
>
<Icon icon="plus-circle" style={{ marginRight: '10px' }} />
{t('Add (next)')}
</StyledButton>
<StyledButton
appearance="subtle"
onClick={() => handlePlayRandom('addLater')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
style={{ width: '50%' }}
>
<Icon icon="plus" style={{ marginRight: '10px' }} />
{t('Add (later)')}
</StyledButton>
<StyledButton
block
appearance="primary"
onClick={() => handlePlayRandom('play')}
loading={isLoadingRandom}
disabled={!(typeof autoPlaylistTrackCount === 'number')}
>
<Icon icon="play" style={{ marginRight: '10px' }} />
{t('Play')}
</StyledButton>
</Popup>
}
>

Loading…
Cancel
Save