Update user.tag
This commit is contained in:
parent
030dbbc2eb
commit
0350673862
1 changed files with 11 additions and 8 deletions
|
@ -34,18 +34,21 @@
|
||||||
<script>
|
<script>
|
||||||
this.mixin('api');
|
this.mixin('api');
|
||||||
|
|
||||||
this.username = this.opts.user
|
this.username = this.opts.user;
|
||||||
this.page = if this.opts.page? then this.opts.page else 'home'
|
this.page = this.opts.page ? this.opts.page : 'home';
|
||||||
this.fetching = true
|
this.fetching = true;
|
||||||
this.user = null
|
this.user = null;
|
||||||
|
|
||||||
this.on('mount', () => {
|
this.on('mount', () => {
|
||||||
this.api('users/show', {
|
this.api('users/show', {
|
||||||
username: this.username
|
username: this.username
|
||||||
}).then((user) => {
|
}).then(user => {
|
||||||
this.fetching = false
|
this.update({
|
||||||
this.user = user
|
fetching: false,
|
||||||
this.update();
|
user: user
|
||||||
|
});
|
||||||
this.trigger('loaded');
|
this.trigger('loaded');
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</mk-user>
|
</mk-user>
|
||||||
|
|
Loading…
Reference in a new issue