Style user address (with username seperate from host)

This commit is contained in:
2017-12-26 12:03:40 +01:00
parent 0a41be32fd
commit e38e873dd2
7 changed files with 52 additions and 7 deletions

View File

@@ -0,0 +1,18 @@
import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
classNames: ['account-info'],
userAddress: null,
username: computed('userAddress', function() {
return this.get('userAddress').split('@')[0];
}),
host: computed('userAddress', function() {
return '@' + this.get('userAddress').split('@')[1];
})
});

View File

@@ -0,0 +1,2 @@
<span class="username">{{username}}</span>
<br><span class="host">{{host}}</span>