Add account badge #31

Merged
bumi merged 4 commits from feature/account-badge into master 2018-04-06 15:54:54 +00:00
bumi commented 2018-04-06 14:48:47 +00:00 (Migrated from github.com)

This gives easy access to test if the "user/visitor" has an account, is i
a contributor and if she is core.

Right now I am using this to display an account badge the the name and the account. - currently not styled.

This gives easy access to test if the "user/visitor" has an account, is i a contributor and if she is core. Right now I am using this to display an account badge the the name and the account. - currently not styled.
fsmanuel (Migrated from github.com) requested changes 2018-04-06 15:19:23 +00:00
fsmanuel (Migrated from github.com) left a comment

❤️ left some comments

❤️ left some comments
fsmanuel (Migrated from github.com) commented 2018-04-06 15:10:34 +00:00

You can add:
import { isEmpty, isPresent } from 'ember-utils';
and make this return isPresent(this.get('currentUser'));

You can add: `import { isEmpty, isPresent } from 'ember-utils';` and make this `return isPresent(this.get('currentUser'));`
fsmanuel (Migrated from github.com) commented 2018-04-06 15:10:48 +00:00

^^

^^
fsmanuel (Migrated from github.com) commented 2018-04-06 15:10:56 +00:00

^^

^^
fsmanuel (Migrated from github.com) commented 2018-04-06 15:12:55 +00:00

👍

👍
fsmanuel (Migrated from github.com) commented 2018-04-06 15:13:58 +00:00

We import RSVP so you can use it without Ember

We import `RSVP` so you can use it without `Ember`
fsmanuel (Migrated from github.com) commented 2018-04-06 15:14:07 +00:00

^^

^^
fsmanuel (Migrated from github.com) commented 2018-04-06 15:14:48 +00:00

let address = this.get('currentUserAccounts.firstObject')

`let address = this.get('currentUserAccounts.firstObject')`
fsmanuel (Migrated from github.com) commented 2018-04-06 15:15:15 +00:00

id = id.toNumber()

`id = id.toNumber()`
fsmanuel (Migrated from github.com) commented 2018-04-06 15:15:42 +00:00

if (id === 0)

`if (id === 0)`
@@ -1,8 +1,19 @@
{{#if kredits.hasAccounts }}
fsmanuel (Migrated from github.com) commented 2018-04-06 15:18:33 +00:00

I would indent it like this:

{{#if kredits.hasAccounts }}
  <section id="user-account">
    {{!-- ... --}}
  </section>
{{/if}}
I would indent it like this: ```hbs {{#if kredits.hasAccounts }} <section id="user-account"> {{!-- ... --}} </section> {{/if}} ```
bumi commented 2018-04-06 15:41:19 +00:00 (Migrated from github.com)

guess this should get some styling before we merge it.

guess this should get some styling before we merge it.
fsmanuel (Migrated from github.com) approved these changes 2018-04-06 15:54:45 +00:00
fsmanuel (Migrated from github.com) left a comment

👏

👏
Sign in to join this conversation.