Add success page to GitHub signup

This commit is contained in:
2019-08-27 18:19:46 +02:00
parent 60ba019139
commit dc5dfe19f2
11 changed files with 123 additions and 64 deletions
+3 -6
View File
@@ -28,13 +28,10 @@ export default Controller.extend({
fetch(config.githubSignupUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
}).then(response => {
return response.json();
})
.then(res => res.json())
.then(data => {
console.log('Created contributor:', data);
@@ -43,7 +40,7 @@ export default Controller.extend({
ethAddress: null
});
// TODO show success message or transition to success page
this.transitionToRoute('signup.complete');
});
}
+1
View File
@@ -29,6 +29,7 @@ Router.map(function() {
this.route('signup', function() {
this.route('github');
this.route('eth-account');
this.route('complete');
});
});
+4
View File
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';
export default Route.extend({
});
+8
View File
@@ -31,6 +31,10 @@ main {
section {
.content {
a {
font-size: inherit;
}
&.text-lg {
p {
font-size: 1.2rem;
@@ -39,6 +43,10 @@ main {
}
}
&.text-center {
text-align: center;
}
p {
&.mg-bottom-md {
margin-bottom: 2rem;
+4
View File
@@ -38,6 +38,10 @@ h1, h2, h3, h4, h5, input, button {
font-weight: 300;
}
a {
color: $primary-color;
}
section {
h2 {
font-size: 1.4rem;
+1 -9
View File
@@ -1,13 +1,5 @@
<main class="center-column">
<section id="signup">
<header>
<h2>Create your contributor profile</h2>
</header>
<div class="content text-lg">
{{outlet}}
</div>
{{outlet}}
</section>
</main>
+15
View File
@@ -0,0 +1,15 @@
<header>
<h2>Welcome aboard!</h2>
</header>
<div class="content text-lg text-center">
<p>
Congratulations. Your initial profile is now complete.
</p>
<p>
Why not say hi to your fellow contributors
<a href="https://wiki.kosmos.org/Main_Page#Community_.2F_Getting_in_touch_.2F_Getting_involved">in one of our chat rooms</a>?.
</p>
<p class="actions">
{{#link-to "dashboard" class="button small"}}Return to dashboard{{/link-to}}
</p>
</div>
+24 -21
View File
@@ -1,22 +1,25 @@
<p class="mg-bottom-md">
Kredits allow you to take part in project governance, and to earn rewards for
your contributions. For both, you will need an Ethereum wallet/account.
</p>
<form {{action "submit" on="submit"}}>
<p>
<label>
Ethereum account:<br>
{{input type="text" value=ethAddress
placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4"
class=(if isValidEthAccount "valid" "")}}
</label>
<header>
<h2>Complete your contributor profile</h2>
</header>
<div class="content text-lg">
<p class="mg-bottom-md">
Kredits allow you to take part in project governance, and to earn rewards for
your contributions. For both, you will need an Ethereum wallet/account.
</p>
</form>
<p class="actions">
<button disabled={{signupButtonDisabled}}
{{action "completeSignup"}}>
Complete my profile
</button>
</p>
<form {{action "submit" on="submit"}}>
<p>
<label>
Ethereum account:<br>
{{input type="text" value=ethAddress
placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4"
class=(if isValidEthAccount "valid" "")}}
</label>
</p>
</form>
<p class="actions">
<button disabled={{signupButtonDisabled}}
{{action "completeSignup"}}>
Complete my profile
</button>
</p>
</div>
+20 -15
View File
@@ -1,15 +1,20 @@
<p>
You have already contributed to a Kosmos project, or you are interested
in contributing in the near future? Fantastic!
</p>
<p>
In order to earn kredits for your contributions, you will need a
registered contributor profile. The quickest way to register is by
connecting one of the following accounts:
</p>
<p class="actions">
<button {{action "connectGithub"}} class="icon">
{{icon-account-github-com}}
Connect GitHub
</button>
</p>
<header>
<h2>Create your contributor profile</h2>
</header>
<div class="content text-lg">
<p>
You have already contributed to a Kosmos project, or you are interested
in contributing in the near future? Fantastic!
</p>
<p>
In order to earn kredits for your contributions, you will need a
registered contributor profile. The quickest way to register is by
connecting one of the following accounts:
</p>
<p class="actions">
<button {{action "connectGithub"}} class="icon">
{{icon-account-github-com}}
Connect GitHub
</button>
</p>
</div>