Add success page to GitHub signup
This commit is contained in:
@@ -28,13 +28,10 @@ export default Controller.extend({
|
|||||||
|
|
||||||
fetch(config.githubSignupUrl, {
|
fetch(config.githubSignupUrl, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: { 'Content-Type': 'application/json' },
|
||||||
'Content-Type': 'application/json'
|
|
||||||
},
|
|
||||||
body: JSON.stringify(payload)
|
body: JSON.stringify(payload)
|
||||||
}).then(response => {
|
|
||||||
return response.json();
|
|
||||||
})
|
})
|
||||||
|
.then(res => res.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
console.log('Created contributor:', data);
|
console.log('Created contributor:', data);
|
||||||
|
|
||||||
@@ -43,7 +40,7 @@ export default Controller.extend({
|
|||||||
ethAddress: null
|
ethAddress: null
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO show success message or transition to success page
|
this.transitionToRoute('signup.complete');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ Router.map(function() {
|
|||||||
this.route('signup', function() {
|
this.route('signup', function() {
|
||||||
this.route('github');
|
this.route('github');
|
||||||
this.route('eth-account');
|
this.route('eth-account');
|
||||||
|
this.route('complete');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import Route from '@ember/routing/route';
|
||||||
|
|
||||||
|
export default Route.extend({
|
||||||
|
});
|
||||||
@@ -31,6 +31,10 @@ main {
|
|||||||
|
|
||||||
section {
|
section {
|
||||||
.content {
|
.content {
|
||||||
|
a {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
&.text-lg {
|
&.text-lg {
|
||||||
p {
|
p {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
@@ -39,6 +43,10 @@ main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
&.mg-bottom-md {
|
&.mg-bottom-md {
|
||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ h1, h2, h3, h4, h5, input, button {
|
|||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $primary-color;
|
||||||
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
h2 {
|
h2 {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
<main class="center-column">
|
<main class="center-column">
|
||||||
|
|
||||||
<section id="signup">
|
<section id="signup">
|
||||||
<header>
|
|
||||||
<h2>Create your contributor profile</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="content text-lg">
|
|
||||||
{{outlet}}
|
{{outlet}}
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
@@ -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>
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
<p class="mg-bottom-md">
|
<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
|
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.
|
your contributions. For both, you will need an Ethereum wallet/account.
|
||||||
</p>
|
</p>
|
||||||
|
<form {{action "submit" on="submit"}}>
|
||||||
<form {{action "submit" on="submit"}}>
|
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
Ethereum account:<br>
|
Ethereum account:<br>
|
||||||
@@ -12,11 +15,11 @@
|
|||||||
class=(if isValidEthAccount "valid" "")}}
|
class=(if isValidEthAccount "valid" "")}}
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
<p class="actions">
|
||||||
<p class="actions">
|
|
||||||
<button disabled={{signupButtonDisabled}}
|
<button disabled={{signupButtonDisabled}}
|
||||||
{{action "completeSignup"}}>
|
{{action "completeSignup"}}>
|
||||||
Complete my profile
|
Complete my profile
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
@@ -1,15 +1,20 @@
|
|||||||
<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
|
You have already contributed to a Kosmos project, or you are interested
|
||||||
in contributing in the near future? Fantastic!
|
in contributing in the near future? Fantastic!
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
In order to earn kredits for your contributions, you will need a
|
In order to earn kredits for your contributions, you will need a
|
||||||
registered contributor profile. The quickest way to register is by
|
registered contributor profile. The quickest way to register is by
|
||||||
connecting one of the following accounts:
|
connecting one of the following accounts:
|
||||||
</p>
|
</p>
|
||||||
<p class="actions">
|
<p class="actions">
|
||||||
<button {{action "connectGithub"}} class="icon">
|
<button {{action "connectGithub"}} class="icon">
|
||||||
{{icon-account-github-com}}
|
{{icon-account-github-com}}
|
||||||
Connect GitHub
|
Connect GitHub
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
|||||||
Generated
+32
-13
@@ -9429,7 +9429,8 @@
|
|||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
@@ -9450,12 +9451,14 @@
|
|||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
@@ -9470,17 +9473,20 @@
|
|||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
@@ -9597,7 +9603,8 @@
|
|||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"ini": {
|
"ini": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
@@ -9609,6 +9616,7 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
@@ -9623,6 +9631,7 @@
|
|||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
@@ -9630,12 +9639,14 @@
|
|||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.5",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.2",
|
"safe-buffer": "^5.1.2",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
@@ -9654,6 +9665,7 @@
|
|||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
@@ -9734,7 +9746,8 @@
|
|||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
@@ -9746,6 +9759,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@@ -9831,7 +9845,8 @@
|
|||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.2",
|
"version": "5.1.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
@@ -9867,6 +9882,7 @@
|
|||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
@@ -9886,6 +9902,7 @@
|
|||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
@@ -9929,12 +9946,14 @@
|
|||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
},
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"bundled": true,
|
"bundled": true,
|
||||||
"dev": true
|
"dev": true,
|
||||||
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -10864,7 +10883,7 @@
|
|||||||
"bs58": "^4.0.1",
|
"bs58": "^4.0.1",
|
||||||
"buffer": "^5.2.1",
|
"buffer": "^5.2.1",
|
||||||
"cids": "~0.5.5",
|
"cids": "~0.5.5",
|
||||||
"concat-stream": "github:hugomrdias/concat-stream#057bc7b5d6d8df26c8cf00a3f151b6721a0a8034",
|
"concat-stream": "github:hugomrdias/concat-stream#feat/smaller",
|
||||||
"debug": "^4.1.0",
|
"debug": "^4.1.0",
|
||||||
"detect-node": "^2.0.4",
|
"detect-node": "^2.0.4",
|
||||||
"end-of-stream": "^1.4.1",
|
"end-of-stream": "^1.4.1",
|
||||||
@@ -10886,7 +10905,7 @@
|
|||||||
"multibase": "~0.6.0",
|
"multibase": "~0.6.0",
|
||||||
"multicodec": "~0.5.0",
|
"multicodec": "~0.5.0",
|
||||||
"multihashes": "~0.4.14",
|
"multihashes": "~0.4.14",
|
||||||
"ndjson": "github:hugomrdias/ndjson#4db16da6b42e5b39bf300c3a7cde62abb3fa3a11",
|
"ndjson": "github:hugomrdias/ndjson#feat/readable-stream3",
|
||||||
"once": "^1.4.0",
|
"once": "^1.4.0",
|
||||||
"peer-id": "~0.12.2",
|
"peer-id": "~0.12.2",
|
||||||
"peer-info": "~0.15.1",
|
"peer-info": "~0.15.1",
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { module, test } from 'qunit';
|
||||||
|
import { setupTest } from 'ember-qunit';
|
||||||
|
|
||||||
|
module('Unit | Route | signup/complete', function(hooks) {
|
||||||
|
setupTest(hooks);
|
||||||
|
|
||||||
|
test('it exists', function(assert) {
|
||||||
|
let route = this.owner.lookup('route:signup/complete');
|
||||||
|
assert.ok(route);
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user