pixelfed/public/js/status.js

1 line
120 KiB
JavaScript
Raw Normal View History

2021-04-07 03:23:44 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"2Jpm":function(t,e,i){"use strict";i.r(e);var s={props:["status"],methods:{playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())}}},n=i("KHd+"),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",[i("details",{staticClass:"details-animated"},[i("summary",[i("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),i("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),i("div",{staticClass:"embed-responsive embed-responsive-1by1"},[i("video",{staticClass:"video",attrs:{preload:"none",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id},on:{click:function(e){return t.playOrPause(e)}}},[i("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):i("div",{staticClass:"embed-responsive embed-responsive-16by9"},[i("video",{staticClass:"video",attrs:{controls:"",preload:"metadata",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id}},[i("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])}),[],!1,null,null,null);e.default=a.exports},5:function(t,e,i){t.exports=i("CJs/")},"6ZA0":function(t,e,i){"use strict";i.r(e);var s=i("JMt0");function n(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}pixelfed.postComponent={};var r={props:["status-id","status-username","status-template","status-url","status-profile-url","status-avatar","status-profile-id","profile-layout","profile-recent"],components:{VueTribute:s.a},data:function(){var t;return o(t={config:window.App.config,status:!1,media:{},user:!1,reactions:{liked:!1,shared:!1},likes:[],likesPage:1,shares:[],sharesPage:1,lightboxMedia:!1,replyText:"",replyStatus:{},replySensitive:!1,relationship:{},results:[],pagination:{},min_id:0,max_id:0,reply_to_profile_id:0,thread:!1,showComments:!1,warning:!1,loaded:!1,loading:null,replyingToId:this.statusId,replyingToUsername:this.statusUsername,replyToIndex:0,replySending:!1,emoji:window.App.util.emoji,showReadMore:!0,showCaption:!0,ctxEmbedPayload:!1,copiedEmbed:!1,ctxEmbedShowCaption:!0,ctxEmbedShowLikes:!1,ctxEmbedCompactMode:!1,layout:this.profileLayout,showProfileMorePosts:!1,profileMorePosts:[]},"replySending",!1),o(t,"reactionBarLoading",!0),o(t,"tributeSettings",{collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}}]}),t},watch:{ctxEmbedShowCaption:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var i=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.status.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,i)},ctxEmbedShowLikes:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var i=this.ctxEmbedCompactMode?"compact":