pixelfed/public/js/status.js

1 line
133 KiB
JavaScript
Raw Normal View History

2024-10-06 06:53:38 +00:00
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[4312],{33422:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});const a={props:["status"]}},36639:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(18634);const i={props:["status"],data:function(){return{sensitive:this.status.sensitive,cursor:0}},created:function(){},beforeDestroy:function(){},methods:{toggleContentWarning:function(t){this.$emit("togglecw")},toggleLightbox:function(t){(0,a.default)({el:t.target,gallery:"#carousel-"+this.status.id,position:this.$refs.carousel.currentPage})},altText:function(t){var e=t.description;return e||"Photo was not tagged with any alt text."},keypressNavigation:function(t){var e=this.$refs.carousel;if("37"==t.keyCode){t.preventDefault();var s="backward";e.advancePage(s),e.$emit("navigation-click",s)}if("39"==t.keyCode){t.preventDefault();var a="forward";e.advancePage(a),e.$emit("navigation-click",a)}}}}},9266:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});var a=s(18634);const i={props:["status"],data:function(){return{sensitive:this.status.sensitive}},mounted:function(){},methods:{altText:function(t){var e=t.media_attachments[0].description;return e||"Photo was not tagged with any alt text."},toggleContentWarning:function(t){this.$emit("togglecw")},toggleLightbox:function(t){(0,a.default)({el:t.target})},width:function(){if(this.status.media_attachments[0].meta&&this.status.media_attachments[0].meta.original&&this.status.media_attachments[0].meta.original.width)return this.status.media_attachments[0].meta.original.width},height:function(){if(this.status.media_attachments[0].meta&&this.status.media_attachments[0].meta.original&&this.status.media_attachments[0].meta.original.height)return this.status.media_attachments[0].meta.original.height}}}},35986:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});const a={props:["status"]}},25189:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>a});const a={props:["status"],methods:{altText:function(t){var e=t.media_attachments[0].description;return e||"Video was not tagged with any alt text."},playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())},toggleContentWarning:function(t){this.$emit("togglecw")},poster:function(){var t=this.status.media_attachments[0].preview_url;if(!t.endsWith("no-preview.jpg")&&!t.endsWith("no-preview.png"))return t}}}},38660:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>u});var a=s(79288),i=s(78841),o=s(2547),n=s(79984),r=s(24848),l=s(74692);function c(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return d(t,e);var s={}.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?d(t,e):void 0}}(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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,a=Array(e);s<e;s++)a[s]=t[s];return a}pixelfed.postComponent={};const u={props:["status-id","status-username","status-template","status-url","status-profile-url","status-avatar","status-profile-id","profile-layout","profile-recent"],components:{VueTribute:a.default,PollCard:i.default,CommentFeed:o.default,StatusCard:n.default},data:function(){return{config:window.App.config,status:!1,media:{},user:!1,reactions:{liked:!1,shared:!1},likes:[],likesCursor:null,likesCanLoadMore:!0,likedLoaded:!1,shares:[],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.