Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa98b35796 | |||
| b2bbbfd010 | |||
| edd7ffd3c5 | |||
| abb7d95804 | |||
| 0e0b1afe3a | |||
| 29a6d79d38 | |||
| 07c579850e | |||
| 091ebf4b6a |
@@ -1,9 +1,53 @@
|
||||
import Component from '@ember/component';
|
||||
import { computed } from '@ember/object';
|
||||
import { sort } from '@ember/object/computed';
|
||||
import { isPresent } from '@ember/utils';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default Component.extend({
|
||||
|
||||
tagName: 'ul',
|
||||
classNames: ['contribution-list'],
|
||||
tagName: 'div',
|
||||
classNames: ['contributions'],
|
||||
|
||||
showQuickFilter: false,
|
||||
hideSmallContributions: false,
|
||||
contributorId: null,
|
||||
contributionKind: null,
|
||||
|
||||
kredits: service(),
|
||||
|
||||
contributorsSorting: Object.freeze(['name:asc']),
|
||||
contributors: sort('kredits.contributors', 'contributorsSorting'),
|
||||
|
||||
contributorsActive: computed('contributors.[]', 'contributions', function() {
|
||||
let activeIds = this.contributions.mapBy('contributorId')
|
||||
.map(id => id.toString())
|
||||
.uniq();
|
||||
return this.contributors.filter(c => {
|
||||
return activeIds.includes(c.id.toString());
|
||||
});
|
||||
}),
|
||||
|
||||
contributionKinds: computed('contributions.[]', function() {
|
||||
return this.contributions.mapBy('kind').uniq();
|
||||
}),
|
||||
|
||||
contributionsFiltered: computed('contributions.[]', 'hideSmallContributions', 'contributorId', 'contributionKind', function() {
|
||||
return this.contributions.filter(c => {
|
||||
let included = true;
|
||||
|
||||
if (this.hideSmallContributions &&
|
||||
c.amount <= 500) { included = false; }
|
||||
|
||||
if (isPresent(this.contributorId) &&
|
||||
c.contributorId.toString() !== this.contributorId.toString()) { included = false; }
|
||||
|
||||
if (isPresent(this.contributionKind) &&
|
||||
c.kind !== this.contributionKind) { included = false; }
|
||||
|
||||
return included;
|
||||
});
|
||||
}),
|
||||
|
||||
actions: {
|
||||
|
||||
|
||||
@@ -1,25 +1,58 @@
|
||||
{{#each contributions as |contribution|}}
|
||||
<li data-contribution-id={{contribution.id}} class="{{contribution-status contribution}} {{if contribution.vetoed "vetoed"}}">
|
||||
<p class="meta">
|
||||
<span class="recipient">{{user-avatar contributor=contribution.contributor}}</span>
|
||||
<span class="category {{contribution.kind}}">({{contribution.kind}})</span>
|
||||
<span class="title">
|
||||
{{#if contribution.url}}
|
||||
<a href={{contribution.url}} target="_blank" rel="noopener">{{contribution.description}}</a>
|
||||
{{else}}
|
||||
{{contribution.description}}
|
||||
{{/if}}
|
||||
</span>
|
||||
{{#if showQuickFilter}}
|
||||
<div class="quick-filter">
|
||||
<p>
|
||||
<label class="filter-contributor">
|
||||
Contributor:
|
||||
<select onchange={{action (mut contributorId) value="target.value"}}>
|
||||
<option value="" selected>all</option>
|
||||
{{#each contributorsActive as |contributor|}}
|
||||
<option value={{contributor.id}} selected={{eq contributorId contributor.id}}>{{contributor.name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label class="filter-contribution-kind">
|
||||
Kind:
|
||||
<select onchange={{action (mut contributionKind) value="target.value"}}>
|
||||
<option value="" selected>all</option>
|
||||
{{#each contributionKinds as |kind|}}
|
||||
<option value={{kind}} selected={{eq contributionKind kind}}>{{capitalize-string kind}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label class="filter-contribution-size">
|
||||
{{input type="checkbox" checked=hideSmallContributions}}
|
||||
Hide small contributions
|
||||
</label>
|
||||
</p>
|
||||
<p class="kredits-amount">
|
||||
<span class="amount">{{contribution.amount}}</span><span class="symbol">₭S</span>
|
||||
</p>
|
||||
{{#unless contribution.vetoed}}
|
||||
{{#unless (is-confirmed-contribution contribution)}}
|
||||
<p class="voting">
|
||||
<button {{action "veto" contribution.id}} class="small danger">veto</button>
|
||||
</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<ul class="contribution-list">
|
||||
{{#each contributionsFiltered as |contribution|}}
|
||||
<li data-contribution-id={{contribution.id}} class="{{contribution-status contribution}} {{if contribution.vetoed "vetoed"}}">
|
||||
<p class="meta">
|
||||
<span class="recipient">{{user-avatar contributor=contribution.contributor}}</span>
|
||||
<span class="category {{contribution.kind}}">({{contribution.kind}})</span>
|
||||
<span class="title">
|
||||
{{#if contribution.url}}
|
||||
<a href={{contribution.url}} target="_blank" rel="noopener">{{contribution.description}}</a>
|
||||
{{else}}
|
||||
{{contribution.description}}
|
||||
{{/if}}
|
||||
</span>
|
||||
</p>
|
||||
<p class="kredits-amount">
|
||||
<span class="amount">{{contribution.amount}}</span><span class="symbol">₭S</span>
|
||||
</p>
|
||||
{{#unless contribution.vetoed}}
|
||||
{{#unless (is-confirmed-contribution contribution)}}
|
||||
<p class="voting">
|
||||
<button {{action "veto" contribution.id}} class="small danger">veto</button>
|
||||
</p>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
@@ -25,6 +25,9 @@ export default Controller.extend({
|
||||
showUnconfirmedKredits: true,
|
||||
hideUnconfirmedKredits: not('showUnconfirmedKredits'),
|
||||
|
||||
showQuickFilterUnconfirmed: false,
|
||||
showQuickFilterConfirmed: false,
|
||||
|
||||
actions: {
|
||||
|
||||
vetoContribution (contributionId) {
|
||||
@@ -37,6 +40,14 @@ export default Controller.extend({
|
||||
this.kredits.vote(proposalId).then(transaction => {
|
||||
console.debug('[controllers:index] Vote submitted to Ethereum blockhain: '+transaction.hash);
|
||||
});
|
||||
},
|
||||
|
||||
toggleQuickFilterUnconfirmed () {
|
||||
this.toggleProperty('showQuickFilterUnconfirmed');
|
||||
},
|
||||
|
||||
toggleQuickFilterConfirmed () {
|
||||
this.toggleProperty('showQuickFilterConfirmed');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import Helper from '@ember/component/helper';
|
||||
|
||||
export default Helper.extend({
|
||||
compute([string]) {
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
});
|
||||
@@ -11,10 +11,18 @@ button, input[type=submit], .button {
|
||||
cursor: pointer;
|
||||
letter-spacing: 0.1em;
|
||||
|
||||
&+button, &+input[type=submit], &+.button {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(22, 21, 40, 0.8);
|
||||
}
|
||||
|
||||
&:active, &.active {
|
||||
border-color: $primary-color;
|
||||
}
|
||||
|
||||
&.small {
|
||||
font-size: 0.8rem;
|
||||
padding: 0.2rem 0.8rem;
|
||||
@@ -28,6 +36,9 @@ button, input[type=submit], .button {
|
||||
&:hover {
|
||||
background-color: rgba(40, 21, 21, 0.8);
|
||||
}
|
||||
&:active, &.active {
|
||||
border-color: $red;
|
||||
}
|
||||
}
|
||||
|
||||
&.green {
|
||||
@@ -38,5 +49,8 @@ button, input[type=submit], .button {
|
||||
&:hover {
|
||||
background-color: rgba(21, 40, 21, 0.8);
|
||||
}
|
||||
&:active, &.active {
|
||||
border-color: $green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,24 @@ main section {
|
||||
}
|
||||
}
|
||||
|
||||
.quick-filter {
|
||||
font-size: 1.2rem;
|
||||
margin-bottom: 2rem;
|
||||
|
||||
p {
|
||||
font-size: inherit;
|
||||
padding: 0.2rem 0 0;
|
||||
}
|
||||
|
||||
label {
|
||||
font-size: inherit;
|
||||
|
||||
&+ label {
|
||||
margin-left: 3.6rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.contribution-list {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
<h2>Latest Contributions</h2>
|
||||
{{#if kredits.hasAccounts}}
|
||||
<nav>
|
||||
<button {{action "toggleQuickFilterUnconfirmed"}} class="small {{if showQuickFilterUnconfirmed "active"}}">filter</button>
|
||||
{{link-to "add" "contributions.new" title="Submit a contribution" class="button small green"}}
|
||||
</nav>
|
||||
{{/if}}
|
||||
@@ -50,18 +51,23 @@
|
||||
{{!-- TODO: We need a better naming for kredits.hasAccounts --}}
|
||||
{{contribution-list contributions=contributionsUnconfirmedSorted
|
||||
vetoContribution=(action "vetoContribution")
|
||||
contractInteractionEnabled=kredits.hasAccounts}}
|
||||
contractInteractionEnabled=kredits.hasAccounts
|
||||
showQuickFilter=showQuickFilterUnconfirmed}}
|
||||
</div>
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
<section id="contributions-confirmed">
|
||||
<header>
|
||||
<header class="with-nav">
|
||||
<h2>Confirmed Contributions</h2>
|
||||
<nav>
|
||||
<button {{action "toggleQuickFilterConfirmed"}} class="small {{if showQuickFilterConfirmed "active"}}">filter</button>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="content">
|
||||
{{contribution-list contributions=contributionsConfirmedSorted
|
||||
vetoContribution=(action "vetoContribution")}}
|
||||
vetoContribution=(action "vetoContribution")
|
||||
showQuickFilter=showQuickFilterConfirmed}}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,8 @@ module.exports = function(environment) {
|
||||
ipfs: {
|
||||
host: 'ipfs.kosmos.org',
|
||||
port: '5444',
|
||||
protocol: 'https'
|
||||
protocol: 'https',
|
||||
gatewayUrl: 'https://ipfs.kosmos.org/ipfs'
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Generated
+182
-69
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-web",
|
||||
"version": "1.2.0",
|
||||
"version": "1.4.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -2682,9 +2682,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
@@ -9854,6 +9854,12 @@
|
||||
"heimdalljs": "^0.2.6"
|
||||
}
|
||||
},
|
||||
"hi-base32": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/hi-base32/-/hi-base32-0.5.0.tgz",
|
||||
"integrity": "sha512-DDRmxSyoYuvjUb9EnXdoiMChBZ7ZcUVJsK5Frd3kqMhuBxvmZdnBeynAVfj7/ECbn++CekcoprvC/rprHPAtow==",
|
||||
"dev": true
|
||||
},
|
||||
"hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
@@ -10212,19 +10218,33 @@
|
||||
"dev": true
|
||||
},
|
||||
"ipfs-block": {
|
||||
"version": "0.8.0",
|
||||
"resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.8.0.tgz",
|
||||
"integrity": "sha512-znNtFRxXlJYP1/Q4u0tGFJUceH9pNww8WA+zair6T3y7d28m+vtUDJGn96M7ZlFFSkByQyQsAiq2ssNhKtMzxw==",
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/ipfs-block/-/ipfs-block-0.8.1.tgz",
|
||||
"integrity": "sha512-0FaCpmij+jZBoUYhjoB5ptjdl9QzvrdRIoBmUU5JiBnK2GA+4YM/ifklaB8ePRhA/rRzhd+KYBjvMFMAL4NrVQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cids": "~0.5.5",
|
||||
"cids": "~0.7.0",
|
||||
"class-is": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"cids": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/cids/-/cids-0.7.1.tgz",
|
||||
"integrity": "sha512-qEM4j2GKE/BiT6WdUi6cfW8dairhSLTUE8tIdxJG6SvY33Mp/UPjw+xcO0n1zsllgo72BupzKF/44v+Bg8YPPg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"class-is": "^1.1.0",
|
||||
"multibase": "~0.6.0",
|
||||
"multicodec": "~0.5.1",
|
||||
"multihashes": "~0.4.14"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ipfs-http-client": {
|
||||
"version": "30.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.3.tgz",
|
||||
"integrity": "sha512-NQ7WTLKUZeoKaKXrTSLAtjASRYCR0bPdsolZf16Y7Gt7o3RfiPpFF+AqvP0xbekOV3/zhFj2Qyf6ShEV4CCtsQ==",
|
||||
"version": "30.1.4",
|
||||
"resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.4.tgz",
|
||||
"integrity": "sha512-ordvoPT3lAFL5qsvdYBeDGRP03gtbL6Jl+qJ9dztyhE7NJf2yhtnU3ZNqN1JMCcUK0qpGsDzX89t8dKQvI80Pw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"async": "^2.6.1",
|
||||
@@ -10262,7 +10282,7 @@
|
||||
"promisify-es6": "^1.0.3",
|
||||
"pull-defer": "~0.2.3",
|
||||
"pull-stream": "^3.6.9",
|
||||
"pull-to-stream": "~0.1.0",
|
||||
"pull-to-stream": "~0.1.1",
|
||||
"pump": "^3.0.0",
|
||||
"qs": "^6.5.2",
|
||||
"readable-stream": "^3.1.1",
|
||||
@@ -10309,15 +10329,15 @@
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
@@ -10519,17 +10539,31 @@
|
||||
}
|
||||
},
|
||||
"is-ipfs": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.6.0.tgz",
|
||||
"integrity": "sha512-q/CO69rN+vbw9eGXGQOAa15zXq+pSyhdKvE7mqvuplDu67LyT3H9t3RyYQvKpueN7dL4f6fbyjEMPp9J3rJ4qA==",
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.6.1.tgz",
|
||||
"integrity": "sha512-WhqQylam6pODS2RyqT/u0PR5KWtBZNCgPjgargFOVQjzw/3+6d0midXenzU65klM4LH13IUiCC6ObhDUdXZ7Nw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bs58": "^4.0.1",
|
||||
"cids": "~0.5.6",
|
||||
"mafmt": "^v6.0.7",
|
||||
"cids": "~0.7.0",
|
||||
"mafmt": "^6.0.7",
|
||||
"multiaddr": "^6.0.4",
|
||||
"multibase": "~0.6.0",
|
||||
"multihashes": "~0.4.13"
|
||||
},
|
||||
"dependencies": {
|
||||
"cids": {
|
||||
"version": "0.7.1",
|
||||
"resolved": "https://registry.npmjs.org/cids/-/cids-0.7.1.tgz",
|
||||
"integrity": "sha512-qEM4j2GKE/BiT6WdUi6cfW8dairhSLTUE8tIdxJG6SvY33Mp/UPjw+xcO0n1zsllgo72BupzKF/44v+Bg8YPPg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"class-is": "^1.1.0",
|
||||
"multibase": "~0.6.0",
|
||||
"multicodec": "~0.5.1",
|
||||
"multihashes": "~0.4.14"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"is-number": {
|
||||
@@ -10699,9 +10733,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
@@ -10962,15 +10996,79 @@
|
||||
}
|
||||
},
|
||||
"kredits-contracts": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/kredits-contracts/-/kredits-contracts-5.3.0.tgz",
|
||||
"integrity": "sha512-Wz4zuA6yo0Q4WbVEO61fvFin+6VTNjkBqHPhHCqq6dIoGdFSjUZ3BCKan1ei0axIAda7ZDP+eebe2vCr+eqcHg==",
|
||||
"version": "5.4.0",
|
||||
"resolved": "https://registry.npmjs.org/kredits-contracts/-/kredits-contracts-5.4.0.tgz",
|
||||
"integrity": "sha512-Oz5c+wbuDhZ0uYKRWPxSpsNiUXdrZlJ6Vp/+IMMSjD/TmlHGwP2Pnmloyq4Xjim0JbA/bJSjyBdy62dCrqCLrw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ethers": "^4.0.27",
|
||||
"ipfs-http-client": "^30.1.1",
|
||||
"kosmos-schemas": "^2.0.0",
|
||||
"ethers": "^4.0.29",
|
||||
"ipfs-http-client": "^30.1.3",
|
||||
"kosmos-schemas": "^2.1.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"tv4": "^1.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "10.14.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.10.tgz",
|
||||
"integrity": "sha512-V8wj+w2YMNvGuhgl/MA5fmTxgjmVHVoasfIaxMMZJV6Y8Kk+Ydpi1z2whoShDCJ2BuNVoqH/h1hrygnBxkrw/Q==",
|
||||
"dev": true
|
||||
},
|
||||
"elliptic": {
|
||||
"version": "6.3.3",
|
||||
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.3.3.tgz",
|
||||
"integrity": "sha1-VILZZG1UvLif19mU/J4ulWiHbj8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.4.0",
|
||||
"brorand": "^1.0.1",
|
||||
"hash.js": "^1.0.0",
|
||||
"inherits": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"ethers": {
|
||||
"version": "4.0.32",
|
||||
"resolved": "https://registry.npmjs.org/ethers/-/ethers-4.0.32.tgz",
|
||||
"integrity": "sha512-r0k2tBNF6MYEsvwmINeP3VPppD/7eAZyiOk/ifDDawXGCKqr3iEQkPq6OZSDVD+4Jie38WPteS9thXzpn2+A5Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "^10.3.2",
|
||||
"aes-js": "3.0.0",
|
||||
"bn.js": "^4.4.0",
|
||||
"elliptic": "6.3.3",
|
||||
"hash.js": "1.1.3",
|
||||
"js-sha3": "0.5.7",
|
||||
"scrypt-js": "2.0.4",
|
||||
"setimmediate": "1.0.4",
|
||||
"uuid": "2.0.1",
|
||||
"xmlhttprequest": "1.8.0"
|
||||
}
|
||||
},
|
||||
"hash.js": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz",
|
||||
"integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
"minimalistic-assert": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"kosmos-schemas": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/kosmos-schemas/-/kosmos-schemas-2.1.0.tgz",
|
||||
"integrity": "sha512-RT90o0ujAKoCUpcYHi5ijDxg9F9enY5aOIZXujidjkCQ/hgjJ2tyNi+x8rszutsAP/mx64yj307oWJWhNZTyTg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brfs-babel": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-2.0.1.tgz",
|
||||
"integrity": "sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"labeled-stream-splicer": {
|
||||
@@ -11047,9 +11145,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"asn1.js": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.0.1.tgz",
|
||||
"integrity": "sha512-aO8EaEgbgqq77IEw+1jfx5c9zTbzvkfuRBuZsSsPnTHMkmd5AI4J6OtITLZFa381jReeaQL67J0GBTUu0+ZTVw==",
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.2.0.tgz",
|
||||
"integrity": "sha512-Q7hnYGGNYbcmGrCPulXfkEw7oW7qjWeM4ZTALmgpuIcZLxyqqKYWxCZg2UBm8bklrnB4m2mGyJPWfoktdORD8A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.0.0",
|
||||
@@ -12148,13 +12246,14 @@
|
||||
"dev": true
|
||||
},
|
||||
"multiaddr": {
|
||||
"version": "6.0.6",
|
||||
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.0.6.tgz",
|
||||
"integrity": "sha512-nR4s91mi7IKed1jrqUj/4OhZ1VKdAjUG79IuVB5PS6b+qxOZLKPW8nsskHhrfGn4o1Rn1NJWl7znidF/NVQpEA==",
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-6.1.0.tgz",
|
||||
"integrity": "sha512-+XTP3OzG2m6JVcjxA9QBmGDr0Vk8WwnohC/fCC3puXb5qJqfJwLVJLEtdTc6vK7ri/hw+Nn4wyT4LkZaPnvGfQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bs58": "^4.0.1",
|
||||
"class-is": "^1.1.0",
|
||||
"hi-base32": "~0.5.0",
|
||||
"ip": "^1.1.5",
|
||||
"is-ip": "^2.0.0",
|
||||
"varint": "^5.0.0"
|
||||
@@ -12181,9 +12280,9 @@
|
||||
}
|
||||
},
|
||||
"multicodec": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.1.tgz",
|
||||
"integrity": "sha512-Q5glyZLdXVbbBxvRYHLQHpu8ydVf1422Z+v9fU47v2JCkiue7n+JcFS7uRv0cQW8hbVtgdtIDgYWPWaIKEXuXA==",
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/multicodec/-/multicodec-0.5.3.tgz",
|
||||
"integrity": "sha512-TUId9mavSh7q4ui5nUYiC0U10XVrMhsoMLPoG6nAAaFt2GKqZKK3aB2AeFk58aqEnLhmTSdRkmNrlty4jjOxzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"varint": "^5.0.0"
|
||||
@@ -12347,6 +12446,12 @@
|
||||
"lower-case": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==",
|
||||
"dev": true
|
||||
},
|
||||
"node-forge": {
|
||||
"version": "0.7.6",
|
||||
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz",
|
||||
@@ -16939,9 +17044,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"asn1.js": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.0.1.tgz",
|
||||
"integrity": "sha512-aO8EaEgbgqq77IEw+1jfx5c9zTbzvkfuRBuZsSsPnTHMkmd5AI4J6OtITLZFa381jReeaQL67J0GBTUu0+ZTVw==",
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.2.0.tgz",
|
||||
"integrity": "sha512-Q7hnYGGNYbcmGrCPulXfkEw7oW7qjWeM4ZTALmgpuIcZLxyqqKYWxCZg2UBm8bklrnB4m2mGyJPWfoktdORD8A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bn.js": "^4.0.0",
|
||||
@@ -17184,9 +17289,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"pull-stream": {
|
||||
"version": "3.6.9",
|
||||
"resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.9.tgz",
|
||||
"integrity": "sha512-hJn4POeBrkttshdNl0AoSCVjMVSuBwuHocMerUdoZ2+oIUzrWHFTwJMlbHND7OiKLVgvz6TFj8ZUVywUMXccbw==",
|
||||
"version": "3.6.13",
|
||||
"resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.6.13.tgz",
|
||||
"integrity": "sha512-enbnbnO+czsPuCq9s9HTTzDzzVQD5TSe60aO3nBioeJ9mevh8RzE4Hxbujo9TReg1fJlmNEL8uyQTUgn8+rSHg==",
|
||||
"dev": true
|
||||
},
|
||||
"pull-to-stream": {
|
||||
@@ -17199,9 +17304,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
@@ -18084,19 +18189,27 @@
|
||||
}
|
||||
},
|
||||
"secp256k1": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.6.2.tgz",
|
||||
"integrity": "sha512-90nYt7yb0LmI4A2jJs1grglkTAXrBwxYAjP9bpeKjvJKOjG2fOeH/YI/lchDMIvjrOasd5QXwvV2jwN168xNng==",
|
||||
"version": "3.7.1",
|
||||
"resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-3.7.1.tgz",
|
||||
"integrity": "sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bindings": "^1.2.1",
|
||||
"bip66": "^1.1.3",
|
||||
"bn.js": "^4.11.3",
|
||||
"create-hash": "^1.1.2",
|
||||
"bindings": "^1.5.0",
|
||||
"bip66": "^1.1.5",
|
||||
"bn.js": "^4.11.8",
|
||||
"create-hash": "^1.2.0",
|
||||
"drbg.js": "^1.0.1",
|
||||
"elliptic": "^6.2.3",
|
||||
"nan": "^2.2.1",
|
||||
"safe-buffer": "^5.1.0"
|
||||
"elliptic": "^6.4.1",
|
||||
"nan": "^2.14.0",
|
||||
"safe-buffer": "^5.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"nan": {
|
||||
"version": "2.14.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz",
|
||||
"integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
@@ -18684,9 +18797,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
@@ -19034,9 +19147,9 @@
|
||||
}
|
||||
},
|
||||
"tar-stream": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.0.1.tgz",
|
||||
"integrity": "sha512-I6OJF7wE62BC6zNPdHDtseK0D0187PBjbKSLYY4ffvVkBM6tyBn2O9plDvVM2229/mozfEL/X3++qSvYYQE2xw==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.0.tgz",
|
||||
"integrity": "sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"bl": "^3.0.0",
|
||||
@@ -19047,9 +19160,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
|
||||
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
|
||||
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inherits": "^2.0.3",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "kredits-web",
|
||||
"version": "1.2.0",
|
||||
"version": "1.4.0",
|
||||
"private": true,
|
||||
"description": "Contribution dashboard of the Kosmos project",
|
||||
"repository": "https://github.com/67P/kredits-web",
|
||||
@@ -59,7 +59,7 @@
|
||||
"eslint-plugin-ember": "^5.2.0",
|
||||
"ethers": "^4.0.27",
|
||||
"kosmos-schemas": "^2.0.0",
|
||||
"kredits-contracts": "^5.3.0",
|
||||
"kredits-contracts": "^5.4.0",
|
||||
"loader.js": "^4.7.0",
|
||||
"qunit-dom": "^0.8.0",
|
||||
"tv4": "^1.3.0"
|
||||
|
||||
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
+17
-10
@@ -27,9 +27,12 @@ return{datasets:[{data:[e.community,e.design,e.dev,e.ops,e.docs],borderColor:[t,
|
||||
e.default=s}),define("kredits-web/components/chart-contributions-by-type/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.HTMLBars.template({id:"knNRD8x3",block:'{"symbols":[],"statements":[[7,"div"],[11,"class","chart"],[9],[0,"\\n "],[1,[27,"ember-chart",null,[["type","data","options","width","height"],["doughnut",[23,["chartData"]],[23,["chartOptions"]],200,200]]],false],[0,"\\n"],[10]],"hasEval":false}',meta:{moduleName:"kredits-web/components/chart-contributions-by-type/template.hbs"}})
|
||||
e.default=t}),define("kredits-web/components/contribution-list/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.Component.extend({tagName:"ul",classNames:["contribution-list"],actions:{veto:function(e){this.contractInteractionEnabled?this.vetoContribution(e):window.alert("Only members can veto contributions. Please ask someone to set you up.")}}})
|
||||
var t=Ember.Component.extend({tagName:"div",classNames:["contributions"],showQuickFilter:!1,hideSmallContributions:!1,contributorId:null,contributionKind:null,kredits:Ember.inject.service(),contributorsSorting:Object.freeze(["name:asc"]),contributors:Ember.computed.sort("kredits.contributors","contributorsSorting"),contributorsActive:Ember.computed("contributors.[]","contributions",function(){var e=this.contributions.mapBy("contributorId").map(function(e){return e.toString()}).uniq()
|
||||
return this.contributors.filter(function(t){return e.includes(t.id.toString())})}),contributionKinds:Ember.computed("contributions.[]",function(){return this.contributions.mapBy("kind").uniq()}),contributionsFiltered:Ember.computed("contributions.[]","hideSmallContributions","contributorId","contributionKind",function(){var e=this
|
||||
return this.contributions.filter(function(t){var n=!0
|
||||
return e.hideSmallContributions&&t.amount<=500&&(n=!1),Ember.isPresent(e.contributorId)&&t.contributorId.toString()!==e.contributorId.toString()&&(n=!1),Ember.isPresent(e.contributionKind)&&t.kind!==e.contributionKind&&(n=!1),n})}),actions:{veto:function(e){this.contractInteractionEnabled?this.vetoContribution(e):window.alert("Only members can veto contributions. Please ask someone to set you up.")}}})
|
||||
e.default=t}),define("kredits-web/components/contribution-list/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.HTMLBars.template({id:"xYW3ZUYB",block:'{"symbols":["contribution"],"statements":[[4,"each",[[23,["contributions"]]],null,{"statements":[[0," "],[7,"li"],[12,"data-contribution-id",[22,1,["id"]]],[12,"class",[28,[[27,"contribution-status",[[22,1,[]]],null]," ",[27,"if",[[22,1,["vetoed"]],"vetoed"],null]]]],[9],[0,"\\n "],[7,"p"],[11,"class","meta"],[9],[0,"\\n "],[7,"span"],[11,"class","recipient"],[9],[1,[27,"user-avatar",null,[["contributor"],[[22,1,["contributor"]]]]],false],[10],[0,"\\n "],[7,"span"],[12,"class",[28,["category ",[22,1,["kind"]]]]],[9],[0,"("],[1,[22,1,["kind"]],false],[0,")"],[10],[0,"\\n "],[7,"span"],[11,"class","title"],[9],[0,"\\n"],[4,"if",[[22,1,["url"]]],null,{"statements":[[0," "],[7,"a"],[12,"href",[22,1,["url"]]],[11,"target","_blank"],[11,"rel","noopener"],[9],[1,[22,1,["description"]],false],[10],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[22,1,["description"]],false],[0,"\\n"]],"parameters":[]}],[0," "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[11,"class","kredits-amount"],[9],[0,"\\n "],[7,"span"],[11,"class","amount"],[9],[1,[22,1,["amount"]],false],[10],[7,"span"],[11,"class","symbol"],[9],[0,"₭S"],[10],[0,"\\n "],[10],[0,"\\n"],[4,"unless",[[22,1,["vetoed"]]],null,{"statements":[[4,"unless",[[27,"is-confirmed-contribution",[[22,1,[]]],null]],null,{"statements":[[0," "],[7,"p"],[11,"class","voting"],[9],[0,"\\n "],[7,"button"],[11,"class","small danger"],[9],[0,"veto"],[3,"action",[[22,0,[]],"veto",[22,1,["id"]]]],[10],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null],[0," "],[10],[0,"\\n"]],"parameters":[1]},null]],"hasEval":false}',meta:{moduleName:"kredits-web/components/contribution-list/template.hbs"}})
|
||||
var t=Ember.HTMLBars.template({id:"nesENUZ5",block:'{"symbols":["contribution","kind","contributor"],"statements":[[4,"if",[[23,["showQuickFilter"]]],null,{"statements":[[0," "],[7,"div"],[11,"class","quick-filter"],[9],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[7,"label"],[11,"class","filter-contributor"],[9],[0,"\\n Contributor:\\n "],[7,"select"],[12,"onchange",[27,"action",[[22,0,[]],[27,"mut",[[23,["contributorId"]]],null]],[["value"],["target.value"]]]],[9],[0,"\\n "],[7,"option"],[11,"value",""],[11,"selected",""],[9],[0,"all"],[10],[0,"\\n"],[4,"each",[[23,["contributorsActive"]]],null,{"statements":[[0," "],[7,"option"],[12,"value",[22,3,["id"]]],[12,"selected",[27,"eq",[[23,["contributorId"]],[22,3,["id"]]],null]],[9],[1,[22,3,["name"]],false],[10],[0,"\\n"]],"parameters":[3]},null],[0," "],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"label"],[11,"class","filter-contribution-kind"],[9],[0,"\\n Kind:\\n "],[7,"select"],[12,"onchange",[27,"action",[[22,0,[]],[27,"mut",[[23,["contributionKind"]]],null]],[["value"],["target.value"]]]],[9],[0,"\\n "],[7,"option"],[11,"value",""],[11,"selected",""],[9],[0,"all"],[10],[0,"\\n"],[4,"each",[[23,["contributionKinds"]]],null,{"statements":[[0," "],[7,"option"],[12,"value",[22,2,[]]],[12,"selected",[27,"eq",[[23,["contributionKind"]],[22,2,[]]],null]],[9],[1,[27,"capitalize-string",[[22,2,[]]],null],false],[10],[0,"\\n"]],"parameters":[2]},null],[0," "],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"label"],[11,"class","filter-contribution-size"],[9],[0,"\\n "],[1,[27,"input",null,[["type","checked"],["checkbox",[23,["hideSmallContributions"]]]]],false],[0,"\\n Hide small contributions\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null],[0,"\\n"],[7,"ul"],[11,"class","contribution-list"],[9],[0,"\\n"],[4,"each",[[23,["contributionsFiltered"]]],null,{"statements":[[0," "],[7,"li"],[12,"data-contribution-id",[22,1,["id"]]],[12,"class",[28,[[27,"contribution-status",[[22,1,[]]],null]," ",[27,"if",[[22,1,["vetoed"]],"vetoed"],null]]]],[9],[0,"\\n "],[7,"p"],[11,"class","meta"],[9],[0,"\\n "],[7,"span"],[11,"class","recipient"],[9],[1,[27,"user-avatar",null,[["contributor"],[[22,1,["contributor"]]]]],false],[10],[0,"\\n "],[7,"span"],[12,"class",[28,["category ",[22,1,["kind"]]]]],[9],[0,"("],[1,[22,1,["kind"]],false],[0,")"],[10],[0,"\\n "],[7,"span"],[11,"class","title"],[9],[0,"\\n"],[4,"if",[[22,1,["url"]]],null,{"statements":[[0," "],[7,"a"],[12,"href",[22,1,["url"]]],[11,"target","_blank"],[11,"rel","noopener"],[9],[1,[22,1,["description"]],false],[10],[0,"\\n"]],"parameters":[]},{"statements":[[0," "],[1,[22,1,["description"]],false],[0,"\\n"]],"parameters":[]}],[0," "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[11,"class","kredits-amount"],[9],[0,"\\n "],[7,"span"],[11,"class","amount"],[9],[1,[22,1,["amount"]],false],[10],[7,"span"],[11,"class","symbol"],[9],[0,"₭S"],[10],[0,"\\n "],[10],[0,"\\n"],[4,"unless",[[22,1,["vetoed"]]],null,{"statements":[[4,"unless",[[27,"is-confirmed-contribution",[[22,1,[]]],null]],null,{"statements":[[0," "],[7,"p"],[11,"class","voting"],[9],[0,"\\n "],[7,"button"],[11,"class","small danger"],[9],[0,"veto"],[3,"action",[[22,0,[]],"veto",[22,1,["id"]]]],[10],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null]],"parameters":[]},null],[0," "],[10],[0,"\\n"]],"parameters":[1]},null],[10]],"hasEval":false}',meta:{moduleName:"kredits-web/components/contribution-list/template.hbs"}})
|
||||
e.default=t}),define("kredits-web/components/contributor-list/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.Component.extend({tagName:"table",classNames:"contributor-list",selectedContributor:null,actions:{toggleContributorInfo:function(e){e.showMetadata?e.set("showMetadata",!1):(this.contributorList.setEach("showMetadata",!1),e.set("showMetadata",!0))}}})
|
||||
e.default=t}),define("kredits-web/components/contributor-list/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
@@ -60,7 +63,7 @@ e.default=t}),define("kredits-web/controllers/contributors/new",["exports"],func
|
||||
var t=Ember.Controller.extend({kredits:Ember.inject.service(),actions:{save:function(e){var t=this
|
||||
return this.kredits.addContributor(e).then(function(){return t.transitionToRoute("index")})}}})
|
||||
e.default=t}),define("kredits-web/controllers/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.Controller.extend({kredits:Ember.inject.service(),currentBlock:Ember.computed.alias("kredits.currentBlock"),contributions:Ember.computed.alias("kredits.contributions"),contributionsConfirmed:Ember.computed.alias("kredits.contributionsConfirmed"),contributionsUnconfirmed:Ember.computed.alias("kredits.contributionsUnconfirmed"),contributionsSorting:Object.freeze(["date:desc","time:desc","id:desc"]),contributionsUnconfirmedSorted:Ember.computed.sort("contributionsUnconfirmed","contributionsSorting"),contributionsConfirmedSorted:Ember.computed.sort("contributionsConfirmed","contributionsSorting"),kreditsByContributor:Ember.computed.alias("kredits.kreditsByContributor"),kreditsToplistSorting:Ember.computed("showUnconfirmedKredits",function(){return this.showUnconfirmedKredits?["amountTotal:desc"]:["amountConfirmed:desc"]}),kreditsToplist:Ember.computed.sort("kreditsByContributor","kreditsToplistSorting"),showUnconfirmedKredits:!0,hideUnconfirmedKredits:Ember.computed.not("showUnconfirmedKredits"),actions:{vetoContribution:function(e){this.kredits.veto(e).then(function(e){console.debug("[controllers:index] Veto submitted to Ethereum blockhain: "+e.hash)})},confirmProposal:function(e){this.kredits.vote(e).then(function(e){console.debug("[controllers:index] Vote submitted to Ethereum blockhain: "+e.hash)})}}})
|
||||
var t=Ember.Controller.extend({kredits:Ember.inject.service(),currentBlock:Ember.computed.alias("kredits.currentBlock"),contributions:Ember.computed.alias("kredits.contributions"),contributionsConfirmed:Ember.computed.alias("kredits.contributionsConfirmed"),contributionsUnconfirmed:Ember.computed.alias("kredits.contributionsUnconfirmed"),contributionsSorting:Object.freeze(["date:desc","time:desc","id:desc"]),contributionsUnconfirmedSorted:Ember.computed.sort("contributionsUnconfirmed","contributionsSorting"),contributionsConfirmedSorted:Ember.computed.sort("contributionsConfirmed","contributionsSorting"),kreditsByContributor:Ember.computed.alias("kredits.kreditsByContributor"),kreditsToplistSorting:Ember.computed("showUnconfirmedKredits",function(){return this.showUnconfirmedKredits?["amountTotal:desc"]:["amountConfirmed:desc"]}),kreditsToplist:Ember.computed.sort("kreditsByContributor","kreditsToplistSorting"),showUnconfirmedKredits:!0,hideUnconfirmedKredits:Ember.computed.not("showUnconfirmedKredits"),showQuickFilterUnconfirmed:!1,showQuickFilterConfirmed:!1,actions:{vetoContribution:function(e){this.kredits.veto(e).then(function(e){console.debug("[controllers:index] Veto submitted to Ethereum blockhain: "+e.hash)})},confirmProposal:function(e){this.kredits.vote(e).then(function(e){console.debug("[controllers:index] Vote submitted to Ethereum blockhain: "+e.hash)})},toggleQuickFilterUnconfirmed:function(){this.toggleProperty("showQuickFilterUnconfirmed")},toggleQuickFilterConfirmed:function(){this.toggleProperty("showQuickFilterConfirmed")}}})
|
||||
e.default=t}),define("kredits-web/controllers/proposals/new",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.Controller.extend({kredits:Ember.inject.service(),contributors:Ember.computed.alias("kredits.contributors"),minedContributors:Ember.computed.filterBy("contributors","id"),actions:{save:function(e){var t=this,n=this.contributors.findBy("id",e.contributorId)
|
||||
return e.contributorIpfsHash=n.get("ipfsHash"),this.kredits.addProposal(e).then(function(e){return t.transitionToRoute("index"),e})}}})
|
||||
@@ -68,7 +71,11 @@ e.default=t}),define("kredits-web/helpers/and",["exports","ember-truth-helpers/h
|
||||
return o&&(r.showExtended&&(u=i.match(n.versionExtendedRegExp)),u||(u=i.match(n.versionRegExp))),s&&(u=i.match(n.shaRegExp)),u?u[0]:i}Object.defineProperty(e,"__esModule",{value:!0}),e.appVersion=r,e.default=void 0
|
||||
var i=Ember.Helper.helper(r)
|
||||
e.default=i}),define("kredits-web/helpers/await",["exports","ember-promise-helpers/helpers/await"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})})
|
||||
define("kredits-web/helpers/contribution-status",["exports"],function(e){function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0
|
||||
define("kredits-web/helpers/capitalize-string",["exports"],function(e){function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0
|
||||
try{for(var s,u=e[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(a){i=!0,o=a}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var n=Ember.Helper.extend({compute:function(e){var n=t(e,1)[0]
|
||||
return n.charAt(0).toUpperCase()+n.slice(1)}})
|
||||
e.default=n}),define("kredits-web/helpers/contribution-status",["exports"],function(e){function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0
|
||||
try{for(var s,u=e[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(a){i=!0,o=a}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var n=Ember.Helper.extend({kredits:Ember.inject.service(),currentBlock:Ember.computed.alias("kredits.currentBlock"),compute:function(e){var n=t(e,1)[0]
|
||||
return n.vetoed?"vetoed":n.confirmedAt>this.currentBlock?"unconfirmed":"confirmed"}})
|
||||
@@ -111,10 +118,10 @@ e.default=r}),define("kredits-web/routes/application",["exports"],function(e){Ob
|
||||
var t=Ember.Route.extend({kredits:Ember.inject.service(),beforeModel:function(e){var t=this.kredits
|
||||
return t.setup().then(function(){t.get("kredits").preflightChecks().catch(function(e){console.error("Kredits preflight check failed!"),console.error(e)}),t.get("accountNeedsUnlock")&&confirm("It looks like you have an Ethereum wallet available. Please unlock your account.")&&e.retry()}).catch(function(e){console.log("Error initializing Kredits",e)})},afterModel:function(){var e=this
|
||||
return this.kredits.loadInitialData().then(function(){e.kredits.addContractEventHandlers()})}})
|
||||
e.default=t}),define("kredits-web/routes/contributors/edit",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.Route.extend({kredits:Ember.inject.service(),contributors:Ember.computed.alias("kredits.contributors"),model:function(e){return this.kredits.contributors.findBy("id",e.id)},setupController:function(e,t){this._super(e,t),e.set("attributes",{account:t.account,name:t.name,kind:t.kind,url:t.url,github_username:t.github_username,github_uid:t.github_uid,gitea_username:t.gitea_username,wiki_username:t.wiki_username})}})
|
||||
e.default=t})
|
||||
define("kredits-web/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("kredits-web/services/kredits",["exports","npm:ethers","npm:kredits-contracts","kredits-web/utils/group-by","kredits-web/utils/format-kredits","kredits-web/config/environment","kredits-web/models/contributor","kredits-web/models/proposal","kredits-web/models/contribution"],function(e,t,n,r,i,o,s,u,a){function l(e,t,n,r,i,o,s){try{var u=e[o](s),a=u.value}catch(l){return void n(l)}u.done?t(a):Promise.resolve(a).then(r,i)}function d(e){return function(){var t=this,n=arguments
|
||||
define("kredits-web/routes/contributors/edit",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.Route.extend({kredits:Ember.inject.service(),contributors:Ember.computed.alias("kredits.contributors"),model:function(e){return this.kredits.contributors.findBy("id",e.id)},setupController:function(e,t){this._super(e,t),e.set("attributes",{account:t.account,name:t.name,kind:t.kind,url:t.url,github_username:t.github_username,github_uid:t.github_uid,gitea_username:t.gitea_username,wiki_username:t.wiki_username})}})
|
||||
e.default=t}),define("kredits-web/services/ajax",["exports","ember-ajax/services/ajax"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})}),define("kredits-web/services/kredits",["exports","npm:ethers","npm:kredits-contracts","kredits-web/utils/group-by","kredits-web/utils/format-kredits","kredits-web/config/environment","kredits-web/models/contributor","kredits-web/models/proposal","kredits-web/models/contribution"],function(e,t,n,r,i,o,s,u,a){function l(e,t,n,r,i,o,s){try{var u=e[o](s),a=u.value}catch(l){return void n(l)}u.done?t(a):Promise.resolve(a).then(r,i)}function d(e){return function(){var t=this,n=arguments
|
||||
return new Promise(function(r,i){var o=e.apply(t,n)
|
||||
function s(e){l(o,r,i,s,u,"next",e)}function u(e){l(o,r,i,s,u,"throw",e)}s(void 0)})}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var c=Ember.Service.extend({currentBlock:null,currentUserAccounts:null,currentUser:null,contributors:null,contributions:null,proposals:null,currentUserIsContributor:Ember.computed.notEmpty("currentUser"),currentUserIsCore:Ember.computed.alias("currentUser.isCore"),hasAccounts:Ember.computed.notEmpty("currentUserAccounts"),accountNeedsUnlock:Ember.computed("currentUserAccounts",function(){return this.currentUserAccounts&&Ember.isEmpty(this.currentUserAccounts)}),contributionsUnconfirmed:Ember.computed("contributions.[]","currentBlock",function(){var e=this
|
||||
@@ -171,7 +178,7 @@ var t=Ember.HTMLBars.template({id:"LZQyoYt+",block:'{"symbols":[],"statements":[
|
||||
e.default=t}),define("kredits-web/templates/contributors/new",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.HTMLBars.template({id:"IoVi6fNU",block:'{"symbols":[],"statements":[[7,"main"],[11,"class","center-column"],[9],[0,"\\n\\n "],[7,"section"],[11,"id","add-contributor"],[9],[0,"\\n "],[7,"header"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Add contributor profile"],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"add-contributor",null,[["save"],[[27,"action",[[22,0,[]],"save"],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n"],[10],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"kredits-web/templates/contributors/new.hbs"}})
|
||||
e.default=t}),define("kredits-web/templates/index",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.HTMLBars.template({id:"kSDGlXXL",block:'{"symbols":[],"statements":[[7,"main"],[11,"id","index"],[9],[0,"\\n\\n "],[7,"div"],[11,"id","stats"],[9],[0,"\\n "],[7,"section"],[11,"id","people"],[9],[0,"\\n "],[7,"header"],[11,"class","with-nav"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Contributors"],[10],[0,"\\n"],[4,"if",[[23,["kredits","hasAccounts"]]],null,{"statements":[[0," "],[7,"nav"],[9],[0,"\\n "],[4,"link-to",["contributors.new"],[["title","class"],["Add contributor profile","button small green"]],{"statements":[[0,"add"]],"parameters":[]},null],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null],[0," "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"contributor-list",null,[["contributorList","showUnconfirmedKredits"],[[23,["kreditsToplist"]],[23,["showUnconfirmedKredits"]]]]],false],[0,"\\n\\n "],[7,"p"],[11,"class","stats"],[9],[0,"\\n "],[7,"span"],[11,"class","number"],[9],[1,[27,"await",[[23,["kredits","totalKreditsEarned"]]],null],false],[10],[0," kredits confirmed and issued to\\n "],[7,"span"],[11,"class","number"],[9],[1,[23,["contributorsWithKredits","length"]],false],[10],[0," contributors\\n "],[10],[0,"\\n "],[7,"p"],[11,"class","stats"],[9],[0,"\\n "],[1,[27,"input",null,[["type","id","checked"],["checkbox","hide-unnconfirmed-kredits",[23,["showUnconfirmedKredits"]]]]],false],[0,"\\n "],[7,"label"],[11,"for","hide-unnconfirmed-kredits"],[9],[0,"Show unconfirmed kredits in toplist"],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"section"],[11,"id","contributions-by-type"],[9],[0,"\\n "],[7,"header"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Contributions by type"],[10],[0,"\\n "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"chart-contributions-by-type",null,[["contributions"],[[23,["contributions"]]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"div"],[11,"id","contributions"],[9],[0,"\\n"],[4,"if",[[23,["contributionsUnconfirmed"]]],null,{"statements":[[0," "],[7,"section"],[11,"id","contributions-unconfirmed"],[9],[0,"\\n "],[7,"header"],[11,"class","with-nav"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Latest Contributions"],[10],[0,"\\n"],[4,"if",[[23,["kredits","hasAccounts"]]],null,{"statements":[[0," "],[7,"nav"],[9],[0,"\\n "],[4,"link-to",["contributions.new"],[["title","class"],["Submit a contribution","button small green"]],{"statements":[[0,"add"]],"parameters":[]},null],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null],[0," "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n"],[0," "],[1,[27,"contribution-list",null,[["contributions","vetoContribution","contractInteractionEnabled"],[[23,["contributionsUnconfirmedSorted"]],[27,"action",[[22,0,[]],"vetoContribution"],null],[23,["kredits","hasAccounts"]]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null],[0,"\\n "],[7,"section"],[11,"id","contributions-confirmed"],[9],[0,"\\n "],[7,"header"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Confirmed Contributions"],[10],[0,"\\n "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"contribution-list",null,[["contributions","vetoContribution"],[[23,["contributionsConfirmedSorted"]],[27,"action",[[22,0,[]],"vetoContribution"],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n"],[10],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"kredits-web/templates/index.hbs"}})
|
||||
var t=Ember.HTMLBars.template({id:"GRxyQS7g",block:'{"symbols":[],"statements":[[7,"main"],[11,"id","index"],[9],[0,"\\n\\n "],[7,"div"],[11,"id","stats"],[9],[0,"\\n "],[7,"section"],[11,"id","people"],[9],[0,"\\n "],[7,"header"],[11,"class","with-nav"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Contributors"],[10],[0,"\\n"],[4,"if",[[23,["kredits","hasAccounts"]]],null,{"statements":[[0," "],[7,"nav"],[9],[0,"\\n "],[4,"link-to",["contributors.new"],[["title","class"],["Add contributor profile","button small green"]],{"statements":[[0,"add"]],"parameters":[]},null],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null],[0," "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"contributor-list",null,[["contributorList","showUnconfirmedKredits"],[[23,["kreditsToplist"]],[23,["showUnconfirmedKredits"]]]]],false],[0,"\\n\\n "],[7,"p"],[11,"class","stats"],[9],[0,"\\n "],[7,"span"],[11,"class","number"],[9],[1,[27,"await",[[23,["kredits","totalKreditsEarned"]]],null],false],[10],[0," kredits confirmed and issued to\\n "],[7,"span"],[11,"class","number"],[9],[1,[23,["contributorsWithKredits","length"]],false],[10],[0," contributors\\n "],[10],[0,"\\n "],[7,"p"],[11,"class","stats"],[9],[0,"\\n "],[1,[27,"input",null,[["type","id","checked"],["checkbox","hide-unnconfirmed-kredits",[23,["showUnconfirmedKredits"]]]]],false],[0,"\\n "],[7,"label"],[11,"for","hide-unnconfirmed-kredits"],[9],[0,"Show unconfirmed kredits in toplist"],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"section"],[11,"id","contributions-by-type"],[9],[0,"\\n "],[7,"header"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Contributions by type"],[10],[0,"\\n "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"chart-contributions-by-type",null,[["contributions"],[[23,["contributions"]]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"div"],[11,"id","contributions"],[9],[0,"\\n"],[4,"if",[[23,["contributionsUnconfirmed"]]],null,{"statements":[[0," "],[7,"section"],[11,"id","contributions-unconfirmed"],[9],[0,"\\n "],[7,"header"],[11,"class","with-nav"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Latest Contributions"],[10],[0,"\\n"],[4,"if",[[23,["kredits","hasAccounts"]]],null,{"statements":[[0," "],[7,"nav"],[9],[0,"\\n "],[7,"button"],[12,"class",[28,["small ",[27,"if",[[23,["showQuickFilterUnconfirmed"]],"active"],null]]]],[9],[0,"filter"],[3,"action",[[22,0,[]],"toggleQuickFilterUnconfirmed"]],[10],[0,"\\n "],[4,"link-to",["contributions.new"],[["title","class"],["Submit a contribution","button small green"]],{"statements":[[0,"add"]],"parameters":[]},null],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null],[0," "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n"],[0," "],[1,[27,"contribution-list",null,[["contributions","vetoContribution","contractInteractionEnabled","showQuickFilter"],[[23,["contributionsUnconfirmedSorted"]],[27,"action",[[22,0,[]],"vetoContribution"],null],[23,["kredits","hasAccounts"]],[23,["showQuickFilterUnconfirmed"]]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n"]],"parameters":[]},null],[0,"\\n "],[7,"section"],[11,"id","contributions-confirmed"],[9],[0,"\\n "],[7,"header"],[11,"class","with-nav"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Confirmed Contributions"],[10],[0,"\\n "],[7,"nav"],[9],[0,"\\n "],[7,"button"],[12,"class",[28,["small ",[27,"if",[[23,["showQuickFilterConfirmed"]],"active"],null]]]],[9],[0,"filter"],[3,"action",[[22,0,[]],"toggleQuickFilterConfirmed"]],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"contribution-list",null,[["contributions","vetoContribution","showQuickFilter"],[[23,["contributionsConfirmedSorted"]],[27,"action",[[22,0,[]],"vetoContribution"],null],[23,["showQuickFilterConfirmed"]]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n"],[10],[0,"\\n"]],"hasEval":false}',meta:{moduleName:"kredits-web/templates/index.hbs"}})
|
||||
e.default=t}),define("kredits-web/templates/proposals/new",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
|
||||
var t=Ember.HTMLBars.template({id:"vauAEy3a",block:'{"symbols":[],"statements":[[7,"section"],[11,"id","add-proposal"],[9],[0,"\\n "],[7,"header"],[9],[0,"\\n "],[7,"h2"],[9],[0,"Add Proposal"],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"div"],[11,"class","content"],[9],[0,"\\n "],[1,[27,"add-proposal",null,[["contributors","save"],[[23,["minedContributors"]],[27,"action",[[22,0,[]],"save"],null]]]],false],[0,"\\n "],[10],[0,"\\n"],[10],[0,"\\n\\n"]],"hasEval":false}',meta:{moduleName:"kredits-web/templates/proposals/new.hbs"}})
|
||||
e.default=t}),define("kredits-web/utils/cps/bignumber",["exports","npm:ethers"],function(e,t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,n){return Ember.computed(e,{get:function(){var r=this.get(e)
|
||||
@@ -185,6 +192,6 @@ return r}}),define("kredits-web/utils/group-by",["exports"],function(e){Object.d
|
||||
r&&r.forEach(function(e){var r=Ember.get(e,t),i=n.findBy("value",r)
|
||||
Ember.isPresent(i)?Ember.get(i,"items").push(e):(i={property:t,value:r,items:[e]},n.push(i))})
|
||||
return n}}),define("kredits-web/config/environment",[],function(){try{var e="kredits-web/config/environment",t=document.querySelector('meta[name="'+e+'"]').getAttribute("content"),n={default:JSON.parse(decodeURIComponent(t))}
|
||||
return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("kredits-web/app").default.create({name:"kredits-web",version:"1.2.0+f5c89fd5"})
|
||||
return Object.defineProperty(n,"__esModule",{value:!0}),n}catch(r){throw new Error('Could not read config from meta tag with name "'+e+'".')}}),runningTests||require("kredits-web/app").default.create({name:"kredits-web",version:"1.4.0+b2bbbfd0"})
|
||||
|
||||
//# sourceMappingURL=kredits-web-7c4a80176b0108122ca081687f9fe9e8.map
|
||||
//# sourceMappingURL=kredits-web-45753e2af7c6c6726dbf6abe755a6e40.map
|
||||
+4567
-2513
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%7D%2C%22APP%22%3A%7B%22name%22%3A%22kredits-web%22%2C%22version%22%3A%221.2.0%2Bf5c89fd5%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%22ipfs%22%3A%7B%22host%22%3A%22ipfs.kosmos.org%22%2C%22port%22%3A%225444%22%2C%22protocol%22%3A%22https%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%7D%2C%22APP%22%3A%7B%22name%22%3A%22kredits-web%22%2C%22version%22%3A%221.4.0%2Bb2bbbfd0%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%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" />
|
||||
|
||||
<link integrity="" rel="stylesheet" href="/assets/vendor-179cf27a97ea5bbb0ce72403a401cc8c.css">
|
||||
<link integrity="" rel="stylesheet" href="/assets/kredits-web-29d147f9bc6d79dbc7aff481f8ee5541.css">
|
||||
<link integrity="" rel="stylesheet" href="/assets/kredits-web-9b9ce4d483d65662223fce4307e95ab0.css">
|
||||
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
<body>
|
||||
|
||||
|
||||
<script src="/assets/vendor-801d0f45e82f8bef6ee0b28f728036e5.js" integrity="sha256-0rvoxLzxNRaodYFUkwv5D3zakixGtC+//xKSO9XtbKc= sha512-YNRAvmy8HT14rRH3MwaQciCOYPZwuuiDT5Bsi3aIXUWtADH2HNxR3K88BTGtNEbOXCCSewh0vpkiBt1o1eyTvg==" ></script>
|
||||
<script src="/assets/kredits-web-b12d883fdbeaf315e3cd3e3302904d30.js" integrity="sha256-VVMzBYeO6bs3raMutSy2L5hOW0sd7q8UMjd6G8gblto= sha512-yP5/L4EkuYjPSFMENaxdSB2q8EYXWJrrIEVw5X3Lsxf1+tvkg11hRnhcEDpGQLqDfIc7uSItsRXsH4oIyYJVTA==" ></script>
|
||||
<script src="/assets/vendor-80a68be62538fc452f619ea272efa683.js" integrity="sha256-1SzKk/ufxNyb/CdyXniFRUByZMpFGEz+hUTtfJVw7mw= sha512-ixkdWl+f7KrwA+YRsH92A8FSnK9ZG31nJa74FIskk2y40KHDpm6zOln2VVeApLpKdkj+FF7huYSGqJZwE7PRvA==" ></script>
|
||||
<script src="/assets/kredits-web-e442d85b0b19133886e30b7076686a50.js" integrity="sha256-fXOAK653ST4p0jmRe3R2rTZHFeaMR9Y9GhzLO/y0b8Y= sha512-MLBp8nse/pEj0e3+F5xji46rftV+QXV9+xNgPqtSwvBvtPaEhg2sJe24oxLNnq3iL7IUhGze6yp2MIblEF3IYw==" ></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
Vendored
+9
-9
@@ -3,15 +3,15 @@ import Model from 'kredits-web/models/contribution';
|
||||
const items = [];
|
||||
|
||||
const data = [
|
||||
{ id: 1, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500 },
|
||||
{ id: 2, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 5000 },
|
||||
{ id: 3, contributorId: 2, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500 },
|
||||
{ id: 4, contributorId: 2, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500 },
|
||||
{ id: 5, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 5000 },
|
||||
{ id: 6, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: true, amount: 500 },
|
||||
{ id: 7, contributorId: 3, confirmedAtBlock: 2000, claimed: false, vetoed: false, amount: 5000 },
|
||||
{ id: 8, contributorId: 1, confirmedAtBlock: 2000, claimed: false, vetoed: false, amount: 1500 },
|
||||
{ id: 9, contributorId: 3, confirmedAtBlock: 2000, claimed: false, vetoed: true, amount: 1500 },
|
||||
{ id: 1, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500, kind: 'dev' },
|
||||
{ id: 2, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 5000, kind: 'ops' },
|
||||
{ id: 3, contributorId: 2, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500, kind: 'ops' },
|
||||
{ id: 4, contributorId: 2, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 1500, kind: 'docs' },
|
||||
{ id: 5, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: false, amount: 5000, kind: 'design' },
|
||||
{ id: 6, contributorId: 1, confirmedAtBlock: 1000, claimed: false, vetoed: true, amount: 500, kind: 'dev' },
|
||||
{ id: 7, contributorId: 3, confirmedAtBlock: 2000, claimed: false, vetoed: false, amount: 5000, kind: 'dev' },
|
||||
{ id: 8, contributorId: 1, confirmedAtBlock: 2000, claimed: false, vetoed: false, amount: 1500, kind: 'community' },
|
||||
{ id: 9, contributorId: 3, confirmedAtBlock: 2000, claimed: false, vetoed: true, amount: 1500, kind: 'docs' },
|
||||
];
|
||||
|
||||
data.forEach(attrs => items.push(Model.create(attrs)));
|
||||
|
||||
@@ -1,17 +1,34 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render } from '@ember/test-helpers';
|
||||
import { click, fillIn, render } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
import contributors from '../../../fixtures/contributors';
|
||||
import contributions from '../../../fixtures/contributions';
|
||||
|
||||
module('Integration | Component | contribution-list', function(hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.set('myAction', function(val) { ... });
|
||||
test('it renders all contributions', async function(assert) {
|
||||
this.set('fixtures', contributions);
|
||||
await render(hbs`{{contribution-list contributions=fixtures}}`);
|
||||
|
||||
await render(hbs`{{contribution-list}}`);
|
||||
assert.equal(this.element.querySelectorAll('li').length, 9);
|
||||
});
|
||||
|
||||
assert.equal(this.element.textContent.trim(), '');
|
||||
test('it renders filtered contributions', async function(assert) {
|
||||
let service = this.owner.lookup('service:kredits');
|
||||
service.set('contributors', contributors);
|
||||
|
||||
this.set('fixtures', contributions);
|
||||
await render(hbs`{{contribution-list contributions=fixtures showQuickFilter=true}}`);
|
||||
|
||||
await fillIn('.filter-contributor select', '1');
|
||||
assert.equal(this.element.querySelectorAll('li').length, 5, 'select contributor');
|
||||
|
||||
await click('.filter-contribution-size input');
|
||||
assert.equal(this.element.querySelectorAll('li').length, 4, 'hide small contributions');
|
||||
|
||||
await fillIn('.filter-contribution-kind select', 'dev');
|
||||
assert.equal(this.element.querySelectorAll('li').length, 1, 'select kind');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user