diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index b3e834ed..d4fc6dd7 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -512,7 +512,29 @@ size="md" body-class="p-2 rounded">
By using this embed, you agree to our Terms of Use
@@ -650,10 +672,36 @@ export default { showCaption: true, ctxEmbedPayload: false, copiedEmbed: false, + ctxEmbedShowCaption: true, + ctxEmbedShowLikes: false, + ctxEmbedCompactMode: false, layout: this.profileLayout } }, - + watch: { + ctxEmbedShowCaption: function (n,o) { + if(n == true) { + this.ctxEmbedCompactMode = false; + } + let mode = this.ctxEmbedCompactMode ? 'compact' : 'full'; + this.ctxEmbedPayload = window.App.util.embed.post(this.status.url, this.ctxEmbedShowCaption, this.ctxEmbedShowLikes, mode); + }, + ctxEmbedShowLikes: function (n,o) { + if(n == true) { + this.ctxEmbedCompactMode = false; + } + let mode = this.ctxEmbedCompactMode ? 'compact' : 'full'; + this.ctxEmbedPayload = window.App.util.embed.post(this.status.url, this.ctxEmbedShowCaption, this.ctxEmbedShowLikes, mode); + }, + ctxEmbedCompactMode: function (n,o) { + if(n == true) { + this.ctxEmbedShowCaption = false; + this.ctxEmbedShowLikes = false; + } + let mode = this.ctxEmbedCompactMode ? 'compact' : 'full'; + this.ctxEmbedPayload = window.App.util.embed.post(this.status.url, this.ctxEmbedShowCaption, this.ctxEmbedShowLikes, mode); + } + }, beforeMount() { let u = new URLSearchParams(window.location.search); let forceMetro = localStorage.getItem('pf_metro_ui.exp.forceMetro') == 'true'; @@ -1195,7 +1243,8 @@ export default { }, showEmbedPostModal() { - this.ctxEmbedPayload = window.App.util.embed.post(this.status.url) + let mode = this.ctxEmbedCompactMode ? 'compact' : 'full'; + this.ctxEmbedPayload = window.App.util.embed.post(this.status.url, this.ctxEmbedShowCaption, this.ctxEmbedShowLikes, mode); this.$refs.embedModal.show(); },