aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/js/main.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web/js/main.jsx')
-rw-r--r--cmd/web/js/main.jsx25
1 files changed, 23 insertions, 2 deletions
diff --git a/cmd/web/js/main.jsx b/cmd/web/js/main.jsx
index 84b5848..5dc45eb 100644
--- a/cmd/web/js/main.jsx
+++ b/cmd/web/js/main.jsx
@@ -62,6 +62,27 @@ App.page('/change-password', false, function(context) {
62 </div>); 62 </div>);
63}); 63});
64 64
65App.page('/confirm', false, function(context) {
66 var token = qs.parse(context.querystring).token;
67
68 if (token === undefined) {
69 App.go('/');
70 return;
71 }
72
73 Api.Call(
74 'CONFIRM_EMAIL',
75 {'token': token},
76 function(err, status, data) {
77 if (err) {
78 console.error(err, data);
79 }
80
81 App.go('/me');
82 }
83 );
84});
85
65App.page('/signout', true, function(context) { 86App.page('/signout', true, function(context) {
66 cookies.removeItem('jwt'); 87 cookies.removeItem('jwt');
67 88
@@ -84,8 +105,8 @@ App.page('/not_confirmed', true, function(context) {
84 App.mount(<div> 105 App.mount(<div>
85 <div className="row"> 106 <div className="row">
86 <div className="box offset-3 col-6 text-center"> 107 <div className="box offset-3 col-6 text-center">
87 <p>Please be patient, you account is being confirmed...</p> 108 <p>An email has now been sent to your email address.</p>
88 <p><a href="/me"><u>Refresh</u></a></p> 109 <p>Please click the "Confirm your account" button to validate your email.</p>
89 </div> 110 </div>
90 </div> 111 </div>
91 </div>); 112 </div>);