X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=cmd%2Fweb%2Fjs%2Fmain.jsx;h=8014377523aba32c31ef45f50c8ac7e39630c40a;hb=2e4885d98ec49203180deb7e4e9148762e4720e7;hp=84b584895235ef7b426440d478e1f963784af344;hpb=16e43cc77935a979c48e75f1ec8ed792952a4ae8;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FFront.git diff --git a/cmd/web/js/main.jsx b/cmd/web/js/main.jsx index 84b5848..8014377 100644 --- a/cmd/web/js/main.jsx +++ b/cmd/web/js/main.jsx @@ -4,7 +4,8 @@ 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 UserAccount from './account.js'; +import AdminDashboard from './admin.js'; import App from './app.js'; import Api from './api.js'; import cookies from './cookies.js'; @@ -62,6 +63,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'); @@ -76,7 +98,13 @@ App.page('/me', true, function(context) { App.page('/account', true, function(context) { App.mount(
- + +
); +}); + +App.page('/admin', true, function(context) { + App.mount(
+
); }); @@ -84,8 +112,8 @@ 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.'}

);