Add signup completion page

This commit is contained in:
2019-07-21 17:03:50 +02:00
parent 4c70c0d233
commit d6d2b1a61c
10 changed files with 83 additions and 17 deletions
+13
View File
@@ -0,0 +1,13 @@
import Controller from '@ember/controller';
import { not, notEmpty } from '@ember/object/computed';
// import { computed } from '@ember/object';
export default Controller.extend({
ethAddress: null,
// TODO address validation
isValidEthAccount: notEmpty('ethAddress'),
signupButtonDisabled: not('isValidEthAccount')
});
+3 -1
View File
@@ -26,7 +26,9 @@ Router.map(function() {
this.route('new');
this.route('edit', { path: ':id/edit' });
});
this.route('signup');
this.route('signup', function() {
this.route('eth-account');
});
});
export default Router;
+4
View File
@@ -0,0 +1,4 @@
import Route from '@ember/routing/route';
export default Route.extend({
});
+4
View File
@@ -23,6 +23,10 @@ button, input[type=submit], .button {
border-color: $primary-color;
}
&[disabled] {
color: rgba(255,255,255,0.5);
}
&.small {
font-size: 0.8rem;
padding: 0.2rem 0.8rem;
+6 -1
View File
@@ -1,12 +1,17 @@
section#add-contributor,
section#add-contribution,
section#add-proposal {
section#add-proposal,
section#signup {
form {
p {
margin-bottom: 1.5rem;
&.mg-bottom-md {
margin-bottom: 2rem;
}
&.actions {
padding-top: 1.5rem;
text-align: center;
+4
View File
@@ -40,6 +40,10 @@ main {
}
p {
&.mg-bottom-md {
margin-bottom: 2rem;
}
&.actions {
text-align: center;
padding-top: 2rem;
+1 -15
View File
@@ -6,21 +6,7 @@
</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>
{{outlet}}
</div>
</section>
+22
View File
@@ -0,0 +1,22 @@
<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>
</p>
</form>
<p class="actions">
<button disabled={{signupButtonDisabled}}
{{action "completeSignup"}}>
Complete my profile
</button>
</p>
+15
View File
@@ -0,0 +1,15 @@
<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">
{{#link-to "signup.eth-account" class="button icon"}}
{{icon-account-github-com}}
Connect GitHub
{{/link-to}}
</p>
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Route | signup/eth-account', function(hooks) {
setupTest(hooks);
test('it exists', function(assert) {
let route = this.owner.lookup('route:signup/eth-account');
assert.ok(route);
});
});