Upgrade to latest Ember, etc.
This commit is contained in:
+6
-8
@@ -1,14 +1,12 @@
|
||||
import Application from '@ember/application';
|
||||
import Resolver from './resolver';
|
||||
import Resolver from 'ember-resolver';
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from './config/environment';
|
||||
|
||||
const App = Application.extend({
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver
|
||||
});
|
||||
export default class App extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
podModulePrefix = config.podModulePrefix;
|
||||
Resolver = Resolver;
|
||||
}
|
||||
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
|
||||
export default App;
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import Resolver from 'ember-resolver';
|
||||
|
||||
export default Resolver;
|
||||
+4
-6
@@ -1,10 +1,10 @@
|
||||
import EmberRouter from '@ember/routing/router';
|
||||
import config from './config/environment';
|
||||
|
||||
const Router = EmberRouter.extend({
|
||||
location: config.locationType,
|
||||
rootURL: config.rootURL
|
||||
});
|
||||
export default class Router extends EmberRouter {
|
||||
location = config.locationType;
|
||||
rootURL = config.rootURL;
|
||||
}
|
||||
|
||||
Router.map(function() {
|
||||
this.route('dashboard', function() {
|
||||
@@ -33,5 +33,3 @@ Router.map(function() {
|
||||
this.route('complete');
|
||||
});
|
||||
});
|
||||
|
||||
export default Router;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{{loading-spinner}}
|
||||
<LoadingSpinner />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<header id="topbar">
|
||||
<h1>{{link-to "Kosmos Kredits" "dashboard"}}</h1>
|
||||
{{topbar-account-panel}}
|
||||
<h1><LinkTo @route="dashboard">Kosmos Kredits</LinkTo></h1>
|
||||
<TopbarAccountPanel />
|
||||
</header>
|
||||
|
||||
{{outlet}}
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
{{add-contribution contributors=sortedContributors
|
||||
attributes=model.params
|
||||
save=(action "save")}}
|
||||
<AddContribution @contributors={{sortedContributors}} @attributes={{model.params}} @save={{action "save"}} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
{{add-contribution attributes=attributes contributors=sortedContributors save=(action "save")}}
|
||||
<AddContribution @attributes={{attributes}} @contributors={{sortedContributors}} @save={{action "save"}} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
{{add-contributor attributes=attributes save=(action "save")}}
|
||||
<AddContributor @attributes={{attributes}} @save={{action "save"}} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
{{add-contributor save=(action "save")}}
|
||||
<AddContributor @save={{action "save"}} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
check out the
|
||||
<a href="https://wiki.kosmos.org/Kredits" target="_blank" rel="noopener">Kredits documentation</a>.
|
||||
If you want to start earning kredits for your contributions,
|
||||
{{link-to "create a contributor profile" "signup"}}.
|
||||
<LinkTo @route="signup">create a contributor profile</LinkTo>.
|
||||
</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -22,21 +22,19 @@
|
||||
<h2>Contributors</h2>
|
||||
{{#if kredits.hasAccounts}}
|
||||
<nav>
|
||||
{{link-to "add" "contributors.new" title="Add contributor profile" class="button small green"}}
|
||||
<LinkTo @route="contributors.new" @title="Add contributor profile" class="button small green">add</LinkTo>
|
||||
</nav>
|
||||
{{/if}}
|
||||
</header>
|
||||
<div class="content">
|
||||
{{contributor-list contributorList=kreditsToplist
|
||||
showUnconfirmedKredits=showUnconfirmedKredits
|
||||
selectedContributorId=selectedContributorId}}
|
||||
<ContributorList @contributorList={{kreditsToplist}} @showUnconfirmedKredits={{showUnconfirmedKredits}} @selectedContributorId={{selectedContributorId}} />
|
||||
|
||||
<p class="stats">
|
||||
<span class="number">{{await kredits.totalKreditsEarned}}</span> kredits confirmed and issued to
|
||||
<span class="number">{{contributorsWithKredits.length}}</span> contributors
|
||||
</p>
|
||||
<p class="stats">
|
||||
{{input type="checkbox" id="hide-unnconfirmed-kredits" checked=showUnconfirmedKredits}}
|
||||
<Input @type="checkbox" @id="hide-unnconfirmed-kredits" @checked={{showUnconfirmedKredits}} />
|
||||
<label for="hide-unnconfirmed-kredits">Show unconfirmed kredits in toplist</label>
|
||||
</p>
|
||||
</div>
|
||||
@@ -47,7 +45,7 @@
|
||||
<h2>Contributions by type</h2>
|
||||
</header>
|
||||
<div class="content">
|
||||
{{chart-contributions-by-type contributions=contributions}}
|
||||
<ChartContributionsByType @contributions={{contributions}} />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -60,17 +58,13 @@
|
||||
<nav>
|
||||
<button {{action "toggleQuickFilterUnconfirmed"}} class="small {{if showQuickFilterUnconfirmed "active"}}">filter</button>
|
||||
{{#if kredits.hasAccounts}}
|
||||
{{link-to "add" "contributions.new" title="Submit a contribution" class="button small green"}}
|
||||
<LinkTo @route="contributions.new" @title="Submit a contribution" class="button small green">add</LinkTo>
|
||||
{{/if}}
|
||||
</nav>
|
||||
</header>
|
||||
<div class="content">
|
||||
{{!-- TODO: We need a better naming for kredits.hasAccounts --}}
|
||||
{{contribution-list contributions=contributionsUnconfirmedSorted
|
||||
vetoContribution=(action "vetoContribution")
|
||||
contractInteractionEnabled=kredits.hasAccounts
|
||||
selectedContributionId=selectedContributionId
|
||||
showQuickFilter=showQuickFilterUnconfirmed}}
|
||||
<ContributionList @contributions={{contributionsUnconfirmedSorted}} @vetoContribution={{action "vetoContribution"}} @contractInteractionEnabled={{kredits.hasAccounts}} @selectedContributionId={{selectedContributionId}} @showQuickFilter={{showQuickFilterUnconfirmed}} />
|
||||
</div>
|
||||
</section>
|
||||
{{/if}}
|
||||
@@ -83,10 +77,7 @@
|
||||
</nav>
|
||||
</header>
|
||||
<div class="content">
|
||||
{{contribution-list contributions=contributionsConfirmedSorted
|
||||
vetoContribution=(action "vetoContribution")
|
||||
selectedContributionId=selectedContributionId
|
||||
showQuickFilter=showQuickFilterConfirmed}}
|
||||
<ContributionList @contributions={{contributionsConfirmedSorted}} @vetoContribution={{action "vetoContribution"}} @selectedContributionId={{selectedContributionId}} @showQuickFilter={{showQuickFilterConfirmed}} />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<div class="content">
|
||||
<p class="who-what-when">
|
||||
<span class="contributor">
|
||||
{{user-avatar contributor=model.contributor}}
|
||||
{{link-to model.contributor.name "dashboard.contributors.show" model.contributor}}
|
||||
<UserAvatar @contributor={{model.contributor}} />
|
||||
<LinkTo @route="dashboard.contributors.show" @model={{model.contributor}}>{{model.contributor.name}}</LinkTo>
|
||||
</span>
|
||||
contributed
|
||||
<span class="date" title={{model.iso8601Date}}>{{moment-from model.iso8601Date}}</span>:
|
||||
@@ -35,14 +35,14 @@
|
||||
{{#if model.vetoed}}
|
||||
<div class="hint vetoed">
|
||||
<div class="icon">
|
||||
{{icon-warning}}
|
||||
<IconWarning />
|
||||
</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"}}
|
||||
<LinkTo @route="contributions.resubmit" @model={{model}} class="button small green">Re-submit contribution …</LinkTo>
|
||||
</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<div class="actions">
|
||||
<p>
|
||||
{{link-to "Copy & edit as new" "contributions.resubmit" model class="button small"}}
|
||||
<LinkTo @route="contributions.resubmit" @model={{model}} class="button small">Copy & edit as new</LinkTo>
|
||||
{{#if model.ipfsHash}}
|
||||
<a href="{{ipfsGatewayUrl}}/{{model.ipfsHash}}"
|
||||
class="button small" target="_blank" rel="noopener">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<section id="contributor-profile">
|
||||
<header>
|
||||
{{user-avatar contributor=model size="medium"}}
|
||||
<UserAvatar @contributor={{model}} @size="medium" />
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
@@ -10,23 +10,21 @@
|
||||
<ul class="external-accounts">
|
||||
{{#each model.accounts as |account|}}
|
||||
<li>
|
||||
{{external-account-link account=account}}
|
||||
<ExternalAccountLink @account={{account}} />
|
||||
</li>
|
||||
{{/each}}
|
||||
{{#if model.url}}
|
||||
<li>
|
||||
<a href={{model.url}} target="_blank" rel="noopener" title="Website">
|
||||
<span class="site">Web</span>
|
||||
{{icon-web-globe}}
|
||||
<IconWebGlobe />
|
||||
</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
</ul>
|
||||
<div class="actions">
|
||||
<p>
|
||||
{{link-to "♥ Give kredits" "contributions.new"
|
||||
(query-params contributorId=model.id)
|
||||
class="button green"}}
|
||||
<LinkTo @route="contributions.new" @query={{hash contributorId=model.id}} class="button green">♥ Give kredits</LinkTo>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,7 +35,7 @@
|
||||
{{#if model.ipfsHash}}
|
||||
<a href="{{ipfsGatewayUrl}}/{{model.ipfsHash}}" class="button small" target="_blank" rel="noopener">Inspect IPFS profile</a>
|
||||
{{/if}}
|
||||
{{link-to "Edit profile" "contributors.edit" model class="button small"}}
|
||||
<LinkTo @route="contributors.edit" @model={{model}} class="button small">Edit profile</LinkTo>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</header>
|
||||
|
||||
<div class="content">
|
||||
{{add-proposal contributors=minedContributors save=(action "save")}}
|
||||
<AddProposal @contributors={{minedContributors}} @save={{action "save"}} />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
<a href="https://wiki.kosmos.org/Main_Page#Community_.2F_Getting_in_touch_.2F_Getting_involved">in one of our chat rooms</a>?.
|
||||
</p>
|
||||
<p class="actions">
|
||||
{{#link-to "dashboard" class="button small"}}Return to dashboard{{/link-to}}
|
||||
<LinkTo @route="dashboard" class="button small">Return to dashboard</LinkTo>
|
||||
</p>
|
||||
</div>
|
||||
@@ -10,9 +10,7 @@
|
||||
<p>
|
||||
<label>
|
||||
Ethereum account:<br>
|
||||
{{input type="text" value=ethAddress
|
||||
placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4"
|
||||
class=(if isValidEthAccount "valid" "")}}
|
||||
<Input @type="text" @value={{ethAddress}} placeholder="0xF18E631Ea191aE4ebE70046Fcb01a436554421BA4" class={{if isValidEthAccount "valid" ""}} />
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</p>
|
||||
<p class="actions">
|
||||
<button {{action "connectGithub"}} class="icon">
|
||||
{{icon-account-github-com}}
|
||||
<IconAccountGithubCom />
|
||||
Connect GitHub
|
||||
</button>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user