diff --git a/app/controllers/signup/eth-account.js b/app/controllers/signup/eth-account.js new file mode 100644 index 0000000..489ae13 --- /dev/null +++ b/app/controllers/signup/eth-account.js @@ -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') + +}); diff --git a/app/router.js b/app/router.js index 78e9943..839c8c1 100644 --- a/app/router.js +++ b/app/router.js @@ -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; diff --git a/app/routes/signup/eth-account.js b/app/routes/signup/eth-account.js new file mode 100644 index 0000000..6c74252 --- /dev/null +++ b/app/routes/signup/eth-account.js @@ -0,0 +1,4 @@ +import Route from '@ember/routing/route'; + +export default Route.extend({ +}); diff --git a/app/styles/_buttons.scss b/app/styles/_buttons.scss index 6389aaf..eea2c90 100644 --- a/app/styles/_buttons.scss +++ b/app/styles/_buttons.scss @@ -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; diff --git a/app/styles/_forms.scss b/app/styles/_forms.scss index f9e3dd9..97a644d 100644 --- a/app/styles/_forms.scss +++ b/app/styles/_forms.scss @@ -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; diff --git a/app/styles/_layout.scss b/app/styles/_layout.scss index b405c5d..66729a6 100644 --- a/app/styles/_layout.scss +++ b/app/styles/_layout.scss @@ -40,6 +40,10 @@ main { } p { + &.mg-bottom-md { + margin-bottom: 2rem; + } + &.actions { text-align: center; padding-top: 2rem; diff --git a/app/templates/signup.hbs b/app/templates/signup.hbs index 7d690fa..f6d10f9 100644 --- a/app/templates/signup.hbs +++ b/app/templates/signup.hbs @@ -6,21 +6,7 @@
-

- You have already contributed to a Kosmos project, or you are interested - in contributing in the near future? Fantastic! -

-

- 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: -

-

- -

+ {{outlet}}
diff --git a/app/templates/signup/eth-account.hbs b/app/templates/signup/eth-account.hbs new file mode 100644 index 0000000..6e20d06 --- /dev/null +++ b/app/templates/signup/eth-account.hbs @@ -0,0 +1,22 @@ +

+ 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. +

+ +
+

+ +

+
+ +

+ +

\ No newline at end of file diff --git a/app/templates/signup/index.hbs b/app/templates/signup/index.hbs new file mode 100644 index 0000000..f57768b --- /dev/null +++ b/app/templates/signup/index.hbs @@ -0,0 +1,15 @@ +

+ You have already contributed to a Kosmos project, or you are interested + in contributing in the near future? Fantastic! +

+

+ 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: +

+

+ {{#link-to "signup.eth-account" class="button icon"}} + {{icon-account-github-com}} + Connect GitHub + {{/link-to}} +

diff --git a/tests/unit/routes/signup/eth-account-test.js b/tests/unit/routes/signup/eth-account-test.js new file mode 100644 index 0000000..4c4f714 --- /dev/null +++ b/tests/unit/routes/signup/eth-account-test.js @@ -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); + }); +});