Skip to content

Commit

Permalink
フォロー/フォロワー リストにフォローされてるか表示するように
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Apr 13, 2019
1 parent 07de04c commit 811956b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ common/views/components/url-preview.vue:
disable-player: "Close the player"
common/views/components/user-list.vue:
no-users: "There are no users."
follows-you: "Follows you"
common/views/components/games/reversi/reversi.vue:
matching:
waiting-for: "Waiting for {}"
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ common/views/components/url-preview.vue:

common/views/components/user-list.vue:
no-users: "ユーザーがいません"
follows-you: "あなたをフォローしています"

common/views/components/games/reversi/reversi.vue:
matching:
Expand Down
22 changes: 18 additions & 4 deletions src/client/app/common/views/components/user-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<div class="name">
<router-link class="name" :to="user | userPage" v-user-preview="user.id"><mk-user-name :user="user"/></router-link>
<p class="username">@{{ user | acct }}</p>
<p class="followed" v-if="showFollows && user.isFollowed">{{ $t('follows-you') }}</p>
</div>
<div class="description" v-if="user.description" :title="user.description">
<mfm :text="user.description" :is-note="false" :author="user" :i="$store.state.i" :custom-emojis="user.emojis" :should-break="false" :plain-text="true"/>
Expand Down Expand Up @@ -42,7 +43,11 @@ export default Vue.extend({
iconOnly: {
type: Boolean,
default: false
}
},
showFollows: {
type: Boolean,
default: false
},
},
data() {
Expand Down Expand Up @@ -148,8 +153,17 @@ export default Vue.extend({
> .username
display block
margin 0
font-size 15px
line-height 16px
font-size 13px
line-height 13px
color var(--text)
opacity 0.7
> .followed
display inline-block
margin 0
font-size 11px
font-style italic
margin-top: 2px
color var(--text)
opacity 0.7
Expand All @@ -166,7 +180,7 @@ export default Vue.extend({
> .follow-button
position absolute
top 8px
top 0px
right 0px
> .more
Expand Down
2 changes: 1 addition & 1 deletion src/client/app/common/views/pages/followers.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<mk-user-list :make-promise="makePromise">{{ $t('@.followers') }}</mk-user-list>
<mk-user-list :make-promise="makePromise" :showFollows="true">{{ $t('@.followers') }}</mk-user-list>
</div>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/client/app/common/views/pages/following.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<mk-user-list :make-promise="makePromise">{{ $t('@.following') }}</mk-user-list>
<mk-user-list :make-promise="makePromise" :showFollows="true">{{ $t('@.following') }}</mk-user-list>
</div>
</template>

Expand Down

0 comments on commit 811956b

Please sign in to comment.