From cacd7cc5a9296a192171e8046e12f62c7165f2e9 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Jan 2019 15:52:15 +0100 Subject: build --- client/faceSearch/faceSearch.query.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/faceSearch') diff --git a/client/faceSearch/faceSearch.query.js b/client/faceSearch/faceSearch.query.js index 2d140813..de7e47b6 100644 --- a/client/faceSearch/faceSearch.query.js +++ b/client/faceSearch/faceSearch.query.js @@ -47,7 +47,7 @@ class FaceSearchQuery extends Component {

Search by Image

-

Searching {13456} images

+

Searching {13233} images

{'Use facial recognition to reverse search into the LFW dataset '} {'and see if it contains your photos.'} -- cgit v1.2.3-70-g09d2 From 9703ffa533dbb2106dc74dcfbf883eb4bfc1fa00 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Jan 2019 16:49:55 +0100 Subject: fix query --- client/faceSearch/faceSearch.query.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'client/faceSearch') diff --git a/client/faceSearch/faceSearch.query.js b/client/faceSearch/faceSearch.query.js index de7e47b6..8a82373e 100644 --- a/client/faceSearch/faceSearch.query.js +++ b/client/faceSearch/faceSearch.query.js @@ -19,6 +19,11 @@ class FaceSearchQuery extends Component { } upload(blob) { + if (this.state.image) { + URL.revokeObjectURL(this.state.image) + } + const url = URL.createObjectURL(blob) + this.setState({ image: url }) this.props.actions.upload(this.props.payload, blob) } @@ -37,13 +42,13 @@ class FaceSearchQuery extends Component {

{image ? null : } + {result.loading && ( +
+ +
+ )}
- {result.loading && ( -
- -
- )}

Search by Image

-- cgit v1.2.3-70-g09d2 From f3d4880970010ad8bee1638de6e15cb166a593a1 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 17 Jan 2019 16:57:28 +0100 Subject: k --- client/common/loader.component.js | 21 ++++++++++++++------- client/faceSearch/faceSearch.result.js | 1 - package-lock.json | 13 +++++++++++++ package.json | 1 + 4 files changed, 28 insertions(+), 8 deletions(-) (limited to 'client/faceSearch') diff --git a/client/common/loader.component.js b/client/common/loader.component.js index 5930c63e..df25dd39 100644 --- a/client/common/loader.component.js +++ b/client/common/loader.component.js @@ -1,11 +1,18 @@ import React from 'react' +import Spinner from 'react-spin' export default function Loader() { - return ( -
-
- -
-
- ) + const spinCfg = { + width: 5, + radius: 20, + color: 'white', + } + return + // return ( + //
+ //
+ // + //
+ //
+ // ) } diff --git a/client/faceSearch/faceSearch.result.js b/client/faceSearch/faceSearch.result.js index c2509033..00dec160 100644 --- a/client/faceSearch/faceSearch.result.js +++ b/client/faceSearch/faceSearch.result.js @@ -49,7 +49,6 @@ class FaceSearchResult extends Component { return (
-

Searching...

diff --git a/package-lock.json b/package-lock.json index 60a74ece..72d44774 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7163,6 +7163,14 @@ } } }, + "react-spin": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/react-spin/-/react-spin-0.6.2.tgz", + "integrity": "sha1-56+crRWLjGAdg6qtXbSr0b9CuMk=", + "requires": { + "spin.js": "^2.0.1" + } + }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", @@ -8419,6 +8427,11 @@ } } }, + "spin.js": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/spin.js/-/spin.js-2.3.2.tgz", + "integrity": "sha1-bKpW1SBnNFD9XPvGlx5tB3LDeho=" + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", diff --git a/package.json b/package.json index fcabb7e1..d007cf2e 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "react-dom": "^16.3.0", "react-hot-loader": "^4.3.0", "react-redux": "^5.0.7", + "react-spin": "^0.6.2", "redux": "^4.0.0", "redux-thunk": "^2.3.0", "snapsvg": "^0.5.1", -- cgit v1.2.3-70-g09d2