Compare commits

..

12 Commits

Author SHA1 Message Date
basti fe4af46852 1.10.0 2019-09-10 17:01:23 +02:00
basti 7b9659e22f Update deps
Fixes security vulns
2019-09-10 16:59:20 +02:00
basti 8be18fc27c Merge pull request #155 from 67P/feature/resubmit_vetoed_contribution
Re-submit vetoed contributions
2019-09-10 16:53:36 +02:00
basti 7e518780c5 Merge pull request #154 from 67P/feature/sign_in
Improve account connect/loading, check network
2019-09-10 16:48:55 +02:00
basti 89391c1543 Update details of pending contribution when mined
Fetches complete details of new contributions and replaces any potential
pending, incomplete objects in the collection.
2019-09-10 15:21:50 +02:00
basti 05e3118a0c Re-submit vetoed contributions 2019-09-10 11:47:07 +02:00
basti 494b5d9bdd Use configured IPFS gateway URL for button 2019-09-05 11:53:20 +02:00
basti f8f1ad644c WIP: vetoed contribution details
Adds a blurb and resubmit button to the detail view for vetoed
contributions.
2019-09-05 11:36:50 +02:00
basti 5a5051bac6 Check required network before using user provider
closes #82
2019-09-04 18:51:49 +02:00
basti 304c0ac8d0 Only use user wallet if it's already open/connected 2019-09-04 18:29:25 +02:00
basti cae13ed662 Sign in button to connect account 2019-09-04 18:22:48 +02:00
basti 729110f8d1 Remove obsolete APM domains 2019-09-04 17:04:18 +02:00
30 changed files with 455 additions and 130 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
import Component from '@ember/component'; import Component from '@ember/component';
import { computed } from '@ember/object'; import { computed } from '@ember/object';
import { and, notEmpty } from '@ember/object/computed'; import { and, notEmpty } from '@ember/object/computed';
import { isEmpty } from '@ember/utils';
import moment from 'moment'; import moment from 'moment';
export default Component.extend({ export default Component.extend({
@@ -25,6 +26,7 @@ export default Component.extend({
this.set('defaultDate', moment().startOf('hour').toDate()); this.set('defaultDate', moment().startOf('hour').toDate());
// Default attributes used by reset // Default attributes used by reset
if (isEmpty(this.attributes)) {
this.set('attributes', { this.set('attributes', {
contributorId: null, contributorId: null,
kind: null, kind: null,
@@ -32,7 +34,9 @@ export default Component.extend({
amount: null, amount: null,
description: null, description: null,
url: null, url: null,
details: null
}); });
}
this.reset(); this.reset();
}, },
@@ -67,7 +71,6 @@ export default Component.extend({
window.alert('Something went wrong. Check the browser console for details.'); window.alert('Something went wrong. Check the browser console for details.');
}) })
.finally(() => this.set('inProgress', false)); .finally(() => this.set('inProgress', false));
} }
} }
@@ -63,6 +63,17 @@
</p> </p>
</label> </label>
{{#if details}}
<label>
<p class="label">Details:</p>
<p>
<pre>
{{details}}
</pre>
</p>
</label>
{{/if}}
<p class="actions"> <p class="actions">
{{input type="submit" {{input type="submit"
disabled=inProgress disabled=inProgress
+5
View File
@@ -0,0 +1,5 @@
import Component from '@ember/component';
export default Component.extend({
tagName: ""
});
+15
View File
@@ -0,0 +1,15 @@
<svg width="60px" height="60px" version="1.1" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<g fill="none" fill-rule="evenodd">
<g transform="translate(-479,-238)" stroke="#fbe468" stroke-linecap="round" stroke-linejoin="round" stroke-width="1">
<g transform="translate(482,244)">
<a transform="translate(0,2)">
<polygon id="Triangle-58" points="0.15321 44 27 0 53.847 44"/>
</a>
<rect x="25" y="13" width="4" height="21"/>
<a transform="translate(0,2)">
<circle cx="27" cy="38" r="2"/>
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 750 B

@@ -1,5 +1,7 @@
import Component from '@ember/component'; import Component from '@ember/component';
import { inject as service } from '@ember/service'; import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
import { isPresent } from '@ember/utils';
export default Component.extend({ export default Component.extend({
@@ -8,10 +10,35 @@ export default Component.extend({
kredits: service(), kredits: service(),
router: service(), router: service(),
setupInProgress: false,
userHasEthereumWallet: computed(function() {
return isPresent(window.ethereum);
}).volatile(),
showConnectButton: computed('userHasEthereumWallet',
'kredits.hasAccounts', function() {
return this.userHasEthereumWallet &&
!this.kredits.hasAccounts;
}),
actions: { actions: {
signup() { signup() {
this.router.transitionTo('signup'); this.router.transitionTo('signup');
},
async connectAccount() {
try {
await window.ethereum.enable();
this.set('setupInProgress', true);
await this.kredits.setup();
this.set('setupInProgress', false);
this.router.transitionTo('dashboard');
} catch (error) {
this.set('setupInProgress', false);
console.log('Opening Ethereum wallet failed:', error);
}
} }
} }
@@ -1,4 +1,7 @@
<section id="user-account"> <section id="user-account">
{{#if setupInProgress}}
Connecting account...
{{else}}
{{#if (and kredits.hasAccounts kredits.currentUser)}} {{#if (and kredits.hasAccounts kredits.currentUser)}}
{{kredits.currentUser.name}} {{kredits.currentUser.name}}
{{#if kredits.currentUserIsCore}} {{#if kredits.currentUserIsCore}}
@@ -6,6 +9,10 @@
{{/if}} {{/if}}
{{else}} {{else}}
Anonymous Anonymous
<button {{action "signup"}} class="small green">Sign up</button> <button {{action "signup"}} class="small">Sign up</button>
{{#if showConnectButton}}
<button {{action "connectAccount"}} class="small green">Connect account</button>
{{/if}}
{{/if}}
{{/if}} {{/if}}
</section> </section>
@@ -0,0 +1,7 @@
import ContributionsNewController from 'kredits-web/controllers/contributions/new';
export default ContributionsNewController.extend({
attributes: null,
});
@@ -0,0 +1,12 @@
import Controller from '@ember/controller';
import { computed } from '@ember/object';
import config from 'kredits-web/config/environment';
export default Controller.extend({
ipfsGatewayUrl: computed(function() {
return config.ipfs.gatewayUrl;
}).volatile()
});
+7 -1
View File
@@ -1,5 +1,7 @@
import EmberObject, { computed } from '@ember/object'; import EmberObject, { computed } from '@ember/object';
import { isEmpty } from '@ember/utils';
import bignumber from 'kredits-web/utils/cps/bignumber'; import bignumber from 'kredits-web/utils/cps/bignumber';
import moment from 'moment';
export default EmberObject.extend({ export default EmberObject.extend({
@@ -24,11 +26,15 @@ export default EmberObject.extend({
init () { init () {
this._super(...arguments); this._super(...arguments);
this.set('details', {}); if (isEmpty(this.details)) this.set('details', {});
}, },
iso8601Date: computed('date', 'time', function() { iso8601Date: computed('date', 'time', function() {
return this.time ? `${this.date}T${this.time}` : this.date; return this.time ? `${this.date}T${this.time}` : this.date;
}),
jsDate: computed('iso8601Date', function() {
return moment(this.iso8601Date).toDate();
}) })
}); });
+1
View File
@@ -21,6 +21,7 @@ Router.map(function() {
}); });
this.route('contributions', function() { this.route('contributions', function() {
this.route('new'); this.route('new');
this.route('resubmit', { path: ':id/resubmit' });
}); });
this.route('contributors', function() { this.route('contributors', function() {
this.route('new'); this.route('new');
+1 -6
View File
@@ -4,7 +4,7 @@ import Route from '@ember/routing/route';
export default Route.extend({ export default Route.extend({
kredits: service(), kredits: service(),
beforeModel(transition) { beforeModel(/* transition */) {
const kredits = this.kredits; const kredits = this.kredits;
return kredits.setup().then(() => { return kredits.setup().then(() => {
@@ -12,11 +12,6 @@ export default Route.extend({
console.error('Kredits preflight check failed!'); console.error('Kredits preflight check failed!');
console.error(error); console.error(error);
}); });
if (kredits.get('accountNeedsUnlock')) {
if (confirm('It looks like you have an Ethereum wallet available. Please unlock your account.')) {
transition.retry();
}
}
}).catch((error) => { }).catch((error) => {
console.log('Error initializing Kredits', error); console.log('Error initializing Kredits', error);
}); });
+25
View File
@@ -0,0 +1,25 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
export default Route.extend({
kredits: service(),
model(params) {
const contribution = this.kredits.contributions.findBy('id', parseInt(params.id));
contribution.contributorId = contribution.contributorId.toString();
return contribution;
},
setupController (controller, model) {
this._super(controller, model);
controller.set('attributes', model.getProperties([
'kind', 'amount', 'description', 'url', 'details'
]));
controller.set('attributes.contributorId', model.contributorId.toString());
controller.set('attributes.date', model.jsDate);
}
});
+52 -30
View File
@@ -6,7 +6,7 @@ import Service from '@ember/service';
import EmberObject from '@ember/object'; import EmberObject from '@ember/object';
import { computed } from '@ember/object'; import { computed } from '@ember/object';
import { alias, notEmpty } from '@ember/object/computed'; import { alias, notEmpty } from '@ember/object/computed';
import { isEmpty } from '@ember/utils'; import { isEmpty, isPresent } from '@ember/utils';
import groupBy from 'kredits-web/utils/group-by'; import groupBy from 'kredits-web/utils/group-by';
import formatKredits from 'kredits-web/utils/format-kredits'; import formatKredits from 'kredits-web/utils/format-kredits';
@@ -30,10 +30,6 @@ export default Service.extend({
currentUserIsCore: alias('currentUser.isCore'), currentUserIsCore: alias('currentUser.isCore'),
hasAccounts: notEmpty('currentUserAccounts'), hasAccounts: notEmpty('currentUserAccounts'),
accountNeedsUnlock: computed('currentUserAccounts', function() {
return this.currentUserAccounts && isEmpty(this.currentUserAccounts);
}),
contributionsUnconfirmed: computed('contributions.[]', 'currentBlock', function() { contributionsUnconfirmed: computed('contributions.[]', 'currentBlock', function() {
return this.contributions.filter(contribution => { return this.contributions.filter(contribution => {
return contribution.confirmedAt > this.currentBlock; return contribution.confirmedAt > this.currentBlock;
@@ -105,7 +101,14 @@ export default Service.extend({
async function instantiateWithAccount (web3Provider, context) { async function instantiateWithAccount (web3Provider, context) {
console.debug('[kredits] Using user-provided instance, e.g. from Mist browser or Metamask'); console.debug('[kredits] Using user-provided instance, e.g. from Mist browser or Metamask');
ethProvider = new ethers.providers.Web3Provider(web3Provider); ethProvider = new ethers.providers.Web3Provider(web3Provider);
// const network = await ethProvider.getNetwork();
const network = await ethProvider.getNetwork();
if (isPresent(config.web3RequiredNetwork) &&
network.name !== config.web3RequiredNetwork) {
window.alert(`Please switch your Ethereum wallet to the "${config.web3RequiredNetwork}" network before connecting your account.`);
return instantiateWithoutAccount();
}
ethProvider.listAccounts().then(accounts => { ethProvider.listAccounts().then(accounts => {
context.set('currentUserAccounts', accounts); context.set('currentUserAccounts', accounts);
const ethSigner = accounts.length === 0 ? null : ethProvider.getSigner(); const ethSigner = accounts.length === 0 ? null : ethProvider.getSigner();
@@ -117,12 +120,9 @@ export default Service.extend({
} }
if (window.ethereum) { if (window.ethereum) {
try { if (window.ethereum.isConnected()) {
// Request account access if needed
await window.ethereum.enable();
// Acccounts now exposed
instantiateWithAccount(window.ethereum, this); instantiateWithAccount(window.ethereum, this);
} catch (error) { } else {
instantiateWithoutAccount(); instantiateWithoutAccount();
} }
} }
@@ -225,33 +225,36 @@ export default Service.extend({
console.debug('[kredits] add contribution response', data); console.debug('[kredits] add contribution response', data);
attributes.contributor = this.contributors.findBy('id', attributes.contributorId); attributes.contributor = this.contributors.findBy('id', attributes.contributorId);
const contribution = Contribution.create(attributes); const contribution = Contribution.create(attributes);
// TODO receive from wrapper
contribution.set('confirmedAtBlock', data.blockNumber + 40320); contribution.set('confirmedAtBlock', data.blockNumber + 40320);
this.contributions.pushObject(contribution); this.contributions.pushObject(contribution);
return contribution; return contribution;
}); });
}, },
addProposal (attributes) { //
console.debug('[kredits] add proposal', attributes); // TODO Implement proposals with voting
//
return this.kredits.Proposal.addProposal(attributes) // addProposal (attributes) {
.then((data) => { // console.debug('[kredits] add proposal', attributes);
console.debug('[kredits] add proposal response', data); //
attributes.contributor = this.contributors.findBy('id', attributes.contributorId); // return this.kredits.Proposal.addProposal(attributes)
return Proposal.create(attributes); // .then((data) => {
}); // console.debug('[kredits] add proposal response', data);
}, // attributes.contributor = this.contributors.findBy('id', attributes.contributorId);
// return Proposal.create(attributes);
// });
// },
getProposals () { // getProposals () {
return this.kredits.Proposal.all() // return this.kredits.Proposal.all()
.then((proposals) => { // .then(proposals => {
return proposals.map((proposal) => { // return proposals.map(proposal => {
proposal.contributor = this.contributors.findBy('id', proposal.contributorId.toString()); // proposal.contributor = this.contributors.findBy('id', proposal.contributorId.toString());
return Proposal.create(proposal); // return Proposal.create(proposal);
}); // });
}); // });
}, // },
getContributions () { getContributions () {
return this.kredits.Contribution.all({page: {size: 200}}) return this.kredits.Contribution.all({page: {size: 200}})
@@ -311,6 +314,7 @@ export default Service.extend({
.on('ContributorAdded', this.handleContributorChange.bind(this)) .on('ContributorAdded', this.handleContributorChange.bind(this))
this.kredits.Contribution this.kredits.Contribution
.on('ContributionAdded', this.handleContributionAdded.bind(this))
.on('ContributionVetoed', this.handleContributionVetoed.bind(this)) .on('ContributionVetoed', this.handleContributionVetoed.bind(this))
this.kredits.Proposal this.kredits.Proposal
@@ -338,6 +342,24 @@ export default Service.extend({
this.contributors.pushObject(newContributor); this.contributors.pushObject(newContributor);
}, },
async handleContributionAdded (id, contributorId, amount) {
console.debug('[kredits] ContributionAdded event received', { id, contributorId, amount });
const pendingContribution = this.contributions.find(c => {
return (c.id === null) &&
(c.contributorId.toString() === contributorId.toString()) &&
(c.amount.toString() === amount.toString());
});
if (pendingContribution) {
const attributes = await this.kredits.Contribution.getById(id);
attributes.contributor = this.contributors.findBy('id', attributes.contributorId.toString());
const newContribution = Contribution.create(attributes);
this.contributions.addObject(newContribution);
this.contributions.removeObject(pendingContribution);
}
},
handleContributionVetoed (contributionId) { handleContributionVetoed (contributionId) {
console.debug('[kredits] ContributionVetoed event received for ', contributionId); console.debug('[kredits] ContributionVetoed event received for ', contributionId);
const contribution = this.contributions.findBy('id', contributionId); const contribution = this.contributions.findBy('id', contributionId);
@@ -41,7 +41,7 @@ section#contribution-details {
} }
} }
a { a:not(.button) {
color: $primary-color; color: $primary-color;
text-decoration: none; text-decoration: none;
@@ -54,4 +54,35 @@ section#contribution-details {
.actions { .actions {
text-align: center; text-align: center;
} }
&.vetoed {
.content {
h3 {
text-decoration: line-through;
}
}
}
.hint.vetoed {
overflow: auto;
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid rgba(255,255,255,0.2);
font-size: 1.2rem;
.icon {
display: inline-block;
width: 40px;
height: 40px;
float: left;
margin-right: 1rem;
margin-bottom: 1rem;
svg {
width: 100%;
height: auto;
}
}
}
} }
@@ -1,7 +1,11 @@
header#topbar section#user-account { header#topbar section#user-account {
button { button {
margin-left: 1.2rem; margin-left: 1.5rem;
}
button + button {
margin-left: 0.6rem;
} }
} }
+13
View File
@@ -0,0 +1,13 @@
<main class="center-column">
<section id="add-contribution">
<header>
<h2>Re-submit contribution #{{model.id}}</h2>
</header>
<div class="content">
{{add-contribution attributes=attributes contributors=sortedContributors save=(action "save")}}
</div>
</section>
</main>
+16 -2
View File
@@ -1,4 +1,4 @@
<section id="contribution-details"> <section id="contribution-details" class={{if model.vetoed "vetoed"}}>
<header class="with-nav"> <header class="with-nav">
<h2>Contribution #{{model.id}}</h2> <h2>Contribution #{{model.id}}</h2>
<nav> <nav>
@@ -32,12 +32,26 @@
</a> </a>
</p> </p>
{{/if}} {{/if}}
{{#if model.vetoed}}
<div class="hint vetoed">
<div class="icon">
{{icon-warning}}
</div>
<p>
This contribution has been vetoed, meaning no
kredits will be issued.
</p>
<p>
{{link-to "Re-submit contribution …" "contributions.resubmit" model class="button small green"}}.
</p>
</div>
{{/if}}
</div> </div>
<div class="actions"> <div class="actions">
<p> <p>
{{#if model.ipfsHash}} {{#if model.ipfsHash}}
<a href="https://ipfs.io/ipfs/{{model.ipfsHash}}" <a href="{{ipfsGatewayUrl}}/{{model.ipfsHash}}"
class="button small" target="_blank" rel="noopener"> class="button small" target="_blank" rel="noopener">
Inspect IPFS data Inspect IPFS data
</a> </a>
+2 -5
View File
@@ -36,6 +36,7 @@ module.exports = function(environment) {
}, },
web3ProviderUrl: 'https://rinkeby.infura.io/v3/d4f788b7a6584f7db2fc3c268d4d09e9', web3ProviderUrl: 'https://rinkeby.infura.io/v3/d4f788b7a6584f7db2fc3c268d4d09e9',
web3RequiredNetwork: 'rinkeby',
githubConnectUrl: 'https://hal8000.chat.kosmos.org/kredits/signup/connect/github', githubConnectUrl: 'https://hal8000.chat.kosmos.org/kredits/signup/connect/github',
githubSignupUrl: 'https://hal8000.chat.kosmos.org/kredits/signup/github', githubSignupUrl: 'https://hal8000.chat.kosmos.org/kredits/signup/github',
@@ -79,13 +80,9 @@ module.exports = function(environment) {
ENV.APP.autoboot = false; ENV.APP.autoboot = false;
} }
if (environment === 'production') {
// here you can enable a production-specific feature
ENV.kreditsApmDomain = process.env.KREDITS_APM_DOMAIN || 'open.aragonpm.eth';
}
if (process.env.WEB3_PROVIDER_URL) { if (process.env.WEB3_PROVIDER_URL) {
ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL; ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL;
ENV.web3RequiredNetwork = null;
} }
if (process.env.KREDITS_DAO_ADDRESS) { if (process.env.KREDITS_DAO_ADDRESS) {
ENV.kreditsKernelAddress = process.env.KREDITS_DAO_ADDRESS; ENV.kreditsKernelAddress = process.env.KREDITS_DAO_ADDRESS;
+16 -16
View File
@@ -1,6 +1,6 @@
{ {
"name": "kredits-web", "name": "kredits-web",
"version": "1.9.0", "version": "1.10.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@@ -8339,9 +8339,9 @@
} }
}, },
"eslint-utils": { "eslint-utils": {
"version": "1.4.0", "version": "1.4.2",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.0.tgz", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz",
"integrity": "sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ==", "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"eslint-visitor-keys": "^1.0.0" "eslint-visitor-keys": "^1.0.0"
@@ -11954,9 +11954,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.11", "version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
"dev": true "dev": true
}, },
"lodash._baseassign": { "lodash._baseassign": {
@@ -12231,9 +12231,9 @@
} }
}, },
"lodash.defaultsdeep": { "lodash.defaultsdeep": {
"version": "4.6.0", "version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz", "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz",
"integrity": "sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E=", "integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==",
"dev": true "dev": true
}, },
"lodash.escape": { "lodash.escape": {
@@ -12329,15 +12329,15 @@
} }
}, },
"lodash.merge": { "lodash.merge": {
"version": "4.6.1", "version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"dev": true "dev": true
}, },
"lodash.mergewith": { "lodash.mergewith": {
"version": "4.6.1", "version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz",
"integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==", "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==",
"dev": true "dev": true
}, },
"lodash.noop": { "lodash.noop": {
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "kredits-web", "name": "kredits-web",
"version": "1.9.0", "version": "1.10.0",
"private": true, "private": true,
"description": "Contribution dashboard of the Kosmos project", "description": "Contribution dashboard of the Kosmos project",
"repository": "https://github.com/67P/kredits-web", "repository": "https://github.com/67P/kredits-web",
@@ -14,8 +14,8 @@
"lint:hbs": "ember-template-lint .", "lint:hbs": "ember-template-lint .",
"lint:js": "eslint .", "lint:js": "eslint .",
"test": "ember test", "test": "ember test",
"start": "KREDITS_APM_DOMAIN=open.aragonpm.eth ember serve", "start": "ember serve",
"start:local": "WEB3_PROVIDER_URL=http://localhost:7545 ember s", "start:local": "WEB3_PROVIDER_URL=http://localhost:7545 ember serve",
"build": "ember build", "build": "ember build",
"build-prod": "rm -rf release/* && ember build -prod --output-path release", "build-prod": "rm -rf release/* && ember build -prod --output-path release",
"preversion": "npm test", "preversion": "npm test",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4 -4
View File
@@ -8,10 +8,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="kredits-web/config/environment" content="%7B%22modulePrefix%22%3A%22kredits-web%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%2C%22_JQUERY_INTEGRATION%22%3Atrue%7D%2C%22APP%22%3A%7B%22name%22%3A%22kredits-web%22%2C%22version%22%3A%221.9.0%2B9bf2ae2d%22%7D%2C%22browserify%22%3A%7B%22tests%22%3Atrue%2C%22transform%22%3A%5B%5B%22babelify%22%2C%7B%22presets%22%3A%5B%22es2015%22%5D%2C%22global%22%3Atrue%7D%5D%5D%7D%2C%22web3ProviderUrl%22%3A%22https%3A%2F%2Frinkeby.infura.io%2Fv3%2Fd4f788b7a6584f7db2fc3c268d4d09e9%22%2C%22githubConnectUrl%22%3A%22https%3A%2F%2Fhal8000.chat.kosmos.org%2Fkredits%2Fsignup%2Fconnect%2Fgithub%22%2C%22githubSignupUrl%22%3A%22https%3A%2F%2Fhal8000.chat.kosmos.org%2Fkredits%2Fsignup%2Fgithub%22%2C%22ipfs%22%3A%7B%22host%22%3A%22ipfs.kosmos.org%22%2C%22port%22%3A%225444%22%2C%22protocol%22%3A%22https%22%2C%22gatewayUrl%22%3A%22https%3A%2F%2Fipfs.kosmos.org%2Fipfs%22%7D%2C%22kreditsApmDomain%22%3A%22open.aragonpm.eth%22%2C%22exportApplicationGlobal%22%3Afalse%7D" /> <meta name="kredits-web/config/environment" content="%7B%22modulePrefix%22%3A%22kredits-web%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%2C%22_JQUERY_INTEGRATION%22%3Atrue%7D%2C%22APP%22%3A%7B%22name%22%3A%22kredits-web%22%2C%22version%22%3A%221.10.0%2B7b9659e2%22%7D%2C%22browserify%22%3A%7B%22tests%22%3Atrue%2C%22transform%22%3A%5B%5B%22babelify%22%2C%7B%22presets%22%3A%5B%22es2015%22%5D%2C%22global%22%3Atrue%7D%5D%5D%7D%2C%22web3ProviderUrl%22%3A%22https%3A%2F%2Frinkeby.infura.io%2Fv3%2Fd4f788b7a6584f7db2fc3c268d4d09e9%22%2C%22web3RequiredNetwork%22%3A%22rinkeby%22%2C%22githubConnectUrl%22%3A%22https%3A%2F%2Fhal8000.chat.kosmos.org%2Fkredits%2Fsignup%2Fconnect%2Fgithub%22%2C%22githubSignupUrl%22%3A%22https%3A%2F%2Fhal8000.chat.kosmos.org%2Fkredits%2Fsignup%2Fgithub%22%2C%22ipfs%22%3A%7B%22host%22%3A%22ipfs.kosmos.org%22%2C%22port%22%3A%225444%22%2C%22protocol%22%3A%22https%22%2C%22gatewayUrl%22%3A%22https%3A%2F%2Fipfs.kosmos.org%2Fipfs%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
<link integrity="" rel="stylesheet" href="/assets/vendor-179cf27a97ea5bbb0ce72403a401cc8c.css"> <link integrity="" rel="stylesheet" href="/assets/vendor-179cf27a97ea5bbb0ce72403a401cc8c.css">
<link integrity="" rel="stylesheet" href="/assets/kredits-web-c870e46b48f385300f37386e5ce5b3a6.css"> <link integrity="" rel="stylesheet" href="/assets/kredits-web-bf8cdb5aeca9f819317b56a053af9a07.css">
@@ -24,8 +24,8 @@
<body> <body>
<script src="/assets/vendor-765025e7de61c40a38fb3d7f2c93d4aa.js" integrity="sha256-/Qtv1B7vhqswTyQR74IPIUbG3346Xqb94WqJleIR3v4= sha512-T77HNtXJ47uJ90fMPppaFIoPzyymEX1ZWVkVOkuDWCA/miwGZXeJreaMsE++XphOLB8hvHm26eORNOJECPC37g==" ></script> <script src="/assets/vendor-13d8e4e4e82dd7bac91d821b2e30d995.js" integrity="sha256-7W4pPHJA775yfzH5yRprMaeGsW0iuMwhw2JwjXc2+Pk= sha512-fQfK5OmWIdSpGamuq7f3/EpCbVQnGSgR1VPXwxWRCu8JFeXdrUDmK67J4lHuC5cHc8yxD9WFymXKugeH7+NNgA==" ></script>
<script src="/assets/kredits-web-788265737118a90913112fa6ebe6b8f5.js" integrity="sha256-ey9RABp1iJ86aXudb96KujZGI4jaUU1Ng3W4Cx1Cqg0= sha512-MCgoD4+VRdwXCLq2rZc4AOhchBv+wZ/RCpfvfUaCtiUk5VCktp3Lrf7vy6dn++LmQUtx3yVHw/oRmRyLH7tW2A==" ></script> <script src="/assets/kredits-web-f1054baf811714b6865ab8c77c69fb4c.js" integrity="sha256-hrHVjH6k8rdA8LxWsKWsd300dN0+m/osbECl2U0ntZ8= sha512-L2xrymtmnW49TvaECYHqQ5Ql4lkEDERWveK1i66UbA3DddwdaFTjqPSLdj7kq6doX6TTlBdzfEDdsuwUjLyxeg==" ></script>
</body> </body>
+27
View File
@@ -0,0 +1,27 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Contribution from 'kredits-web/models/contribution';
module('Unit | Model | contribution', function(hooks) {
setupTest(hooks);
test('iso8601Date', function(assert) {
const model = Contribution.create({
date: '2019-09-10'
});
assert.equal(model.iso8601Date, '2019-09-10');
model.set('time', '09:33:00.141Z');
assert.equal(model.iso8601Date, '2019-09-10T09:33:00.141Z');
});
test('jsDate', function(assert) {
const model = Contribution.create({
date: '2019-09-10',
time: '09:33:00.141Z'
});
assert.ok(model.jsDate instanceof Date);
assert.equal(model.jsDate.toISOString(), '2019-09-10T09:33:00.141Z');
});
});
@@ -0,0 +1,11 @@
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Route | contributions/resubmit', function(hooks) {
setupTest(hooks);
test('it exists', function(assert) {
let route = this.owner.lookup('route:contributions/resubmit');
assert.ok(route);
});
});
+71
View File
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
id="svg15"
version="1.1"
viewBox="0 0 60 60"
height="60px"
width="60px">
<metadata
id="metadata19">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title>Warning</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<!-- Generator: Sketch 3.2.2 (9983) - http://www.bohemiancoding.com/sketch -->
<title
id="title2">Warning</title>
<desc
id="desc4">Created with Sketch.</desc>
<defs
id="defs6" />
<g
style="fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
sketch:type="MSPage"
id="stroked">
<g
style="stroke:#535353;stroke-width:2;stroke-linecap:round;stroke-linejoin:round"
transform="translate(-479,-238)"
sketch:type="MSLayerGroup"
id="Transport">
<g
sketch:type="MSShapeGroup"
transform="translate(482,244)"
id="Warning">
<a
transform="translate(0,2)"
id="a4529">
<polygon
id="Triangle-58"
points="0.15321248,44 27,0 53.846787,44 " />
</a>
<rect
height="21"
width="4"
y="13"
x="25"
id="Rectangle-1700" />
<a
transform="translate(0,2)"
id="a4532">
<circle
id="Oval-1484"
cx="27"
cy="38"
r="2" />
</a>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB