Loading follow button

This commit is contained in:
James Barnsley
2017-06-14 20:21:02 +12:00
parent 2535725d44
commit 120ffff975
3 changed files with 9 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class FollowButton extends React.Component{
}
// Loader
if (helpers.isLoading(this.props.load_queue,['*/following*','/followers*','*/contains*'])){
if (helpers.isLoading(this.props.load_queue,['/following','/followers','me/albums/contains/?ids=','me/albums/?ids='])){
className += ' working'
}

View File

@ -466,7 +466,7 @@ export let isLoading = function(load_queue = [], keys = []){
// Loop all the keys we're looking for
for (var i = 0; i < keys.length; i++){
if (load_queue[load_queue_key].startsWith(keys[i])){
if (load_queue[load_queue_key].includes(keys[i])){
return true
}
}

View File

@ -175,7 +175,7 @@ input[type="submit"] {
position: absolute;
display: block;
content: '';
background: rgba(175,175,175,0.2);
background: rgba(0,0,0,0.15);
opacity: 1;
animation: slideloader 1s infinite;
top: 0;
@ -184,6 +184,12 @@ input[type="submit"] {
left: 0;
z-index: 1;
}
&.white {
&:after {
background: rgba(255,255,255,0.5);
}
}
}
&.context-menu-trigger {