ユーザーが存在しない場合の表示を追加

This commit is contained in:
syuilo 2019-02-18 11:27:15 +09:00
parent 92a4e90026
commit d9092dc81f
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 13 additions and 0 deletions

View File

@ -232,6 +232,9 @@ common/views/pages/explore.vue:
popular-tags: "人気のタグ" popular-tags: "人気のタグ"
federated: "連合" federated: "連合"
common/views/components/user-list.vue:
no-users: "ユーザーがいません"
common/views/components/games/reversi/reversi.vue: common/views/components/games/reversi/reversi.vue:
matching: matching:
waiting-for: "{}を待っています" waiting-for: "{}を待っています"

View File

@ -5,6 +5,9 @@
<mk-error v-if="!fetching && !inited" @retry="init()"/> <mk-error v-if="!fetching && !inited" @retry="init()"/>
<div class="efvhhmdq" v-size="[{ lt: 500, class: 'narrow' }]"> <div class="efvhhmdq" v-size="[{ lt: 500, class: 'narrow' }]">
<div class="no-users" v-if="inited && us.length == 0">
<p>{{ $t('no-users') }}</p>
</div>
<div class="user" v-for="user in us"> <div class="user" v-for="user in us">
<mk-avatar class="avatar" :user="user"/> <mk-avatar class="avatar" :user="user"/>
<div class="body"> <div class="body">
@ -26,8 +29,11 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from 'vue';
import i18n from '../../../i18n';
export default Vue.extend({ export default Vue.extend({
i18n: i18n('common/views/components/user-list.vue'),
props: { props: {
makePromise: { makePromise: {
required: true required: true
@ -92,6 +98,10 @@ export default Vue.extend({
> .user > .body > .description > .user > .body > .description
display none display none
> .no-users
text-align center
color var(--text)
> .user > .user
display flex display flex
padding 16px padding 16px