Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe4af46852 | |||
| 7b9659e22f | |||
| 8be18fc27c | |||
| 7e518780c5 | |||
| 89391c1543 | |||
| 05e3118a0c | |||
| 494b5d9bdd | |||
| f8f1ad644c | |||
| 5a5051bac6 | |||
| 304c0ac8d0 | |||
| cae13ed662 | |||
| 729110f8d1 |
@@ -1,6 +1,7 @@
|
||||
import Component from '@ember/component';
|
||||
import { computed } from '@ember/object';
|
||||
import { and, notEmpty } from '@ember/object/computed';
|
||||
import { isEmpty } from '@ember/utils';
|
||||
import moment from 'moment';
|
||||
|
||||
export default Component.extend({
|
||||
@@ -25,14 +26,17 @@ export default Component.extend({
|
||||
this.set('defaultDate', moment().startOf('hour').toDate());
|
||||
|
||||
// Default attributes used by reset
|
||||
this.set('attributes', {
|
||||
contributorId: null,
|
||||
kind: null,
|
||||
date: this.defaultDate,
|
||||
amount: null,
|
||||
description: null,
|
||||
url: null,
|
||||
});
|
||||
if (isEmpty(this.attributes)) {
|
||||
this.set('attributes', {
|
||||
contributorId: null,
|
||||
kind: null,
|
||||
date: this.defaultDate,
|
||||
amount: null,
|
||||
description: null,
|
||||
url: null,
|
||||
details: null
|
||||
});
|
||||
}
|
||||
|
||||
this.reset();
|
||||
},
|
||||
@@ -67,7 +71,6 @@ export default Component.extend({
|
||||
window.alert('Something went wrong. Check the browser console for details.');
|
||||
})
|
||||
.finally(() => this.set('inProgress', false));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,6 +63,17 @@
|
||||
</p>
|
||||
</label>
|
||||
|
||||
{{#if details}}
|
||||
<label>
|
||||
<p class="label">Details:</p>
|
||||
<p>
|
||||
<pre>
|
||||
{{details}}
|
||||
</pre>
|
||||
</p>
|
||||
</label>
|
||||
{{/if}}
|
||||
|
||||
<p class="actions">
|
||||
{{input type="submit"
|
||||
disabled=inProgress
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend({
|
||||
tagName: ""
|
||||
});
|
||||
@@ -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 { inject as service } from '@ember/service';
|
||||
import { computed } from '@ember/object';
|
||||
import { isPresent } from '@ember/utils';
|
||||
|
||||
export default Component.extend({
|
||||
|
||||
@@ -8,10 +10,35 @@ export default Component.extend({
|
||||
kredits: 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: {
|
||||
|
||||
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,11 +1,18 @@
|
||||
<section id="user-account">
|
||||
{{#if (and kredits.hasAccounts kredits.currentUser)}}
|
||||
{{kredits.currentUser.name}}
|
||||
{{#if kredits.currentUserIsCore}}
|
||||
<span class="core-flag">(core)</span>
|
||||
{{/if}}
|
||||
{{#if setupInProgress}}
|
||||
Connecting account...
|
||||
{{else}}
|
||||
Anonymous
|
||||
<button {{action "signup"}} class="small green">Sign up</button>
|
||||
{{#if (and kredits.hasAccounts kredits.currentUser)}}
|
||||
{{kredits.currentUser.name}}
|
||||
{{#if kredits.currentUserIsCore}}
|
||||
<span class="core-flag">(core)</span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
Anonymous
|
||||
<button {{action "signup"}} class="small">Sign up</button>
|
||||
{{#if showConnectButton}}
|
||||
<button {{action "connectAccount"}} class="small green">Connect account</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</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()
|
||||
|
||||
});
|
||||
@@ -1,5 +1,7 @@
|
||||
import EmberObject, { computed } from '@ember/object';
|
||||
import { isEmpty } from '@ember/utils';
|
||||
import bignumber from 'kredits-web/utils/cps/bignumber';
|
||||
import moment from 'moment';
|
||||
|
||||
export default EmberObject.extend({
|
||||
|
||||
@@ -24,11 +26,15 @@ export default EmberObject.extend({
|
||||
|
||||
init () {
|
||||
this._super(...arguments);
|
||||
this.set('details', {});
|
||||
if (isEmpty(this.details)) this.set('details', {});
|
||||
},
|
||||
|
||||
iso8601Date: computed('date', 'time', function() {
|
||||
return this.time ? `${this.date}T${this.time}` : this.date;
|
||||
}),
|
||||
|
||||
jsDate: computed('iso8601Date', function() {
|
||||
return moment(this.iso8601Date).toDate();
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
@@ -21,6 +21,7 @@ Router.map(function() {
|
||||
});
|
||||
this.route('contributions', function() {
|
||||
this.route('new');
|
||||
this.route('resubmit', { path: ':id/resubmit' });
|
||||
});
|
||||
this.route('contributors', function() {
|
||||
this.route('new');
|
||||
|
||||
@@ -4,7 +4,7 @@ import Route from '@ember/routing/route';
|
||||
export default Route.extend({
|
||||
kredits: service(),
|
||||
|
||||
beforeModel(transition) {
|
||||
beforeModel(/* transition */) {
|
||||
const kredits = this.kredits;
|
||||
|
||||
return kredits.setup().then(() => {
|
||||
@@ -12,11 +12,6 @@ export default Route.extend({
|
||||
console.error('Kredits preflight check failed!');
|
||||
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) => {
|
||||
console.log('Error initializing Kredits', error);
|
||||
});
|
||||
|
||||
@@ -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
@@ -6,7 +6,7 @@ import Service from '@ember/service';
|
||||
import EmberObject from '@ember/object';
|
||||
import { computed } from '@ember/object';
|
||||
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 formatKredits from 'kredits-web/utils/format-kredits';
|
||||
@@ -30,10 +30,6 @@ export default Service.extend({
|
||||
currentUserIsCore: alias('currentUser.isCore'),
|
||||
hasAccounts: notEmpty('currentUserAccounts'),
|
||||
|
||||
accountNeedsUnlock: computed('currentUserAccounts', function() {
|
||||
return this.currentUserAccounts && isEmpty(this.currentUserAccounts);
|
||||
}),
|
||||
|
||||
contributionsUnconfirmed: computed('contributions.[]', 'currentBlock', function() {
|
||||
return this.contributions.filter(contribution => {
|
||||
return contribution.confirmedAt > this.currentBlock;
|
||||
@@ -105,7 +101,14 @@ export default Service.extend({
|
||||
async function instantiateWithAccount (web3Provider, context) {
|
||||
console.debug('[kredits] Using user-provided instance, e.g. from Mist browser or Metamask');
|
||||
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 => {
|
||||
context.set('currentUserAccounts', accounts);
|
||||
const ethSigner = accounts.length === 0 ? null : ethProvider.getSigner();
|
||||
@@ -117,12 +120,9 @@ export default Service.extend({
|
||||
}
|
||||
|
||||
if (window.ethereum) {
|
||||
try {
|
||||
// Request account access if needed
|
||||
await window.ethereum.enable();
|
||||
// Acccounts now exposed
|
||||
if (window.ethereum.isConnected()) {
|
||||
instantiateWithAccount(window.ethereum, this);
|
||||
} catch (error) {
|
||||
} else {
|
||||
instantiateWithoutAccount();
|
||||
}
|
||||
}
|
||||
@@ -225,33 +225,36 @@ export default Service.extend({
|
||||
console.debug('[kredits] add contribution response', data);
|
||||
attributes.contributor = this.contributors.findBy('id', attributes.contributorId);
|
||||
const contribution = Contribution.create(attributes);
|
||||
// TODO receive from wrapper
|
||||
contribution.set('confirmedAtBlock', data.blockNumber + 40320);
|
||||
this.contributions.pushObject(contribution);
|
||||
return contribution;
|
||||
});
|
||||
},
|
||||
|
||||
addProposal (attributes) {
|
||||
console.debug('[kredits] add proposal', attributes);
|
||||
//
|
||||
// TODO Implement proposals with voting
|
||||
//
|
||||
|
||||
return this.kredits.Proposal.addProposal(attributes)
|
||||
.then((data) => {
|
||||
console.debug('[kredits] add proposal response', data);
|
||||
attributes.contributor = this.contributors.findBy('id', attributes.contributorId);
|
||||
return Proposal.create(attributes);
|
||||
});
|
||||
},
|
||||
// addProposal (attributes) {
|
||||
// console.debug('[kredits] add proposal', attributes);
|
||||
//
|
||||
// return this.kredits.Proposal.addProposal(attributes)
|
||||
// .then((data) => {
|
||||
// console.debug('[kredits] add proposal response', data);
|
||||
// attributes.contributor = this.contributors.findBy('id', attributes.contributorId);
|
||||
// return Proposal.create(attributes);
|
||||
// });
|
||||
// },
|
||||
|
||||
getProposals () {
|
||||
return this.kredits.Proposal.all()
|
||||
.then((proposals) => {
|
||||
return proposals.map((proposal) => {
|
||||
proposal.contributor = this.contributors.findBy('id', proposal.contributorId.toString());
|
||||
return Proposal.create(proposal);
|
||||
});
|
||||
});
|
||||
},
|
||||
// getProposals () {
|
||||
// return this.kredits.Proposal.all()
|
||||
// .then(proposals => {
|
||||
// return proposals.map(proposal => {
|
||||
// proposal.contributor = this.contributors.findBy('id', proposal.contributorId.toString());
|
||||
// return Proposal.create(proposal);
|
||||
// });
|
||||
// });
|
||||
// },
|
||||
|
||||
getContributions () {
|
||||
return this.kredits.Contribution.all({page: {size: 200}})
|
||||
@@ -311,6 +314,7 @@ export default Service.extend({
|
||||
.on('ContributorAdded', this.handleContributorChange.bind(this))
|
||||
|
||||
this.kredits.Contribution
|
||||
.on('ContributionAdded', this.handleContributionAdded.bind(this))
|
||||
.on('ContributionVetoed', this.handleContributionVetoed.bind(this))
|
||||
|
||||
this.kredits.Proposal
|
||||
@@ -338,6 +342,24 @@ export default Service.extend({
|
||||
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) {
|
||||
console.debug('[kredits] ContributionVetoed event received for ', contributionId);
|
||||
const contribution = this.contributions.findBy('id', contributionId);
|
||||
|
||||
@@ -41,7 +41,7 @@ section#contribution-details {
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
a:not(.button) {
|
||||
color: $primary-color;
|
||||
text-decoration: none;
|
||||
|
||||
@@ -54,4 +54,35 @@ section#contribution-details {
|
||||
.actions {
|
||||
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 {
|
||||
|
||||
button {
|
||||
margin-left: 1.2rem;
|
||||
margin-left: 1.5rem;
|
||||
}
|
||||
|
||||
button + button {
|
||||
margin-left: 0.6rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
@@ -1,4 +1,4 @@
|
||||
<section id="contribution-details">
|
||||
<section id="contribution-details" class={{if model.vetoed "vetoed"}}>
|
||||
<header class="with-nav">
|
||||
<h2>Contribution #{{model.id}}</h2>
|
||||
<nav>
|
||||
@@ -32,12 +32,26 @@
|
||||
</a>
|
||||
</p>
|
||||
{{/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 class="actions">
|
||||
<p>
|
||||
{{#if model.ipfsHash}}
|
||||
<a href="https://ipfs.io/ipfs/{{model.ipfsHash}}"
|
||||
<a href="{{ipfsGatewayUrl}}/{{model.ipfsHash}}"
|
||||
class="button small" target="_blank" rel="noopener">
|
||||
Inspect IPFS data
|
||||
</a>
|
||||
|
||||
@@ -36,6 +36,7 @@ module.exports = function(environment) {
|
||||
},
|
||||
|
||||
web3ProviderUrl: 'https://rinkeby.infura.io/v3/d4f788b7a6584f7db2fc3c268d4d09e9',
|
||||
web3RequiredNetwork: 'rinkeby',
|
||||
|
||||
githubConnectUrl: 'https://hal8000.chat.kosmos.org/kredits/signup/connect/github',
|
||||
githubSignupUrl: 'https://hal8000.chat.kosmos.org/kredits/signup/github',
|
||||
@@ -79,13 +80,9 @@ module.exports = function(environment) {
|
||||
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) {
|
||||
ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL;
|
||||
ENV.web3RequiredNetwork = null;
|
||||
}
|
||||
if (process.env.KREDITS_DAO_ADDRESS) {
|
||||
ENV.kreditsKernelAddress = process.env.KREDITS_DAO_ADDRESS;
|
||||
|
||||
Generated
+16
-16
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-web",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -8339,9 +8339,9 @@
|
||||
}
|
||||
},
|
||||
"eslint-utils": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.0.tgz",
|
||||
"integrity": "sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ==",
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz",
|
||||
"integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eslint-visitor-keys": "^1.0.0"
|
||||
@@ -11954,9 +11954,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash._baseassign": {
|
||||
@@ -12231,9 +12231,9 @@
|
||||
}
|
||||
},
|
||||
"lodash.defaultsdeep": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.0.tgz",
|
||||
"integrity": "sha1-vsECT4WxvZbL6kBbI8FK1kQ6b4E=",
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz",
|
||||
"integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.escape": {
|
||||
@@ -12329,15 +12329,15 @@
|
||||
}
|
||||
},
|
||||
"lodash.merge": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz",
|
||||
"integrity": "sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==",
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
||||
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.mergewith": {
|
||||
"version": "4.6.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz",
|
||||
"integrity": "sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ==",
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz",
|
||||
"integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==",
|
||||
"dev": true
|
||||
},
|
||||
"lodash.noop": {
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-web",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"private": true,
|
||||
"description": "Contribution dashboard of the Kosmos project",
|
||||
"repository": "https://github.com/67P/kredits-web",
|
||||
@@ -14,8 +14,8 @@
|
||||
"lint:hbs": "ember-template-lint .",
|
||||
"lint:js": "eslint .",
|
||||
"test": "ember test",
|
||||
"start": "KREDITS_APM_DOMAIN=open.aragonpm.eth ember serve",
|
||||
"start:local": "WEB3_PROVIDER_URL=http://localhost:7545 ember s",
|
||||
"start": "ember serve",
|
||||
"start:local": "WEB3_PROVIDER_URL=http://localhost:7545 ember serve",
|
||||
"build": "ember build",
|
||||
"build-prod": "rm -rf release/* && ember build -prod --output-path release",
|
||||
"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
+63
-42
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+4
-4
@@ -8,10 +8,10 @@
|
||||
<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/kredits-web-c870e46b48f385300f37386e5ce5b3a6.css">
|
||||
<link integrity="" rel="stylesheet" href="/assets/kredits-web-bf8cdb5aeca9f819317b56a053af9a07.css">
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
<body>
|
||||
|
||||
|
||||
<script src="/assets/vendor-765025e7de61c40a38fb3d7f2c93d4aa.js" integrity="sha256-/Qtv1B7vhqswTyQR74IPIUbG3346Xqb94WqJleIR3v4= sha512-T77HNtXJ47uJ90fMPppaFIoPzyymEX1ZWVkVOkuDWCA/miwGZXeJreaMsE++XphOLB8hvHm26eORNOJECPC37g==" ></script>
|
||||
<script src="/assets/kredits-web-788265737118a90913112fa6ebe6b8f5.js" integrity="sha256-ey9RABp1iJ86aXudb96KujZGI4jaUU1Ng3W4Cx1Cqg0= sha512-MCgoD4+VRdwXCLq2rZc4AOhchBv+wZ/RCpfvfUaCtiUk5VCktp3Lrf7vy6dn++LmQUtx3yVHw/oRmRyLH7tW2A==" ></script>
|
||||
<script src="/assets/vendor-13d8e4e4e82dd7bac91d821b2e30d995.js" integrity="sha256-7W4pPHJA775yfzH5yRprMaeGsW0iuMwhw2JwjXc2+Pk= sha512-fQfK5OmWIdSpGamuq7f3/EpCbVQnGSgR1VPXwxWRCu8JFeXdrUDmK67J4lHuC5cHc8yxD9WFymXKugeH7+NNgA==" ></script>
|
||||
<script src="/assets/kredits-web-f1054baf811714b6865ab8c77c69fb4c.js" integrity="sha256-hrHVjH6k8rdA8LxWsKWsd300dN0+m/osbECl2U0ntZ8= sha512-L2xrymtmnW49TvaECYHqQ5Ql4lkEDERWveK1i66UbA3DddwdaFTjqPSLdj7kq6doX6TTlBdzfEDdsuwUjLyxeg==" ></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
@@ -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
@@ -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 |
Reference in New Issue
Block a user