Merge branch 'master' into feature/signup

This commit is contained in:
2019-08-29 12:46:00 +02:00
committed by GitHub
13 changed files with 107 additions and 78 deletions
+11 -5
View File
@@ -71,10 +71,10 @@ These are the basic steps to get up and running:
#### 1. IPFS #### 1. IPFS
Run a local IPFS deamon in offline mode. Run a local IPFS deamon.
* Make sure CORS headers are configured. See [IPFS](#ipfs) for more info. * Make sure CORS headers are configured. See [IPFS](#ipfs) for more info.
* `ipfs daemon --offline` * `ipfs daemon`
#### 2. kredits-contracts #### 2. kredits-contracts
@@ -94,10 +94,15 @@ With IPFS and Ethereum/ganache running, you can now start this Ember app.
* `npm link kredits-contracts` - link the local `kredits-contracts` package * `npm link kredits-contracts` - link the local `kredits-contracts` package
* `npm run start:local` - WEB3_PROVIDER_URL=http://localhost:7545 must be set for local settings * `npm run start:local` - WEB3_PROVIDER_URL=http://localhost:7545 must be set for local settings
If you restart the devchain your network ID changes. So kredits-contracts does not find the correct DAO Kernel address. If you restart the devchain your network ID changes. So kredits-contracts does not find the correct DAO address.
If that is the case the DAO address must be provided as `KREDITS_KERNEL_ADDRESS` environment variable. If that is the case the DAO address must be provided as `KREDITS_DAO_ADDRESS` environment variable.
* `KREDITS_KERNEL_ADDRESS=<0xYOURADDRESS> npm run start:local` - find your address with the `npm run dao:address` command in the kredits-contracts repo. * `npm run dao:address` in the kredits-contracts repo to find your address
* `KREDITS_DAO_ADDRESS=<0xYOURADDRESS> npm run start:local`
#### 4. Metamask network
Switch the network in Metamask to "Custom RPC" with the RPC URL `http://localhost:7545`.
#### IPFS #### IPFS
@@ -107,6 +112,7 @@ Install IPFS with your favorite package manager and run
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["localhost:4200"]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["localhost:4200"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]' ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
ipfs config Addresses.Gateway /ip4/127.0.0.1/tcp/8080
## Further Reading / Useful Links ## Further Reading / Useful Links
+9 -4
View File
@@ -1,6 +1,7 @@
import Component from '@ember/component'; import Component from '@ember/component';
import { computed } from '@ember/object'; import { computed } from '@ember/object';
import { and, notEmpty } from '@ember/object/computed'; import { and, notEmpty } from '@ember/object/computed';
import moment from 'moment';
export default Component.extend({ export default Component.extend({
@@ -21,13 +22,13 @@ export default Component.extend({
init () { init () {
this._super(...arguments); this._super(...arguments);
this.set('defaultDate', new Date()); this.set('defaultDate', moment().startOf('hour').toDate());
// Default attributes used by reset // Default attributes used by reset
this.set('attributes', { this.set('attributes', {
contributorId: null, contributorId: null,
kind: null, kind: null,
date: [new Date()], date: this.defaultDate,
amount: null, amount: null,
description: null, description: null,
url: null, url: null,
@@ -49,8 +50,12 @@ export default Component.extend({
} }
const attributes = this.getProperties(Object.keys(this.attributes)); const attributes = this.getProperties(Object.keys(this.attributes));
const [ date/* , time */ ] = attributes.date[0].toISOString().split('T');
attributes.date = date; let dateInput = (attributes.date instanceof Array) ?
attributes.date[0] : attributes.date;
const [ date, time ] = dateInput.toISOString().split('T');
[ attributes.date, attributes.time ] = [ date, time ];
this.set('inProgress', true); this.set('inProgress', true);
+23 -9
View File
@@ -1,15 +1,20 @@
<form {{action "submit" on="submit"}}> <form {{action "submit" on="submit"}}>
<label>
<p class="label">Contributor:</p>
<p> <p>
<select required onchange={{action (mut contributorId) value="target.value"}}> <select required onchange={{action (mut contributorId) value="target.value"}}>
<option value="" selected disabled hidden>Contributor</option> <option value="" selected disabled hidden></option>
{{#each contributors as |contributor|}} {{#each contributors as |contributor|}}
<option value={{contributor.id}} selected={{eq contributorId contributor.id}}>{{contributor.name}}</option> <option value={{contributor.id}} selected={{eq contributorId contributor.id}}>{{contributor.name}}</option>
{{/each}} {{/each}}
</select> </select>
</p> </p>
</label>
<label>
<p class="label">Kind:</p>
<p> <p>
<select required onchange={{action (mut kind) value="target.value"}}> <select required onchange={{action (mut kind) value="target.value"}}>
<option value="" selected disabled hidden>Kind</option> <option value="" selected disabled hidden></option>
<option value="community" selected={{eq kind "community"}}>Community</option> <option value="community" selected={{eq kind "community"}}>Community</option>
<option value="design" selected={{eq kind "design"}}>Design</option> <option value="design" selected={{eq kind "design"}}>Design</option>
<option value="dev" selected={{eq kind "dev"}}>Development</option> <option value="dev" selected={{eq kind "dev"}}>Development</option>
@@ -18,37 +23,46 @@
<option value="special" selected={{eq kind "special"}}>Special</option> <option value="special" selected={{eq kind "special"}}>Special</option>
</select> </select>
</p> </p>
</label>
<label>
<p class="label">Date:</p>
<p> <p>
{{ember-flatpickr {{ember-flatpickr
allowInput=false
altFormat="F j, Y"
altInput=true
altInputClass="date-alt"
date=date date=date
dateFormat="Y-m-d"
defaultDate=defaultDate defaultDate=defaultDate
maxDate=defaultDate maxDate=defaultDate
enableTime=true
time_24hr=true
onChange=(action (mut date)) onChange=(action (mut date))
}} }}
</p> </p>
</label>
<label>
<p class="label">Amount:</p>
<p> <p>
{{input type="text" {{input type="text"
placeholder="500" placeholder="500"
value=amount value=amount
class=(if isValidAmount "valid" "")}} class=(if isValidAmount "valid" "")}}
</p> </p>
</label>
<label>
<p class="label">Description:</p>
<p> <p>
{{input type="text" {{input type="text"
placeholder="Description"
value=description value=description
class=(if isValidDescription "valid" "")}} class=(if isValidDescription "valid" "")}}
</p> </p>
</label>
<label>
<p class="label">URL (optional):</p>
<p> <p>
{{input type="text" {{input type="text"
placeholder="URL (optional)"
value=url value=url
class=(if isValidUrl "valid" "")}} class=(if isValidUrl "valid" "")}}
</p> </p>
</label>
<p class="actions"> <p class="actions">
{{input type="submit" {{input type="submit"
disabled=inProgress disabled=inProgress
+4
View File
@@ -12,6 +12,10 @@ section#signup {
margin-bottom: 2rem; margin-bottom: 2rem;
} }
&.label {
margin-bottom: .5rem;
}
&.actions { &.actions {
padding-top: 1.5rem; padding-top: 1.5rem;
text-align: center; text-align: center;
+2 -2
View File
@@ -87,8 +87,8 @@ module.exports = function(environment) {
if (process.env.WEB3_PROVIDER_URL) { if (process.env.WEB3_PROVIDER_URL) {
ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL; ENV.web3ProviderUrl = process.env.WEB3_PROVIDER_URL;
} }
if (process.env.KREDITS_KERNEL_ADDRESS) { if (process.env.KREDITS_DAO_ADDRESS) {
ENV.kreditsKernelAddress = process.env.KREDITS_KERNEL_ADDRESS; ENV.kreditsKernelAddress = process.env.KREDITS_DAO_ADDRESS;
} }
if (process.env.KREDITS_APM_DOMAIN) { if (process.env.KREDITS_APM_DOMAIN) {
ENV.kreditsApmDomain = process.env.KREDITS_APM_DOMAIN; ENV.kreditsApmDomain = process.env.KREDITS_APM_DOMAIN;
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "kredits-web", "name": "kredits-web",
"version": "1.6.0", "version": "1.7.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "kredits-web", "name": "kredits-web",
"version": "1.6.0", "version": "1.7.0",
"private": true, "private": true,
"description": "Contribution dashboard of the Kosmos project", "description": "Contribution dashboard of the Kosmos project",
"repository": "https://github.com/67P/kredits-web", "repository": "https://github.com/67P/kredits-web",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -2,13 +2,13 @@
define("kredits-web/app",["exports","kredits-web/resolver","ember-load-initializers","kredits-web/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 define("kredits-web/app",["exports","kredits-web/resolver","ember-load-initializers","kredits-web/config/environment"],function(e,t,n,r){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
var o=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(o,r.default.modulePrefix) var o=Ember.Application.extend({modulePrefix:r.default.modulePrefix,podModulePrefix:r.default.podModulePrefix,Resolver:t.default});(0,n.default)(o,r.default.modulePrefix)
var i=o var i=o
e.default=i}),define("kredits-web/components/add-contribution/component",["exports"],function(e){function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0 e.default=i}),define("kredits-web/components/add-contribution/component",["exports","moment"],function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0
try{for(var s,l=e[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}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 try{for(var s,l=e[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(a){o=!0,i=a}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}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.Component.extend({attributes:null,contributors:Object.freeze([]),isValidContributor:Ember.computed.notEmpty("contributorId"),isValidKind:Ember.computed.notEmpty("kind"),isValidAmount:Ember.computed("amount",function(){return parseInt(this.amount,10)>0}),isValidDescription:Ember.computed.notEmpty("description"),isValidUrl:Ember.computed.notEmpty("url"),isValid:Ember.computed.and("isValidContributor","isValidKind","isValidAmount","isValidDescription"),init:function(){this._super.apply(this,arguments),this.set("defaultDate",new Date),this.set("attributes",{contributorId:null,kind:null,date:[new Date],amount:null,description:null,url:null}),this.reset()},reset:function(){this.setProperties(this.attributes)},actions:{submit:function(){var e=this var r=Ember.Component.extend({attributes:null,contributors:Object.freeze([]),isValidContributor:Ember.computed.notEmpty("contributorId"),isValidKind:Ember.computed.notEmpty("kind"),isValidAmount:Ember.computed("amount",function(){return parseInt(this.amount,10)>0}),isValidDescription:Ember.computed.notEmpty("description"),isValidUrl:Ember.computed.notEmpty("url"),isValid:Ember.computed.and("isValidContributor","isValidKind","isValidAmount","isValidDescription"),init:function(){this._super.apply(this,arguments),this.set("defaultDate",(0,t.default)().startOf("hour").toDate()),this.set("attributes",{contributorId:null,kind:null,date:this.defaultDate,amount:null,description:null,url:null}),this.reset()},reset:function(){this.setProperties(this.attributes)},actions:{submit:function(){var e=this
if(this.isValid){var n=this.getProperties(Object.keys(this.attributes)),r=t(n.date[0].toISOString().split("T"),1)[0] if(this.isValid){var t=this.getProperties(Object.keys(this.attributes)),r=n((t.date instanceof Array?t.date[0]:t.date).toISOString().split("T"),2),o=[r[0],r[1]]
n.date=r,this.set("inProgress",!0),this.save(n).then(function(){e.reset()},function(e){console.warn(e),window.alert("Something went wrong. Check the browser console for details.")}).finally(function(){return e.set("inProgress",!1)})}else alert("Invalid data. Please review and try again.")}}}) t.date=o[0],t.time=o[1],this.set("inProgress",!0),this.save(t).then(function(){e.reset()},function(e){console.warn(e),window.alert("Something went wrong. Check the browser console for details.")}).finally(function(){return e.set("inProgress",!1)})}else alert("Invalid data. Please review and try again.")}}})
e.default=n}),define("kredits-web/components/add-contribution/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 e.default=r}),define("kredits-web/components/add-contribution/template",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
var t=Ember.HTMLBars.template({id:"FoIaMzV6",block:'{"symbols":["contributor"],"statements":[[7,"form"],[9],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[7,"select"],[11,"required",""],[12,"onchange",[29,"action",[[24,0,[]],[29,"mut",[[25,["contributorId"]]],null]],[["value"],["target.value"]]]],[9],[0,"\\n "],[7,"option"],[11,"value",""],[11,"selected",""],[11,"disabled",""],[11,"hidden",""],[9],[0,"Contributor"],[10],[0,"\\n"],[4,"each",[[25,["contributors"]]],null,{"statements":[[0," "],[7,"option"],[12,"value",[24,1,["id"]]],[12,"selected",[29,"eq",[[25,["contributorId"]],[24,1,["id"]]],null]],[9],[1,[24,1,["name"]],false],[10],[0,"\\n"]],"parameters":[1]},null],[0," "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[7,"select"],[11,"required",""],[12,"onchange",[29,"action",[[24,0,[]],[29,"mut",[[25,["kind"]]],null]],[["value"],["target.value"]]]],[9],[0,"\\n "],[7,"option"],[11,"value",""],[11,"selected",""],[11,"disabled",""],[11,"hidden",""],[9],[0,"Kind"],[10],[0,"\\n "],[7,"option"],[11,"value","community"],[12,"selected",[29,"eq",[[25,["kind"]],"community"],null]],[9],[0,"Community"],[10],[0,"\\n "],[7,"option"],[11,"value","design"],[12,"selected",[29,"eq",[[25,["kind"]],"design"],null]],[9],[0,"Design"],[10],[0,"\\n "],[7,"option"],[11,"value","dev"],[12,"selected",[29,"eq",[[25,["kind"]],"dev"],null]],[9],[0,"Development"],[10],[0,"\\n "],[7,"option"],[11,"value","docs"],[12,"selected",[29,"eq",[[25,["kind"]],"docs"],null]],[9],[0,"Documentation"],[10],[0,"\\n "],[7,"option"],[11,"value","ops"],[12,"selected",[29,"eq",[[25,["kind"]],"ops"],null]],[9],[0,"IT Operations"],[10],[0,"\\n "],[7,"option"],[11,"value","special"],[12,"selected",[29,"eq",[[25,["kind"]],"special"],null]],[9],[0,"Special"],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"ember-flatpickr",null,[["allowInput","altFormat","altInput","altInputClass","date","dateFormat","defaultDate","maxDate","onChange"],[false,"F j, Y",true,"date-alt",[25,["date"]],"Y-m-d",[25,["defaultDate"]],[25,["defaultDate"]],[29,"action",[[24,0,[]],[29,"mut",[[25,["date"]]],null]],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"input",null,[["type","placeholder","value","class"],["text","500",[25,["amount"]],[29,"if",[[25,["isValidAmount"]],"valid",""],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"input",null,[["type","placeholder","value","class"],["text","Description",[25,["description"]],[29,"if",[[25,["isValidDescription"]],"valid",""],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"input",null,[["type","placeholder","value","class"],["text","URL (optional)",[25,["url"]],[29,"if",[[25,["isValidUrl"]],"valid",""],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[7,"p"],[11,"class","actions"],[9],[0,"\\n "],[1,[29,"input",null,[["type","disabled","value"],["submit",[25,["inProgress"]],[29,"if",[[25,["inProgress"]],"Processing","Save"],null]]]],false],[0,"\\n "],[10],[0,"\\n"],[3,"action",[[24,0,[]],"submit"],[["on"],["submit"]]],[10],[0,"\\n\\n"]],"hasEval":false}',meta:{moduleName:"kredits-web/components/add-contribution/template.hbs"}}) var t=Ember.HTMLBars.template({id:"AUOL+M29",block:'{"symbols":["contributor"],"statements":[[7,"form"],[9],[0,"\\n "],[7,"label"],[9],[0,"\\n "],[7,"p"],[11,"class","label"],[9],[0,"Contributor:"],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[7,"select"],[11,"required",""],[12,"onchange",[29,"action",[[24,0,[]],[29,"mut",[[25,["contributorId"]]],null]],[["value"],["target.value"]]]],[9],[0,"\\n "],[7,"option"],[11,"value",""],[11,"selected",""],[11,"disabled",""],[11,"hidden",""],[9],[10],[0,"\\n"],[4,"each",[[25,["contributors"]]],null,{"statements":[[0," "],[7,"option"],[12,"value",[24,1,["id"]]],[12,"selected",[29,"eq",[[25,["contributorId"]],[24,1,["id"]]],null]],[9],[1,[24,1,["name"]],false],[10],[0,"\\n"]],"parameters":[1]},null],[0," "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"label"],[9],[0,"\\n "],[7,"p"],[11,"class","label"],[9],[0,"Kind:"],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[7,"select"],[11,"required",""],[12,"onchange",[29,"action",[[24,0,[]],[29,"mut",[[25,["kind"]]],null]],[["value"],["target.value"]]]],[9],[0,"\\n "],[7,"option"],[11,"value",""],[11,"selected",""],[11,"disabled",""],[11,"hidden",""],[9],[10],[0,"\\n "],[7,"option"],[11,"value","community"],[12,"selected",[29,"eq",[[25,["kind"]],"community"],null]],[9],[0,"Community"],[10],[0,"\\n "],[7,"option"],[11,"value","design"],[12,"selected",[29,"eq",[[25,["kind"]],"design"],null]],[9],[0,"Design"],[10],[0,"\\n "],[7,"option"],[11,"value","dev"],[12,"selected",[29,"eq",[[25,["kind"]],"dev"],null]],[9],[0,"Development"],[10],[0,"\\n "],[7,"option"],[11,"value","docs"],[12,"selected",[29,"eq",[[25,["kind"]],"docs"],null]],[9],[0,"Documentation"],[10],[0,"\\n "],[7,"option"],[11,"value","ops"],[12,"selected",[29,"eq",[[25,["kind"]],"ops"],null]],[9],[0,"IT Operations"],[10],[0,"\\n "],[7,"option"],[11,"value","special"],[12,"selected",[29,"eq",[[25,["kind"]],"special"],null]],[9],[0,"Special"],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"label"],[9],[0,"\\n "],[7,"p"],[11,"class","label"],[9],[0,"Date:"],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"ember-flatpickr",null,[["date","defaultDate","maxDate","enableTime","time_24hr","onChange"],[[25,["date"]],[25,["defaultDate"]],[25,["defaultDate"]],true,true,[29,"action",[[24,0,[]],[29,"mut",[[25,["date"]]],null]],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"label"],[9],[0,"\\n "],[7,"p"],[11,"class","label"],[9],[0,"Amount:"],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"input",null,[["type","placeholder","value","class"],["text","500",[25,["amount"]],[29,"if",[[25,["isValidAmount"]],"valid",""],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"label"],[9],[0,"\\n "],[7,"p"],[11,"class","label"],[9],[0,"Description:"],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"input",null,[["type","value","class"],["text",[25,["description"]],[29,"if",[[25,["isValidDescription"]],"valid",""],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n "],[7,"label"],[9],[0,"\\n "],[7,"p"],[11,"class","label"],[9],[0,"URL (optional):"],[10],[0,"\\n "],[7,"p"],[9],[0,"\\n "],[1,[29,"input",null,[["type","value","class"],["text",[25,["url"]],[29,"if",[[25,["isValidUrl"]],"valid",""],null]]]],false],[0,"\\n "],[10],[0,"\\n "],[10],[0,"\\n\\n "],[7,"p"],[11,"class","actions"],[9],[0,"\\n "],[1,[29,"input",null,[["type","disabled","value"],["submit",[25,["inProgress"]],[29,"if",[[25,["inProgress"]],"Processing","Save"],null]]]],false],[0,"\\n "],[10],[0,"\\n"],[3,"action",[[24,0,[]],"submit"],[["on"],["submit"]]],[10],[0,"\\n\\n"]],"hasEval":false}',meta:{moduleName:"kredits-web/components/add-contribution/template.hbs"}})
e.default=t}),define("kredits-web/components/add-contributor/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 e.default=t}),define("kredits-web/components/add-contributor/component",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0
var t=Ember.Component.extend({kredits:Ember.inject.service(),attributes:null,isValidAccount:Ember.computed.notEmpty("account"),isValidName:Ember.computed.notEmpty("name"),isValidURL:Ember.computed.notEmpty("url"),isValidGithubUID:Ember.computed.notEmpty("github_uid"),isValidGithubUsername:Ember.computed.notEmpty("github_username"),isValidGiteaUsername:Ember.computed.notEmpty("gitea_username"),isValidWikiUsername:Ember.computed.notEmpty("wiki_username"),isValid:Ember.computed.and("isValidAccount","isValidName","isValidGithubUID"),inProgress:!1,init:function(){this._super.apply(this,arguments),this.setDefaultAttributes(),this.reset()},setDefaultAttributes:function(){Ember.isPresent(this.attributes)||this.set("attributes",{account:null,name:null,kind:"person",url:null,github_username:null,github_uid:null,gitea_username:null,wiki_username:null})},reset:function(){this.setProperties(this.attributes)},actions:{submit:function(){var e=this var t=Ember.Component.extend({kredits:Ember.inject.service(),attributes:null,isValidAccount:Ember.computed.notEmpty("account"),isValidName:Ember.computed.notEmpty("name"),isValidURL:Ember.computed.notEmpty("url"),isValidGithubUID:Ember.computed.notEmpty("github_uid"),isValidGithubUsername:Ember.computed.notEmpty("github_username"),isValidGiteaUsername:Ember.computed.notEmpty("gitea_username"),isValidWikiUsername:Ember.computed.notEmpty("wiki_username"),isValid:Ember.computed.and("isValidAccount","isValidName","isValidGithubUID"),inProgress:!1,init:function(){this._super.apply(this,arguments),this.setDefaultAttributes(),this.reset()},setDefaultAttributes:function(){Ember.isPresent(this.attributes)||this.set("attributes",{account:null,name:null,kind:"person",url:null,github_username:null,github_uid:null,gitea_username:null,wiki_username:null})},reset:function(){this.setProperties(this.attributes)},actions:{submit:function(){var e=this
if(this.isValid){var t=Object.keys(this.attributes),n=this.getProperties(t) if(this.isValid){var t=Object.keys(this.attributes),n=this.getProperties(t)
@@ -227,6 +227,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),o=n.findBy("value",r) r&&r.forEach(function(e){var r=Ember.get(e,t),o=n.findBy("value",r)
Ember.isPresent(o)?Ember.get(o,"items").push(e):(o={property:t,value:r,items:[e]},n.push(o))}) Ember.isPresent(o)?Ember.get(o,"items").push(e):(o={property:t,value:r,items:[e]},n.push(o))})
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 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.6.0+9c185935"}) 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.7.0+a4ca37d8"})
//# sourceMappingURL=kredits-web-5f06b09fcae8e71e8bd8383472861ab4.map //# sourceMappingURL=kredits-web-d10376425f05f7b4f82219223591f0de.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+3 -3
View File
@@ -8,10 +8,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="kredits-web/config/environment" content="%7B%22modulePrefix%22%3A%22kredits-web%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22auto%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%2C%22_JQUERY_INTEGRATION%22%3Atrue%7D%2C%22APP%22%3A%7B%22name%22%3A%22kredits-web%22%2C%22version%22%3A%221.6.0%2B9c185935%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" /> <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.7.0%2Ba4ca37d8%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/vendor-179cf27a97ea5bbb0ce72403a401cc8c.css">
<link integrity="" rel="stylesheet" href="/assets/kredits-web-a396c24a9ca056f27e5b65609d59b97e.css"> <link integrity="" rel="stylesheet" href="/assets/kredits-web-e95be4cbe614c5aa4c7a891c6eedb028.css">
@@ -25,7 +25,7 @@
<script src="/assets/vendor-d84a577c9f0624a0b15861936fe740f2.js" integrity="sha256-o5SitqUpXKccldebvatDY/WvXTbEnAu/IA/TyvBxU0U= sha512-gDMabciAMuF89anreuu39lAYDOf6tXMMHxVRUxtqGpmhJdSAUQGFQ2MWTgE8mt+8GvGvPxw9QvnHuBJDK34YVw==" ></script> <script src="/assets/vendor-d84a577c9f0624a0b15861936fe740f2.js" integrity="sha256-o5SitqUpXKccldebvatDY/WvXTbEnAu/IA/TyvBxU0U= sha512-gDMabciAMuF89anreuu39lAYDOf6tXMMHxVRUxtqGpmhJdSAUQGFQ2MWTgE8mt+8GvGvPxw9QvnHuBJDK34YVw==" ></script>
<script src="/assets/kredits-web-4b35839b5ed8ad1ce819c960f4750ade.js" integrity="sha256-NdPT2sp5XKdQ8vqjEtAXPx3MG48ey1tEEkarF7MuAjs= sha512-cw3EEhGyW7lz2MWd3pXsN/FvxSeye7iP52/fIDImMyhOI6lkj1on8R67ZfMR5e/5sQKTQOnD4Qdg/lp1jb9Zqg==" ></script> <script src="/assets/kredits-web-abcf1575c8eb056a923a583efdc2d00f.js" integrity="sha256-IEH1g/CviSkQ/8acQOgUqB1iPBlXgsJlGJqsAzs9iqg= sha512-znuWeezXPnfkekpebFEC/4uVT0DjHS52ORURS11H7+kCtgyMjLqvSS8it/GzLxSsameIUaoMsvctqhL8f+atMg==" ></script>
</body> </body>