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