diff options
Diffstat (limited to 'client/faceSearch/faceSearch.query.js')
| -rw-r--r-- | client/faceSearch/faceSearch.query.js | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/client/faceSearch/faceSearch.query.js b/client/faceSearch/faceSearch.query.js index 8302e437..425cb282 100644 --- a/client/faceSearch/faceSearch.query.js +++ b/client/faceSearch/faceSearch.query.js @@ -20,12 +20,12 @@ class FaceSearchQuery extends Component { if (file && file.type.match('image.*')) break } if (!file) return - var fr = new FileReader(); + const fr = new FileReader() fr.onload = () => { fr.onload = null this.setState({ image: fr.result }) } - fr.readAsDataURL(files[0]); + fr.readAsDataURL(files[0]) this.props.actions.upload(this.props.payload, file) } @@ -36,6 +36,7 @@ class FaceSearchQuery extends Component { if (image) { style.backgroundImage = 'url(' + image + ')' style.backgroundSize = 'cover' + style.opacity = 1 } return ( <div className='query row'> @@ -44,9 +45,8 @@ class FaceSearchQuery extends Component { <div className='loading' style={style}> <Loader /> </div> - : - <div style={style}> - <img src="/assets/img/icon_camera.svg" /> + : <div style={style}> + {image ? null : <img src="/assets/img/icon_camera.svg" />} <input type="file" name="img" @@ -57,18 +57,20 @@ class FaceSearchQuery extends Component { </div> } </div> - <div class='cta'> + <div className='cta'> <h2>Search This Dataset</h2> <h3>Searching {13456} images</h3> <p> - Use facial recognition to reverse search into the LFW dataset and see if it contains your photos. + {'Use facial recognition to reverse search into the LFW dataset '} + {'and see if it contains your photos.'} </p> <ol> - <li>Upload a photo of yourself</li> - <li>Use a photo similar to examples below</li> - <li>Only matches over 85% will be displayed</li> - <li>Read more tips to improve search results</li> - <li>Your search data is never stored and immediately cleared once you leave this page.</li> + <li>Upload a photo of yourself</li> + <li>Use a photo similar to examples below</li> + <li>Only matches over 85% will be displayed</li> + <li>Read more tips to improve search results</li> + <li>{'Your search data is never stored and immediately cleared '} + {'once you leave this page.'}</li> </ol> <p> Read more about <a href='/about/privacy/'>privacy</a>. |
