Check if emoji is already a local one
This commit is contained in:
parent
0ccff2019f
commit
e04d7d2c97
6 changed files with 26 additions and 3 deletions
|
|
@ -19,6 +19,7 @@
|
|||
:title="'@'+(user && user.screen_name_ui)"
|
||||
:html="htmlTitle"
|
||||
:emoji="user.emoji || []"
|
||||
:is-local="user.is_local"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@
|
|||
:title="'@'+notification.from_profile.screen_name_ui"
|
||||
:html="notification.from_profile.name_html"
|
||||
:emoji="notification.from_profile.emoji"
|
||||
:is-local="notification.from_profile.is_local"
|
||||
/>
|
||||
</bdi>
|
||||
<!-- eslint-enable vue/no-v-html -->
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@ export default {
|
|||
required: false,
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// Assume is local to be true if unspecified, so the button isn't show where it probably should not be
|
||||
isLocal: {
|
||||
required: false,
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
// NEVER EVER TOUCH DATA INSIDE RENDER
|
||||
|
|
@ -165,9 +171,11 @@ export default {
|
|||
return <StillImageEmojiPopover
|
||||
class="emoji img"
|
||||
src={url}
|
||||
shortcode={shortcode}
|
||||
title={`:${shortcode}:`}
|
||||
alt={`:${shortcode}:`}
|
||||
|
||||
shortcode={shortcode}
|
||||
isLocal={this.isLocal}
|
||||
/>
|
||||
}
|
||||
)]
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@
|
|||
<RichContent
|
||||
:html="retweeterHtml"
|
||||
:emoji="retweeterUser.emoji"
|
||||
:is-local="retweeterUser.is_local"
|
||||
/>
|
||||
</router-link>
|
||||
<router-link
|
||||
|
|
@ -139,6 +140,7 @@
|
|||
<RichContent
|
||||
:html="status.user.name"
|
||||
:emoji="status.user.emoji"
|
||||
:is-local="status.user.is_local"
|
||||
/>
|
||||
</h4>
|
||||
<h4
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
:faint="compact"
|
||||
:html="status.summary_raw_html"
|
||||
:emoji="status.emojis"
|
||||
:is-local="status.isLocal"
|
||||
/>
|
||||
<button
|
||||
v-show="longSubject && showingLongSubject"
|
||||
|
|
@ -44,6 +45,7 @@
|
|||
:faint="compact"
|
||||
:greentext="mergedConfig.greentext"
|
||||
:attentions="status.attentions"
|
||||
:is-local="status.is_local"
|
||||
@parse-ready="onParseReady"
|
||||
/>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
ref="emojiPopover"
|
||||
trigger="click"
|
||||
placement="top"
|
||||
bound-to-selector=".status-container"
|
||||
:bound-to="{ x: 'container' }"
|
||||
:offset="{ y: 10 }"
|
||||
@show="fetchEmojiPacksIfAdmin"
|
||||
|
|
@ -22,7 +21,7 @@
|
|||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="isUserAdmin">
|
||||
<div v-if="isUserAdmin && !isLocal">
|
||||
<button
|
||||
class="button button-default btn emoji-popover-button"
|
||||
type="button"
|
||||
|
|
@ -66,6 +65,16 @@
|
|||
|
||||
export default {
|
||||
components: { StillImage, Popover, SelectComponent },
|
||||
props: {
|
||||
shortcode: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
isLocal: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
knownLocalPacks: { },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue