X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=cmd%2Fweb%2Fjs%2Fmain.jsx;h=dfc33378b385744c92e316c45bd87aa5aaed6716;hb=a7873be28f3bcda36dd9fc54df238738c4c2b998;hp=8a4fce81e35dba21ff6096b629e47f36c2454fb4;hpb=87b6d05e5b289f3e9d1554fe455296ba09655c3a;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FFront.git diff --git a/cmd/web/js/main.jsx b/cmd/web/js/main.jsx index 8a4fce8..dfc3337 100644 --- a/cmd/web/js/main.jsx +++ b/cmd/web/js/main.jsx @@ -4,6 +4,7 @@ import PasswordResetForm from './password_reset.js'; import ChangePasswordForm from './change_password.js'; import OtpEnrollForm from './otp.js'; import PoloniexController from './poloniex.js'; +import PoloniexConfiguration from './account.js'; import App from './app.js'; import Api from './api.js'; import cookies from './cookies.js'; @@ -61,6 +62,27 @@ App.page('/change-password', false, function(context) { ); }); +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'); @@ -73,12 +95,18 @@ App.page('/me', true, function(context) { ); }); +App.page('/account', true, function(context) { + App.mount(
+ +
); +}); + App.page('/not_confirmed', true, function(context) { App.mount(
-

Please be patient, you account is being confirmed...

-

Refresh

+

An email has now been sent to your email address.

+

{'Please click the \'Confirm your account\' button to validate your email.'}

);