mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 05:23:08 +02:00
✌️
This commit is contained in:
parent
7ee3f63eff
commit
5c497d7563
4 changed files with 10 additions and 10 deletions
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<div class="root">
|
||||
<header><b>{{ blackUser.name }}</b>(%i18n:common.reversi.black%) vs <b>{{ whiteUser.name }}</b>(%i18n:common.reversi.white%)</header>
|
||||
<header><b>{{ blackUser | userName }}</b>(%i18n:common.reversi.black%) vs <b>{{ whiteUser | userName }}</b>(%i18n:common.reversi.white%)</header>
|
||||
|
||||
<div style="overflow: hidden">
|
||||
<p class="turn" v-if="!iAmPlayer && !game.isEnded">{{ '%i18n:common.reversi.turn-of%'.replace('{}', turnUser.name) }}<mk-ellipsis/></p>
|
||||
<p class="turn" v-if="logPos != logs.length">{{ '%i18n:common.reversi.past-turn-of%'.replace('{}', turnUser.name) }}</p>
|
||||
<p class="turn" v-if="!iAmPlayer && !game.isEnded">{{ '%i18n:common.reversi.turn-of%'.replace('{}', turnUser | userName) }}<mk-ellipsis/></p>
|
||||
<p class="turn" v-if="logPos != logs.length">{{ '%i18n:common.reversi.past-turn-of%'.replace('{}', turnUser | userName) }}</p>
|
||||
<p class="turn1" v-if="iAmPlayer && !game.isEnded && !isMyTurn">%i18n:common.reversi.opponent-turn%<mk-ellipsis/></p>
|
||||
<p class="turn2" v-if="iAmPlayer && !game.isEnded && isMyTurn" v-animate-css="{ classes: 'tada', iteration: 'infinite' }">%i18n:common.reversi.my-turn%</p>
|
||||
<p class="result" v-if="game.isEnded && logPos == logs.length">
|
||||
<template v-if="game.winner">{{ '%i18n:common.reversi.won%'.replace('{}', game.winner.name) }}{{ game.settings.isLlotheo ? ' (ロセオ)' : '' }}</template>
|
||||
<template v-if="game.winner">{{ '%i18n:common.reversi.won%'.replace('{}', game.winner | userName) }}{{ game.settings.isLlotheo ? ' (ロセオ)' : '' }}</template>
|
||||
<template v-else>%i18n:common.reversi.drawn%</template>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="root">
|
||||
<header><b>{{ game.user1.name }}</b> vs <b>{{ game.user2.name }}</b></header>
|
||||
<header><b>{{ game.user1 | userName }}</b> vs <b>{{ game.user2 | userName }}</b></header>
|
||||
|
||||
<div>
|
||||
<p>%i18n:@settings-of-the-game%</p>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<x-gameroom :game="game"/>
|
||||
</div>
|
||||
<div class="matching" v-else-if="matching">
|
||||
<h1>{{ '%i18n:@matching.waiting-for%'.split('{}')[0] }}<b>{{ matching.name }}</b>{{ '%i18n:@matching.waiting-for%'.split('{}')[1] }}<mk-ellipsis/></h1>
|
||||
<h1>{{ '%i18n:@matching.waiting-for%'.split('{}')[0] }}<b>{{ matching | userName }}</b>{{ '%i18n:@matching.waiting-for%'.split('{}')[1] }}<mk-ellipsis/></h1>
|
||||
<div class="cancel">
|
||||
<el-button round @click="cancel">%i18n:@matching.cancel%</el-button>
|
||||
</div>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<h2>%i18n:@invitations%</h2>
|
||||
<div class="invitation" v-for="i in invitations" tabindex="-1" @click="accept(i)">
|
||||
<mk-avatar class="avatar" :user="i.parent"/>
|
||||
<span class="name"><b>{{ i.parent.name }}</b></span>
|
||||
<span class="name"><b>{{ i.parent | userName }}</b></span>
|
||||
<span class="username">@{{ i.parent.username }}</span>
|
||||
<mk-time :time="i.createdAt"/>
|
||||
</div>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<a class="game" v-for="g in myGames" tabindex="-1" @click.prevent="go(g)" :href="`/reversi/${g.id}`">
|
||||
<mk-avatar class="avatar" :user="g.user1"/>
|
||||
<mk-avatar class="avatar" :user="g.user2"/>
|
||||
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
||||
<span><b>{{ g.user1 | userName }}</b> vs <b>{{ g.user2 | userName }}</b></span>
|
||||
<span class="state">{{ g.isEnded ? '%i18n:@game-state.ended%' : '%i18n:@game-state.playing%' }}</span>
|
||||
</a>
|
||||
</section>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<a class="game" v-for="g in games" tabindex="-1" @click.prevent="go(g)" :href="`/reversi/${g.id}`">
|
||||
<mk-avatar class="avatar" :user="g.user1"/>
|
||||
<mk-avatar class="avatar" :user="g.user2"/>
|
||||
<span><b>{{ g.user1.name }}</b> vs <b>{{ g.user2.name }}</b></span>
|
||||
<span><b>{{ g.user1 | userName }}</b> vs <b>{{ g.user2 | userName }}</b></span>
|
||||
<span class="state">{{ g.isEnded ? '%i18n:@game-state.ended%' : '%i18n:@game-state.playing%' }}</span>
|
||||
</a>
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { IUser } from '../models/user';
|
||||
|
||||
export default function(user: IUser): string {
|
||||
return user.name || '名無し';
|
||||
return user.name || user.username;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue