Fix missing username conversions (#3922)

This commit is contained in:
MeiMei 2019-01-19 08:28:46 +09:00 committed by syuilo
parent fa051df381
commit 160f424466
7 changed files with 21 additions and 20 deletions

View File

@ -4,8 +4,13 @@
<header><b><router-link :to="blackUser | userPage"><mk-user-name :user="blackUser"/></router-link></b>({{ $t('@.reversi.black') }}) vs <b><router-link :to="whiteUser | userPage"><mk-user-name :user="whiteUser"/></router-link></b>({{ $t('@.reversi.white') }})</header> <header><b><router-link :to="blackUser | userPage"><mk-user-name :user="blackUser"/></router-link></b>({{ $t('@.reversi.black') }}) vs <b><router-link :to="whiteUser | userPage"><mk-user-name :user="whiteUser"/></router-link></b>({{ $t('@.reversi.white') }})</header>
<div style="overflow: hidden; line-height: 28px;"> <div style="overflow: hidden; line-height: 28px;">
<p class="turn" v-if="!iAmPlayer && !game.isEnded">{{ $t('@.reversi.turn-of', { name: $options.filters.userName(turnUser) }) }}<mk-ellipsis/></p> <p class="turn" v-if="!iAmPlayer && !game.isEnded">
<p class="turn" v-if="logPos != logs.length">{{ $t('@.reversi.past-turn-of', { name: $options.filters.userName(turnUser) }) }}</p> <misskey-flavored-markdown :text="$t('@.reversi.turn-of', { name: $options.filters.userName(turnUser) })" :shouldBreak="false" :plainText="true" :custom-emojis="turnUser.emojis"/>
<mk-ellipsis/>
</p>
<p class="turn" v-if="logPos != logs.length">
<misskey-flavored-markdown :text="$t('@.reversi.past-turn-of', { name: $options.filters.userName(turnUser) })" :shouldBreak="false" :plainText="true" :custom-emojis="turnUser.emojis"/>
</p>
<p class="turn1" v-if="iAmPlayer && !game.isEnded && !isMyTurn">{{ $t('@.reversi.opponent-turn') }}<mk-ellipsis/></p> <p class="turn1" v-if="iAmPlayer && !game.isEnded && !isMyTurn">{{ $t('@.reversi.opponent-turn') }}<mk-ellipsis/></p>
<p class="turn2" v-if="iAmPlayer && !game.isEnded && isMyTurn" v-animate-css="{ classes: 'tada', iteration: 'infinite' }">{{ $t('@.reversi.my-turn') }}</p> <p class="turn2" v-if="iAmPlayer && !game.isEnded && isMyTurn" v-animate-css="{ classes: 'tada', iteration: 'infinite' }">{{ $t('@.reversi.my-turn') }}</p>
<p class="result" v-if="game.isEnded && logPos == logs.length"> <p class="result" v-if="game.isEnded && logPos == logs.length">

View File

@ -1,7 +1,8 @@
<template> <template>
<div class="syxhndwprovvuqhmyvveewmbqayniwkv" v-if="!fetching"> <div class="syxhndwprovvuqhmyvveewmbqayniwkv" v-if="!fetching">
<div class="signed-in-as" v-html="this.$t('signed-in-as').replace('{}', `<b>${myName}`)"></div> <div class="signed-in-as">
<misskey-flavored-markdown :text="$t('signed-in-as').replace('{}', myName)" :shouldBreak="false" :plainText="true" :custom-emojis="$store.state.i.emojis"/>
</div>
<main> <main>
<div class="banner" :style="bannerStyle"></div> <div class="banner" :style="bannerStyle"></div>
<mk-avatar class="avatar" :user="user" :disable-preview="true"/> <mk-avatar class="avatar" :user="user" :disable-preview="true"/>
@ -127,6 +128,7 @@ export default Vue.extend({
> .signed-in-as > .signed-in-as
margin-bottom 16px margin-bottom 16px
font-size 14px font-size 14px
font-weight bold
> main > main
margin-bottom 16px margin-bottom 16px

View File

@ -1,7 +1,7 @@
<template> <template>
<x-column> <x-column>
<span slot="header"> <span slot="header">
<fa :icon="['far', 'comment-alt']"/><span>{{ title }}</span> <fa :icon="['far', 'comment-alt']"/><mk-user-name :user="note.user" v-if="note"/>
</span> </span>
<div class="rvtscbadixhhbsczoorqoaygovdeecsx" v-if="note"> <div class="rvtscbadixhhbsczoorqoaygovdeecsx" v-if="note">
@ -45,12 +45,6 @@ export default Vue.extend({
}; };
}, },
computed: {
title(): string {
return this.note ? Vue.filter('userName')(this.note.user) : '';
}
},
created() { created() {
this.$root.api('notes/show', { noteId: this.noteId }).then(note => { this.$root.api('notes/show', { noteId: this.noteId }).then(note => {
this.note = note; this.note = note;

View File

@ -1,7 +1,7 @@
<template> <template>
<x-column> <x-column>
<span slot="header"> <span slot="header">
<fa icon="user"/><span>{{ title }}</span> <fa icon="user"/><mk-user-name :user="user" v-if="user"/>
</span> </span>
<div class="zubukjlciycdsyynicqrnlsmdwmymzqu" v-if="user"> <div class="zubukjlciycdsyynicqrnlsmdwmymzqu" v-if="user">
@ -137,10 +137,6 @@ export default Vue.extend({
}, },
computed: { computed: {
title(): string {
return this.user ? Vue.filter('userName')(this.user) : '';
},
bannerStyle(): any { bannerStyle(): any {
if (this.user == null) return {}; if (this.user == null) return {};
if (this.user.bannerUrl == null) return {}; if (this.user.bannerUrl == null) return {};

View File

@ -1,7 +1,8 @@
<template> <template>
<mk-ui> <mk-ui>
<template slot="header" v-if="!fetching"> <template slot="header" v-if="!fetching">
<img :src="user.avatarUrl" alt="">{{ $t('followers-of', { name }) }} <img :src="user.avatarUrl" alt="">
<misskey-flavored-markdown :text="$t('followers-of', { name })" :shouldBreak="false" :plainText="true" :custom-emojis="user.emojis"/>
</template> </template>
<mk-users-list <mk-users-list
v-if="!fetching" v-if="!fetching"

View File

@ -1,7 +1,8 @@
<template> <template>
<mk-ui> <mk-ui>
<template slot="header" v-if="!fetching"> <template slot="header" v-if="!fetching">
<img :src="user.avatarUrl" alt="">{{ $t('following-of', { name }) }} <img :src="user.avatarUrl" alt="">
<misskey-flavored-markdown :text="$t('following-of', { name })" :shouldBreak="false" :plainText="true" :custom-emojis="user.emojis"/>
</template> </template>
<mk-users-list <mk-users-list
v-if="!fetching" v-if="!fetching"

View File

@ -2,8 +2,9 @@
<mk-ui> <mk-ui>
<span slot="header"><span style="margin-right:4px;"><fa icon="cog"/></span>{{ $t('settings') }}</span> <span slot="header"><span style="margin-right:4px;"><fa icon="cog"/></span>{{ $t('settings') }}</span>
<main> <main>
<div class="signin-as" v-html="this.$t('signed-in-as').replace('{}', `<b>${name}</b>`)"></div> <div class="signed-in-as">
<misskey-flavored-markdown :text="$t('signed-in-as').replace('{}', name)" :shouldBreak="false" :plainText="true" :custom-emojis="$store.state.i.emojis"/>
</div>
<div> <div>
<x-profile-editor/> <x-profile-editor/>
@ -381,6 +382,7 @@ main
color var(--mobileSignedInAsFg) color var(--mobileSignedInAsFg)
background var(--mobileSignedInAsBg) background var(--mobileSignedInAsBg)
box-shadow 0 3px 1px -2px rgba(#000, 0.2), 0 2px 2px 0 rgba(#000, 0.14), 0 1px 5px 0 rgba(#000, 0.12) box-shadow 0 3px 1px -2px rgba(#000, 0.2), 0 2px 2px 0 rgba(#000, 0.14), 0 1px 5px 0 rgba(#000, 0.12)
font-weight bold
> .signout > .signout
margin 16px margin 16px