Adding numbers to loader

This commit is contained in:
James Barnsley
2020-12-05 21:41:30 +13:00
parent 491735c901
commit 094bdfeab8
15 changed files with 173 additions and 129 deletions

View File

@ -158,7 +158,7 @@ class LibraryPlaylists extends React.Component {
limit,
} = this.state;
if (loading_progress !== null) {
if (loading_progress) {
return <Loader body loading progress={loading_progress} />;
}
let playlists = [...playlistsProp];
@ -224,7 +224,6 @@ class LibraryPlaylists extends React.Component {
const {
filter,
} = this.state;
const loading = loading_progress !== null;
const source_options = [
{
@ -321,11 +320,11 @@ class LibraryPlaylists extends React.Component {
<Button
noHover
discrete
onClick={loading ? this.cancelRefresh : this.refresh}
onClick={loading_progress ? this.cancelRefresh : this.refresh}
tracking={{ category: 'LibraryAlbums', action: 'Refresh' }}
>
{loading ? <Icon name="close" /> : <Icon name="refresh" /> }
{loading ? <I18n path="actions.cancel" /> : <I18n path="actions.refresh" /> }
{loading_progress ? <Icon name="close" /> : <Icon name="refresh" /> }
{loading_progress ? <I18n path="actions.cancel" /> : <I18n path="actions.refresh" /> }
</Button>
<Button
to="/playlist/create"