diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-06 00:46:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-06 00:46:00 +0900 |
| commit | 5ae6b0058ff4e5be19d4561713fc37e49be5ae1d (patch) | |
| tree | b1b74ecc078bb3efe57dff42ca4ca0e83a799e04 /src/client | |
| parent | 11.24.2 (diff) | |
| download | sharkey-5ae6b0058ff4e5be19d4561713fc37e49be5ae1d.tar.gz sharkey-5ae6b0058ff4e5be19d4561713fc37e49be5ae1d.tar.bz2 sharkey-5ae6b0058ff4e5be19d4561713fc37e49be5ae1d.zip | |
やった (#5110)
Diffstat (limited to 'src/client')
14 files changed, 31 insertions, 31 deletions
diff --git a/src/client/app/common/views/components/games/reversi/reversi.game.vue b/src/client/app/common/views/components/games/reversi/reversi.game.vue index 3f481e8eb5..a7c918aa71 100644 --- a/src/client/app/common/views/components/games/reversi/reversi.game.vue +++ b/src/client/app/common/views/components/games/reversi/reversi.game.vue @@ -5,17 +5,17 @@ <div style="overflow: hidden; line-height: 28px;"> <p class="turn" v-if="!iAmPlayer && !game.isEnded"> - <mfm :key="'turn:' + $options.filters.userName(turnUser)" :text="$t('@.reversi.turn-of', { name: $options.filters.userName(turnUser) })" :should-break="false" :plain-text="true" :custom-emojis="turnUser.emojis"/> + <mfm :key="'turn:' + $options.filters.userName(turnUser)" :text="$t('@.reversi.turn-of', { name: $options.filters.userName(turnUser) })" :plain="true" :custom-emojis="turnUser.emojis"/> <mk-ellipsis/> </p> <p class="turn" v-if="logPos != logs.length"> - <mfm :key="'past-turn-of:' + $options.filters.userName(turnUser)" :text="$t('@.reversi.past-turn-of', { name: $options.filters.userName(turnUser) })" :should-break="false" :plain-text="true" :custom-emojis="turnUser.emojis"/> + <mfm :key="'past-turn-of:' + $options.filters.userName(turnUser)" :text="$t('@.reversi.past-turn-of', { name: $options.filters.userName(turnUser) })" :plain="true" :custom-emojis="turnUser.emojis"/> </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="result" v-if="game.isEnded && logPos == logs.length"> <template v-if="game.winner"> - <mfm :key="'won'" :text="$t('@.reversi.won', { name: $options.filters.userName(game.winner) })" :should-break="false" :plain-text="true" :custom-emojis="game.winner.emojis"/> + <mfm :key="'won'" :text="$t('@.reversi.won', { name: $options.filters.userName(game.winner) })" :plain="true" :custom-emojis="game.winner.emojis"/> <span v-if="game.surrendered != null"> ({{ $t('surrendered') }})</span> </template> <template v-else>{{ $t('@.reversi.drawn') }}</template> diff --git a/src/client/app/common/views/components/mfm.ts b/src/client/app/common/views/components/mfm.ts index fa798504c7..561c3d8e30 100644 --- a/src/client/app/common/views/components/mfm.ts +++ b/src/client/app/common/views/components/mfm.ts @@ -22,11 +22,11 @@ export default Vue.component('misskey-flavored-markdown', { type: String, required: true }, - shouldBreak: { + plain: { type: Boolean, - default: true + default: false }, - plainText: { + nowrap: { type: Boolean, default: false }, @@ -50,7 +50,7 @@ export default Vue.component('misskey-flavored-markdown', { render(createElement) { if (this.text == null || this.text == '') return; - const ast = (this.plainText ? parsePlain : parse)(this.text); + const ast = (this.plain ? parsePlain : parse)(this.text); let bigCount = 0; let motionCount = 0; @@ -60,7 +60,7 @@ export default Vue.component('misskey-flavored-markdown', { case 'text': { const text = token.node.props.text.replace(/(\r\n|\n|\r)/g, '\n'); - if (this.shouldBreak) { + if (!this.plain) { const x = text.split('\n') .map(t => t == '' ? [createElement('br')] : [createElement('span', t), createElement('br')]); x[x.length - 1].pop(); @@ -270,7 +270,7 @@ export default Vue.component('misskey-flavored-markdown', { }, props: { customEmojis: this.customEmojis || customEmojis, - normal: this.plainText + normal: this.plain } })]; } diff --git a/src/client/app/common/views/components/misskey-flavored-markdown.vue b/src/client/app/common/views/components/misskey-flavored-markdown.vue index a0ecbecbb2..64496f9c84 100644 --- a/src/client/app/common/views/components/misskey-flavored-markdown.vue +++ b/src/client/app/common/views/components/misskey-flavored-markdown.vue @@ -1,5 +1,5 @@ <template> -<mfm-core v-bind="$attrs" class="havbbuyv" :class="{ plain: $attrs['plain-text'] }" v-once/> +<mfm-core v-bind="$attrs" class="havbbuyv" :class="{ nowrap: $attrs['nowrap'] }" v-once/> </template> <script lang="ts"> @@ -17,7 +17,7 @@ export default Vue.extend({ .havbbuyv white-space pre-wrap - &.plain + &.nowrap white-space pre >>> .title diff --git a/src/client/app/common/views/components/poll.vue b/src/client/app/common/views/components/poll.vue index dc3aaa34f3..bd5eeaf832 100644 --- a/src/client/app/common/views/components/poll.vue +++ b/src/client/app/common/views/components/poll.vue @@ -5,7 +5,7 @@ <div class="backdrop" :style="{ 'width': `${showResult ? (choice.votes / total * 100) : 0}%` }"></div> <span> <template v-if="choice.isVoted"><fa icon="check"/></template> - <mfm :text="choice.text" :should-break="false" :plain-text="true" :custom-emojis="note.emojis"/> + <mfm :text="choice.text" :plain="true" :custom-emojis="note.emojis"/> <span class="votes" v-if="showResult">({{ $t('vote-count').replace('{}', choice.votes) }})</span> </span> </li> diff --git a/src/client/app/common/views/components/user-list.vue b/src/client/app/common/views/components/user-list.vue index 466be41506..69cb65b445 100644 --- a/src/client/app/common/views/components/user-list.vue +++ b/src/client/app/common/views/components/user-list.vue @@ -16,7 +16,7 @@ <p class="username">@{{ user | acct }}</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"/> + <mfm :text="user.description" :is-note="false" :author="user" :i="$store.state.i" :custom-emojis="user.emojis" :plain="true" :nowrap="true"/> </div> <mk-follow-button class="follow-button" v-if="$store.getters.isSignedIn && user.id != $store.state.i.id" :user="user" mini/> </div> diff --git a/src/client/app/common/views/components/user-name.vue b/src/client/app/common/views/components/user-name.vue index 3959193eb4..6aca36acbd 100644 --- a/src/client/app/common/views/components/user-name.vue +++ b/src/client/app/common/views/components/user-name.vue @@ -1,5 +1,5 @@ <template> -<mfm :text="user.name || user.username" :should-break="false" :plain-text="true" :custom-emojis="user.emojis"/> +<mfm :text="user.name || user.username" :plain="true" :nowrap="true" :custom-emojis="user.emojis"/> </template> <script lang="ts"> diff --git a/src/client/app/common/views/deck/deck.notification.vue b/src/client/app/common/views/deck/deck.notification.vue index 27a2dffef5..522f9b0d35 100644 --- a/src/client/app/common/views/deck/deck.notification.vue +++ b/src/client/app/common/views/deck/deck.notification.vue @@ -12,7 +12,7 @@ </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -30,7 +30,7 @@ </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note.renote)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note.renote)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.renote.emojis"/> + <mfm :text="getNoteSummary(notification.note.renote)" :plain="true" :custom-emojis="notification.note.renote.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -74,7 +74,7 @@ </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> diff --git a/src/client/app/common/views/deck/deck.user-column.vue b/src/client/app/common/views/deck/deck.user-column.vue index c508f3f69f..8ab61f2047 100644 --- a/src/client/app/common/views/deck/deck.user-column.vue +++ b/src/client/app/common/views/deck/deck.user-column.vue @@ -30,7 +30,7 @@ <div class="fields" v-if="user.fields"> <dl class="field" v-for="(field, i) in user.fields" :key="i"> <dt class="name"> - <mfm :text="field.name" :should-break="false" :plain-text="true" :custom-emojis="user.emojis"/> + <mfm :text="field.name" :plain="true" :custom-emojis="user.emojis"/> </dt> <dd class="value"> <mfm :text="field.value" :author="user" :i="$store.state.i" :custom-emojis="user.emojis"/> diff --git a/src/client/app/common/views/pages/follow.vue b/src/client/app/common/views/pages/follow.vue index f6a11a7b4f..f08ddf2642 100644 --- a/src/client/app/common/views/pages/follow.vue +++ b/src/client/app/common/views/pages/follow.vue @@ -1,7 +1,7 @@ <template> <div class="syxhndwprovvuqhmyvveewmbqayniwkv" v-if="!fetching"> <div class="signed-in-as"> - <mfm :text="$t('signed-in-as').replace('{}', myName)" :should-break="false" :plain-text="true" :custom-emojis="$store.state.i.emojis"/> + <mfm :text="$t('signed-in-as').replace('{}', myName)" :plain="true" :custom-emojis="$store.state.i.emojis"/> </div> <main> <div class="banner" :style="bannerStyle"></div> diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue index 6a8bc48ff2..aa8b023993 100644 --- a/src/client/app/desktop/views/components/notifications.vue +++ b/src/client/app/desktop/views/components/notifications.vue @@ -24,7 +24,7 @@ </p> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -40,7 +40,7 @@ </p> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note.renote)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note.renote)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.renote.emojis"/> + <mfm :text="getNoteSummary(notification.note.renote)" :plain="true" :custom-emojis="notification.note.renote.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -55,7 +55,7 @@ </router-link> </p> <router-link class="note-preview" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> </router-link> </div> </template> @@ -91,7 +91,7 @@ </router-link> </p> <router-link class="note-preview" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> </router-link> </div> </template> @@ -105,7 +105,7 @@ </router-link> </p> <router-link class="note-preview" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> </router-link> </div> </template> @@ -118,7 +118,7 @@ </router-link></p> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> diff --git a/src/client/app/desktop/views/home/user/user.header.vue b/src/client/app/desktop/views/home/user/user.header.vue index 52a5165c3f..ca4ad0802c 100644 --- a/src/client/app/desktop/views/home/user/user.header.vue +++ b/src/client/app/desktop/views/home/user/user.header.vue @@ -28,7 +28,7 @@ <div class="fields" v-if="user.fields"> <dl class="field" v-for="(field, i) in user.fields" :key="i"> <dt class="name"> - <mfm :text="field.name" :should-break="false" :plain-text="true" :custom-emojis="user.emojis"/> + <mfm :text="field.name" :plain="true" :custom-emojis="user.emojis"/> </dt> <dd class="value"> <mfm :text="field.value" :author="user" :i="$store.state.i" :custom-emojis="user.emojis"/> diff --git a/src/client/app/mobile/views/components/notification.vue b/src/client/app/mobile/views/components/notification.vue index 9dae95c9b1..7b1030122f 100644 --- a/src/client/app/mobile/views/components/notification.vue +++ b/src/client/app/mobile/views/components/notification.vue @@ -10,7 +10,7 @@ </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -26,7 +26,7 @@ </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note.renote)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note.renote)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.renote.emojis"/> + <mfm :text="getNoteSummary(notification.note.renote)" :plain="true" :custom-emojis="notification.note.renote.emojis"/> <fa icon="quote-right"/> </router-link> </div> @@ -64,7 +64,7 @@ </header> <router-link class="note-ref" :to="notification.note | notePage" :title="getNoteSummary(notification.note)"> <fa icon="quote-left"/> - <mfm :text="getNoteSummary(notification.note)" :should-break="false" :plain-text="true" :custom-emojis="notification.note.emojis"/> + <mfm :text="getNoteSummary(notification.note)" :plain="true" :custom-emojis="notification.note.emojis"/> <fa icon="quote-right"/> </router-link> </div> diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index da01ef6221..c24a56be7b 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -3,7 +3,7 @@ <template #header><span style="margin-right:4px;"><fa icon="cog"/></span>{{ $t('@.settings') }}</template> <main> <div class="signed-in-as" :class="{ shadow: $store.state.device.useShadow, round: $store.state.device.roundedCorners }"> - <mfm :text="$t('signed-in-as').replace('{}', name)" :should-break="false" :plain-text="true" :custom-emojis="$store.state.i.emojis"/> + <mfm :text="$t('signed-in-as').replace('{}', name)" :plain="true" :custom-emojis="$store.state.i.emojis"/> </div> <x-settings/> diff --git a/src/client/app/mobile/views/pages/user/index.vue b/src/client/app/mobile/views/pages/user/index.vue index f8f4719a68..2e4998178f 100644 --- a/src/client/app/mobile/views/pages/user/index.vue +++ b/src/client/app/mobile/views/pages/user/index.vue @@ -28,7 +28,7 @@ <div class="fields" v-if="user.fields"> <dl class="field" v-for="(field, i) in user.fields" :key="i"> <dt class="name"> - <mfm :text="field.name" :should-break="false" :plain-text="true" :custom-emojis="user.emojis"/> + <mfm :text="field.name" :plain="true" :custom-emojis="user.emojis"/> </dt> <dd class="value"> <mfm :text="field.value" :author="user" :i="$store.state.i" :custom-emojis="user.emojis"/> |