From 3d6445d5c726bb09932b1912393748c125a22892 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 24 May 2020 02:25:02 -0600 Subject: [PATCH] Update Timeline.vue embed modal --- resources/assets/js/components/Timeline.vue | 55 ++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 1432a9dd8..f70c69e36 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -430,7 +430,29 @@ size="md" body-class="p-2 rounded">
- +
+ +
+
+
+ + +
+
+ + +
+
+ + +
+

By using this embed, you agree to our Terms of Use

@@ -603,9 +625,35 @@ showTips: true, userStory: false, replySending: false, + ctxEmbedShowCaption: true, + ctxEmbedShowLikes: false, + ctxEmbedCompactMode: false, + } + }, + 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.ctxMenuStatus.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.ctxMenuStatus.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.ctxMenuStatus.url, this.ctxEmbedShowCaption, this.ctxEmbedShowLikes, mode); } }, - beforeMount() { this.fetchProfile(); this.fetchTimelineApi(); @@ -1349,6 +1397,9 @@ ctxCopyEmbed() { navigator.clipboard.writeText(this.ctxEmbedPayload); + this.ctxEmbedShowCaption = true; + this.ctxEmbedShowLikes = false; + this.ctxEmbedCompactMode = false; this.$refs.ctxEmbedModal.hide(); },