diff --git a/src/js/App.js b/src/js/App.js index 27a37991..b0a4880d 100755 --- a/src/js/App.js +++ b/src/js/App.js @@ -104,7 +104,7 @@ class App extends React.Component{ global.slim_mode = true } } else { - if (this.props.slim_mode){ + if (global.slim_mode){ global.slim_mode = false } } @@ -213,7 +213,7 @@ class App extends React.Component{ if (this.props.sidebar_open) className += ' sidebar-open' if (this.props.modal) className += ' modal-open' if (this.props.touch_dragging) className += ' touch-dragging' - if (this.props.slim_mode) className += ' slim-mode' + if (global.slim_mode) className += ' slim-mode' if (helpers.isTouchDevice()){ className += ' touch' } else { @@ -254,7 +254,6 @@ class App extends React.Component{ const mapStateToProps = (state, ownProps) => { return { touch_dragging: state.ui.touch_dragging, - slim_mode: state.ui.slim_mode, broadcasts: (state.ui.broadcasts ? state.ui.broadcasts : []), volume: (state.mopidy.volume ? state.mopidy.volume : false), notifications: (state.ui.notifications ? state.ui.notifications : []), diff --git a/src/js/components/Track.js b/src/js/components/Track.js index 9011116d..841f7381 100755 --- a/src/js/components/Track.js +++ b/src/js/components/Track.js @@ -214,7 +214,7 @@ export default class Track extends React.Component{ ) } - if (this.props.slim_mode){ + if (global.slim_mode){ // Select zone handles selection events only // We use onClick to capture touch as well as mouse events in one tidy parcel diff --git a/src/js/components/TrackList.js b/src/js/components/TrackList.js index 2bc6518f..f5d9c243 100755 --- a/src/js/components/TrackList.js +++ b/src/js/components/TrackList.js @@ -191,7 +191,7 @@ class TrackList extends React.Component{ handleSelection(e,track_key){ let selected_tracks = this.props.selected_tracks - if (e.ctrlKey || this.props.slim_mode){ + if (e.ctrlKey || global.slim_mode){ // Already selected, so unselect it if (selected_tracks.includes(track_key)){ @@ -398,7 +398,6 @@ class TrackList extends React.Component{ track={track} context={this.props.context} can_sort={this.props.context == 'queue' || this.props.context == 'editable-playlist'} - slim_mode={this.props.slim_mode} selected={this.props.selected_tracks.includes(track_key)} dragger={this.props.dragger} handleSelection={e => this.handleSelection(e, track_key)} @@ -428,7 +427,6 @@ class TrackList extends React.Component{ const mapStateToProps = (state, ownProps) => { return { selected_tracks: state.ui.selected_tracks, - slim_mode: state.ui.slim_mode, dragger: state.ui.dragger, current_track: state.core.current_track, context_menu: state.ui.context_menu diff --git a/src/js/views/Album.js b/src/js/views/Album.js index 2c473b5f..7c8f114a 100755 --- a/src/js/views/Album.js +++ b/src/js/views/Album.js @@ -122,7 +122,7 @@ class Album extends React.Component{ return (
- {this.props.slim_mode ?
this.handleContextMenu(e)} uiActions={this.props.uiActions} /> : null} + {global.slim_mode ?
this.handleContextMenu(e)} uiActions={this.props.uiActions} /> : null}
@@ -133,8 +133,8 @@ class Album extends React.Component{

{ this.props.album.name }

    - { !this.props.slim_mode ?
  • {helpers.uriSource( this.props.params.uri )} {this.props.album.album_type ? this.props.album.album_type : 'album'}
  • : null } - { !this.props.slim_mode && artists.length > 0 ?
  • : null } + { !global.slim_mode ?
  • {helpers.uriSource( this.props.params.uri )} {this.props.album.album_type ? this.props.album.album_type : 'album'}
  • : null } + { !global.slim_mode && artists.length > 0 ?
  • : null } { this.props.album.release_date ?
  • : null }
  • { this.props.album.tracks_total ? this.props.album.tracks_total : '0' } tracks,  @@ -146,7 +146,7 @@ class Album extends React.Component{
    { helpers.uriSource(this.props.params.uri) == 'spotify' ? : null } - {this.props.slim_mode ? null : this.handleContextMenu(e)} />} + {global.slim_mode ? null : this.handleContextMenu(e)} />}
    @@ -168,7 +168,6 @@ class Album extends React.Component{ const mapStateToProps = (state, ownProps) => { return { - slim_mode: state.ui.slim_mode, load_queue: state.ui.load_queue, artists: state.core.artists, album: (state.core.albums && typeof(state.core.albums[ownProps.params.uri]) !== 'undefined' ? state.core.albums[ownProps.params.uri] : false ), diff --git a/src/js/views/Artist.js b/src/js/views/Artist.js index 106158e3..13d003eb 100755 --- a/src/js/views/Artist.js +++ b/src/js/views/Artist.js @@ -203,7 +203,7 @@ class Artist extends React.Component{ return (
    - {this.props.slim_mode ?
    this.handleContextMenu(e)} uiActions={this.props.uiActions} /> : null} + {global.slim_mode ?
    this.handleContextMenu(e)} uiActions={this.props.uiActions} /> : null}
    @@ -214,7 +214,7 @@ class Artist extends React.Component{
    { can_play_radio ? : } { can_follow ? : null} - {this.props.slim_mode ? null : this.handleContextMenu(e)} />} + {global.slim_mode ? null : this.handleContextMenu(e)} />}
    { this.renderSubViewMenu() }
    @@ -260,7 +260,6 @@ class Artist extends React.Component{ const mapStateToProps = (state, ownProps) => { return { - slim_mode: state.ui.slim_mode, load_queue: state.ui.load_queue, artist: (state.core.artists && typeof(state.core.artists[ownProps.params.uri]) !== 'undefined' ? state.core.artists[ownProps.params.uri] : false ), artists: (state.core.artists ? state.core.artists : []), diff --git a/src/js/views/Playlist.js b/src/js/views/Playlist.js index 758b2573..c014863c 100755 --- a/src/js/views/Playlist.js +++ b/src/js/views/Playlist.js @@ -117,7 +117,7 @@ class Playlist extends React.Component{
    - {this.props.slim_mode ? null : this.handleContextMenu(e)} />} + {global.slim_mode ? null : this.handleContextMenu(e)} />}
    ) @@ -127,7 +127,7 @@ class Playlist extends React.Component{
    - {this.props.slim_mode ? null : this.handleContextMenu(e)} />} + {global.slim_mode ? null : this.handleContextMenu(e)} />}
    ) } @@ -135,7 +135,7 @@ class Playlist extends React.Component{
    - {this.props.slim_mode ? null : this.handleContextMenu(e)} />} + {global.slim_mode ? null : this.handleContextMenu(e)} />}
    ) @@ -143,7 +143,7 @@ class Playlist extends React.Component{ return (
    - {this.props.slim_mode ? null : this.handleContextMenu(e)} />} + {global.slim_mode ? null : this.handleContextMenu(e)} />}
    ) } @@ -169,7 +169,7 @@ class Playlist extends React.Component{ return (
    - {this.props.slim_mode ?
    this.handleContextMenu(e)} uiActions={this.props.uiActions} /> : null} + {global.slim_mode ?
    this.handleContextMenu(e)} uiActions={this.props.uiActions} /> : null}
    @@ -180,8 +180,8 @@ class Playlist extends React.Component{ { this.props.playlist.description ?

    : null }
      - { !this.props.slim_mode ?
    • {helpers.uriSource( this.props.params.uri )} playlist
    • : null } - { this.props.playlist.owner && !this.props.slim_mode ?
    • {this.props.playlist.owner.id}
    • : null } + { !global.slim_mode ?
    • {helpers.uriSource( this.props.params.uri )} playlist
    • : null } + { this.props.playlist.owner && !global.slim_mode ?
    • {this.props.playlist.owner.id}
    • : null } { this.props.playlist.followers ?
    • {this.props.playlist.followers.total.toLocaleString()} followers
    • : null } { this.props.playlist.last_modified ?
    • : null }
    • @@ -213,7 +213,6 @@ const mapStateToProps = (state, ownProps) => { var uri = ownProps.params.uri uri = uri.replace(' ','%20') return { - slim_mode: state.ui.slim_mode, load_queue: state.ui.load_queue, playlist: (state.core.playlists && state.core.playlists[uri] !== undefined ? state.core.playlists[uri] : false ), spotify_library_playlists: state.spotify.library_playlists, diff --git a/src/js/views/library/LibraryPlaylists.js b/src/js/views/library/LibraryPlaylists.js index db36c3fd..d4b5651a 100755 --- a/src/js/views/library/LibraryPlaylists.js +++ b/src/js/views/library/LibraryPlaylists.js @@ -117,7 +117,7 @@ class LibraryPlaylists extends React.Component{ } if (this.props.view == 'list'){ - if (this.props.slim_mode){ + if (global.slim_mode){ var columns = [ { label: 'Name', @@ -262,7 +262,6 @@ const mapStateToProps = (state, ownProps) => { mopidy_library_playlists_status: state.mopidy.library_playlists_status, spotify_library_playlists: state.spotify.library_playlists, spotify_library_playlists_status: state.spotify.library_playlists_status, - slim_mode: state.ui.slim_mode, load_queue: state.ui.load_queue, me_id: (state.spotify.me ? state.spotify.me.id : (state.ui.config && state.ui.config.spotify_username ? state.ui.config.spotify_username : false)), view: state.ui.library_playlists_view, diff --git a/src/scss/views/_user.scss b/src/scss/views/_user.scss index aad0814b..e3aa59d5 100755 --- a/src/scss/views/_user.scss +++ b/src/scss/views/_user.scss @@ -32,15 +32,20 @@ @include responsive( $bp_medium ){ .intro { - text-align: center; .thumbnail { float: none; margin: 0 auto 20px; } + .liner { + padding: 15vh 10px 0; + } + h1 { padding-top: 0; + font-size: 3rem; + line-height: 3rem; } } }