[Glitch] Fix audio player modal having white-on-white buttons in light theme
Port 02fe176fd4 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
			
			
This commit is contained in:
		
							parent
							
								
									807bf8be24
								
							
						
					
					
						commit
						d878ca267c
					
				| 
						 | 
					@ -4,6 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
 | 
				
			||||||
import ImmutablePureComponent from 'react-immutable-pure-component';
 | 
					import ImmutablePureComponent from 'react-immutable-pure-component';
 | 
				
			||||||
import { connect } from 'react-redux';
 | 
					import { connect } from 'react-redux';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import { getAverageFromBlurhash } from 'flavours/glitch/blurhash';
 | 
				
			||||||
import Audio from 'flavours/glitch/features/audio';
 | 
					import Audio from 'flavours/glitch/features/audio';
 | 
				
			||||||
import Footer from 'flavours/glitch/features/picture_in_picture/components/footer';
 | 
					import Footer from 'flavours/glitch/features/picture_in_picture/components/footer';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,6 +27,18 @@ class AudioModal extends ImmutablePureComponent {
 | 
				
			||||||
    onChangeBackgroundColor: PropTypes.func.isRequired,
 | 
					    onChangeBackgroundColor: PropTypes.func.isRequired,
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  componentDidMount () {
 | 
				
			||||||
 | 
					    const { media, onChangeBackgroundColor } = this.props;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    const backgroundColor = getAverageFromBlurhash(media.get('blurhash'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    onChangeBackgroundColor(backgroundColor || { r: 255, g: 255, b: 255 });
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  componentWillUnmount () {
 | 
				
			||||||
 | 
					    this.props.onChangeBackgroundColor(null);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  render () {
 | 
					  render () {
 | 
				
			||||||
    const { media, status, accountStaticAvatar, onClose } = this.props;
 | 
					    const { media, status, accountStaticAvatar, onClose } = this.props;
 | 
				
			||||||
    const options = this.props.options || {};
 | 
					    const options = this.props.options || {};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,6 +37,10 @@ class VideoModal extends ImmutablePureComponent {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  componentWillUnmount () {
 | 
				
			||||||
 | 
					    this.props.onChangeBackgroundColor(null);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  render () {
 | 
					  render () {
 | 
				
			||||||
    const { media, status, onClose } = this.props;
 | 
					    const { media, status, onClose } = this.props;
 | 
				
			||||||
    const options = this.props.options || {};
 | 
					    const options = this.props.options || {};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue