diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-08-30 18:06:16 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-08-30 18:06:16 +0900 |
| commit | 5d9572cda22b89621cae4132b47ec2caaac07a22 (patch) | |
| tree | 300cbda49474f46186857d9f96b9706d7c990508 /src/web | |
| parent | Implement #745 (diff) | |
| download | sharkey-5d9572cda22b89621cae4132b47ec2caaac07a22.tar.gz sharkey-5d9572cda22b89621cae4132b47ec2caaac07a22.tar.bz2 sharkey-5d9572cda22b89621cae4132b47ec2caaac07a22.zip | |
モバイル版のユーザーページに知り合いのフォロワーを表示するように
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/app/mobile/tags/user.tag | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/web/app/mobile/tags/user.tag b/src/web/app/mobile/tags/user.tag index 5fc43269d6..83231f01d7 100644 --- a/src/web/app/mobile/tags/user.tag +++ b/src/web/app/mobile/tags/user.tag @@ -234,6 +234,12 @@ <mk-user-overview-activity-chart user={ user }/> </div> </section> + <section class="followers-you-know" if={ SIGNIN && I.id !== user.id }> + <h2><i class="fa fa-users"></i>%i18n:mobile.tags.mk-user-overview.followers-you-know%</h2> + <div> + <mk-user-overview-followers-you-know user={ user }/> + </div> + </section> <p>%i18n:mobile.tags.mk-user-overview.last-used-at%: <b><mk-time time={ user.last_used_at }/></b></p> <style> :scope @@ -276,6 +282,8 @@ </style> <script> + this.mixin('i'); + this.user = this.opts.user; </script> </mk-user-overview> @@ -530,3 +538,60 @@ }); </script> </mk-user-overview-activity-chart> + +<mk-user-overview-followers-you-know> + <p class="initializing" if={ initializing }><i class="fa fa-spinner fa-pulse fa-fw"></i>%i18n:mobile.tags.mk-user-overview-followers-you-know.loading%<mk-ellipsis/></p> + <div if={ !initializing && users.length > 0 }> + <virtual each={ user in users }> + <a href={ '/' + user.username }><img src={ user.avatar_url + '?thumbnail&size=64' } alt={ user.name }/></a> + </virtual> + </div> + <p class="empty" if={ !initializing && users.length == 0 }>%i18n:mobile.tags.mk-user-overview-followers-you-know.no-users%</p> + <style> + :scope + display block + + > div + padding 4px + + > a + display inline-block + margin 4px + + > img + width 48px + height 48px + vertical-align bottom + border-radius 100% + + > .initializing + > .empty + margin 0 + padding 16px + text-align center + color #aaa + + > i + margin-right 4px + + </style> + <script> + this.mixin('api'); + + this.user = this.opts.user; + this.initializing = true; + + this.on('mount', () => { + this.api('users/followers', { + user_id: this.user.id, + iknow: true, + limit: 30 + }).then(x => { + this.update({ + users: x.users, + initializing: false + }); + }); + }); + </script> +</mk-user-overview-followers-you-know> |