]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git/blobdiff - cmd/web/js/main.jsx
Mails.
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Front.git] / cmd / web / js / main.jsx
index 84b584895235ef7b426440d478e1f963784af344..5dc45eb9a74c79a3d2b4f545b915ace1b7ffbb66 100644 (file)
@@ -62,6 +62,27 @@ App.page('/change-password', false, function(context) {
     </div>);
 });
 
+App.page('/confirm', false, function(context) {
+  var token = qs.parse(context.querystring).token;
+
+  if (token === undefined) {
+    App.go('/');
+    return;
+  }
+
+  Api.Call(
+    'CONFIRM_EMAIL',
+    {'token': token},
+    function(err, status, data) {
+      if (err) {
+        console.error(err, data);
+      }
+
+      App.go('/me');
+    }
+  );
+});
+
 App.page('/signout', true, function(context) {
   cookies.removeItem('jwt');
 
@@ -84,8 +105,8 @@ App.page('/not_confirmed', true, function(context) {
   App.mount(<div>
       <div className="row">
         <div className="box offset-3 col-6 text-center">
-          <p>Please be patient, you account is being confirmed...</p>
-          <p><a href="/me"><u>Refresh</u></a></p>
+          <p>An email has now been sent to your email address.</p>
+          <p>Please click the "Confirm your account" button to validate your email.</p>
         </div>
       </div>
     </div>);