Add simple loading indicator
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
|
||||
classNames: ['loading-spinner']
|
||||
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
Loading data from Ethereum...
|
||||
</p>
|
||||
@@ -17,7 +17,6 @@ export default Ember.Route.extend({
|
||||
kredits: Ember.inject.service(),
|
||||
|
||||
model() {
|
||||
|
||||
return Ember.RSVP.hash({
|
||||
contributors: this.get('kredits').getContributors()
|
||||
});
|
||||
|
||||
@@ -67,5 +67,6 @@ section {
|
||||
}
|
||||
}
|
||||
|
||||
@import "components/loading-spinner";
|
||||
@import "components/contributor-list";
|
||||
@import "components/add-contributor";
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
.loading-spinner {
|
||||
|
||||
margin-top: 14rem;
|
||||
text-align: center;
|
||||
font-size: 1.4rem;
|
||||
color: lightblue;
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{{loading-spinner}}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { moduleForComponent, test } from 'ember-qunit';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
moduleForComponent('loading-spinner', 'Integration | Component | loading spinner', {
|
||||
integration: true
|
||||
});
|
||||
|
||||
test('it renders', function(assert) {
|
||||
|
||||
// Set any properties with this.set('myProperty', 'value');
|
||||
// Handle any actions with this.on('myAction', function(val) { ... });
|
||||
|
||||
this.render(hbs`{{loading-spinner}}`);
|
||||
|
||||
assert.equal(this.$().text().trim(), '');
|
||||
});
|
||||
Reference in New Issue
Block a user