Add signup completion page
This commit is contained in:
@@ -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
@@ -26,7 +26,9 @@ Router.map(function() {
|
|||||||
this.route('new');
|
this.route('new');
|
||||||
this.route('edit', { path: ':id/edit' });
|
this.route('edit', { path: ':id/edit' });
|
||||||
});
|
});
|
||||||
this.route('signup');
|
this.route('signup', function() {
|
||||||
|
this.route('eth-account');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
export default Router;
|
export default Router;
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import Route from '@ember/routing/route';
|
||||||
|
|
||||||
|
export default Route.extend({
|
||||||
|
});
|
||||||
@@ -23,6 +23,10 @@ button, input[type=submit], .button {
|
|||||||
border-color: $primary-color;
|
border-color: $primary-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[disabled] {
|
||||||
|
color: rgba(255,255,255,0.5);
|
||||||
|
}
|
||||||
|
|
||||||
&.small {
|
&.small {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
padding: 0.2rem 0.8rem;
|
padding: 0.2rem 0.8rem;
|
||||||
|
|||||||
@@ -1,12 +1,17 @@
|
|||||||
section#add-contributor,
|
section#add-contributor,
|
||||||
section#add-contribution,
|
section#add-contribution,
|
||||||
section#add-proposal {
|
section#add-proposal,
|
||||||
|
section#signup {
|
||||||
|
|
||||||
form {
|
form {
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
|
|
||||||
|
&.mg-bottom-md {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
&.actions {
|
&.actions {
|
||||||
padding-top: 1.5rem;
|
padding-top: 1.5rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
&.mg-bottom-md {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
&.actions {
|
&.actions {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 2rem;
|
padding-top: 2rem;
|
||||||
|
|||||||
@@ -6,21 +6,7 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="content text-lg">
|
<div class="content text-lg">
|
||||||
<p>
|
{{outlet}}
|
||||||
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>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -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);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user