Add simple loading indicator

This commit is contained in:
2017-02-04 22:30:58 +08:00
parent f1ea335f9d
commit 2002f2feba
7 changed files with 36 additions and 1 deletions
@@ -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>
-1
View File
@@ -17,7 +17,6 @@ export default Ember.Route.extend({
kredits: Ember.inject.service(), kredits: Ember.inject.service(),
model() { model() {
return Ember.RSVP.hash({ return Ember.RSVP.hash({
contributors: this.get('kredits').getContributors() contributors: this.get('kredits').getContributors()
}); });
+1
View File
@@ -67,5 +67,6 @@ section {
} }
} }
@import "components/loading-spinner";
@import "components/contributor-list"; @import "components/contributor-list";
@import "components/add-contributor"; @import "components/add-contributor";
@@ -0,0 +1,8 @@
.loading-spinner {
margin-top: 14rem;
text-align: center;
font-size: 1.4rem;
color: lightblue;
}
+1
View File
@@ -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(), '');
});