refs #1452 Emojify quoted contents
This commit is contained in:
parent
99049b0cdf
commit
3fcc526893
|
@ -63,8 +63,19 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.contents {
|
.contents {
|
||||||
|
.header {
|
||||||
|
.emojione {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.body {
|
.body {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
|
||||||
|
.emojione {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="spoiler" v-show="spoilered(message.status)">
|
<div class="spoiler" v-show="spoilered(message.status)">
|
||||||
<span v-html="spoilerText(message.status)"></span>
|
<span v-html="emojiText(message.status.spoiler_text, message.status.emojis)"></span>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="!isShowContent(message.status)"
|
v-if="!isShowContent(message.status)"
|
||||||
plain
|
plain
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
<div
|
<div
|
||||||
class="content"
|
class="content"
|
||||||
v-show="isShowContent(message.status)"
|
v-show="isShowContent(message.status)"
|
||||||
v-html="status(message.status)"
|
v-html="emojiText(message.status.content, message.status.emojis)"
|
||||||
@click.capture.prevent="tootClick"
|
@click.capture.prevent="tootClick"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
:icon="message.status.reblog.account.avatar"
|
:icon="message.status.reblog.account.avatar"
|
||||||
:username="username(message.status.reblog.account)"
|
:username="username(message.status.reblog.account)"
|
||||||
:accountName="''"
|
:accountName="''"
|
||||||
:body="message.status.reblog.content"
|
:body="emojiText(message.status.reblog.content, message.status.reblog.emojis)"
|
||||||
@select="openDetail(message.status.reblog)"
|
@select="openDetail(message.status.reblog)"
|
||||||
/>
|
/>
|
||||||
<LinkPreview
|
<LinkPreview
|
||||||
|
@ -259,11 +259,8 @@ export default {
|
||||||
isShowAttachments(message) {
|
isShowAttachments(message) {
|
||||||
return !this.sensitive(message) || this.showAttachments
|
return !this.sensitive(message) || this.showAttachments
|
||||||
},
|
},
|
||||||
status(message) {
|
emojiText(content, emojis) {
|
||||||
return emojify(message.content, message.emojis)
|
return emojify(content, emojis)
|
||||||
},
|
|
||||||
spoilerText(message) {
|
|
||||||
return emojify(message.spoiler_text, message.emojis)
|
|
||||||
},
|
},
|
||||||
handleStatusControl(event) {
|
handleStatusControl(event) {
|
||||||
switch (event.srcKey) {
|
switch (event.srcKey) {
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
<div class="spoiler" v-show="spoilered">
|
<div class="spoiler" v-show="spoilered">
|
||||||
<span v-html="spoilerText()"></span>
|
<span v-html="emojiText(originalMessage.spoiler_text, originalMessage.emojis)"></span>
|
||||||
<el-button v-if="!isShowContent" plain type="primary" size="medium" class="spoil-button" @click="showContent = true">
|
<el-button v-if="!isShowContent" plain type="primary" size="medium" class="spoil-button" @click="showContent = true">
|
||||||
{{ $t('cards.toot.show_more') }}
|
{{ $t('cards.toot.show_more') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -59,7 +59,12 @@
|
||||||
{{ $t('cards.toot.hide') }}
|
{{ $t('cards.toot.hide') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="content" v-show="isShowContent" v-html="status()" @click.capture.prevent="tootClick"></div>
|
<div
|
||||||
|
class="content"
|
||||||
|
v-show="isShowContent"
|
||||||
|
v-html="emojiText(originalMessage.content, originalMessage.emojis)"
|
||||||
|
@click.capture.prevent="tootClick"
|
||||||
|
></div>
|
||||||
<Poll v-show="isShowContent" v-if="poll" :poll="poll" @vote="vote" @refresh="refresh"></Poll>
|
<Poll v-show="isShowContent" v-if="poll" :poll="poll" @vote="vote" @refresh="refresh"></Poll>
|
||||||
</div>
|
</div>
|
||||||
<div class="attachments">
|
<div class="attachments">
|
||||||
|
@ -94,7 +99,7 @@
|
||||||
:icon="message.reblog.account.avatar"
|
:icon="message.reblog.account.avatar"
|
||||||
:username="username(message.reblog.account)"
|
:username="username(message.reblog.account)"
|
||||||
:accountName="accountName(message.reblog.account)"
|
:accountName="accountName(message.reblog.account)"
|
||||||
:body="message.reblog.content"
|
:body="emojiText(message.reblog.content, message.reblog.emojis)"
|
||||||
@select="openDetail(message.reblog)"
|
@select="openDetail(message.reblog)"
|
||||||
/>
|
/>
|
||||||
<LinkPreview
|
<LinkPreview
|
||||||
|
@ -578,13 +583,8 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
status() {
|
emojiText(content, emojis) {
|
||||||
const original = this.originalMessage
|
return emojify(content, emojis)
|
||||||
return emojify(original.content, original.emojis)
|
|
||||||
},
|
|
||||||
spoilerText() {
|
|
||||||
const original = this.originalMessage
|
|
||||||
return emojify(original.spoiler_text, original.emojis)
|
|
||||||
},
|
},
|
||||||
handleTootControl(event) {
|
handleTootControl(event) {
|
||||||
switch (event.srcKey) {
|
switch (event.srcKey) {
|
||||||
|
|
Loading…
Reference in New Issue