summaryrefslogtreecommitdiff
path: root/client/faceSearch/faceSearch.query.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-12-17 00:35:19 +0100
committerJules Laplace <julescarbon@gmail.com>2018-12-17 00:35:19 +0100
commit4cf8581655c34698f8869bb364b6d436b881d17a (patch)
tree449d6c5a8cd5a3f5bbd277e67f66a734ae0f51c8 /client/faceSearch/faceSearch.query.js
parent0bbaef7c889f2bf17cdf7e4584a6946085d0a7eb (diff)
returning results...!
Diffstat (limited to 'client/faceSearch/faceSearch.query.js')
-rw-r--r--client/faceSearch/faceSearch.query.js26
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>.