All views done this time; Language file mapping for modals.. Will need to do destructuring in second sweep
This commit is contained in:
@ -11,13 +11,17 @@ import * as uiActions from '../../services/ui/actions';
|
||||
import * as mopidyActions from '../../services/mopidy/actions';
|
||||
import * as spotifyActions from '../../services/spotify/actions';
|
||||
import { isLoading } from '../../util/helpers';
|
||||
import { I18n, i18n } from '../../locale';
|
||||
|
||||
class LibraryTracks extends React.Component {
|
||||
componentDidMount() {
|
||||
this.props.uiActions.setWindowTitle('Tracks');
|
||||
this.props.uiActions.setWindowTitle(i18n('library.tracks.title'));
|
||||
|
||||
if (!this.props.spotify_available) {
|
||||
this.props.uiActions.createNotification({ level: 'warning', content: 'Enable Spotify to browse tracks' });
|
||||
this.props.uiActions.createNotification({
|
||||
level: 'warning',
|
||||
content: i18n('errors.enable_first', { provider: i18n('services.spotify.title') }),
|
||||
});
|
||||
} else if (this.props.library_tracks === undefined) {
|
||||
this.props.spotifyActions.getLibraryTracks();
|
||||
}
|
||||
@ -42,7 +46,7 @@ class LibraryTracks extends React.Component {
|
||||
if (isLoading(this.props.load_queue, ['spotify_me/tracks?'])) {
|
||||
return (
|
||||
<div className="view library-tracks-view">
|
||||
<Header icon="music" title="My tracks" />
|
||||
<Header icon="music" title={i18n('library.tracks.title')} />
|
||||
<Loader body loading />
|
||||
</div>
|
||||
);
|
||||
@ -61,7 +65,7 @@ class LibraryTracks extends React.Component {
|
||||
const options = (
|
||||
<a className="button button--no-hover" onClick={(e) => this.playAll(e)}>
|
||||
<Icon name="play_circle_filled" />
|
||||
Play all
|
||||
<I18n path="actions.play_all" />
|
||||
</a>
|
||||
);
|
||||
|
||||
@ -69,7 +73,7 @@ Play all
|
||||
<div className="view library-tracks-view">
|
||||
<Header options={options} uiActions={this.props.uiActions}>
|
||||
<Icon name="music_note" type="material" />
|
||||
My tracks
|
||||
<I18n path="library.tracks.title" />
|
||||
</Header>
|
||||
<section className="content-wrapper">
|
||||
<TrackList tracks={tracks} />
|
||||
|
||||
Reference in New Issue
Block a user