pixelfed/public/js/home-123122-swxib.js

1 line
130 KiB
JavaScript
Raw Normal View History

2022-12-31 08:44:14 +00:00
"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[979],{41015:(t,e,s)=>{s.r(e),s.d(e,{default:()=>l});var o=s(42755),i=s(88231),n=s(78375),a=s(55197),r=(s(73459),s(66915));const l={props:{scope:{type:String,default:"home"}},components:{drawer:o.default,sidebar:i.default,timeline:a.default,rightbar:n.default,"story-carousel":r.default},data:function(){return{isLoaded:!1,profile:void 0,recommended:[],trending:[],storiesEnabled:!1,shouldRefresh:!1}},mounted:function(){this.init()},watch:{$route:"init"},methods:{init:function(){var t,e,s;this.profile=window._sharedData.user,this.isLoaded=!0,this.storiesEnabled=!(null===(t=window.App)||void 0===t||null===(e=t.config)||void 0===e||null===(s=e.features)||void 0===s||!s.hasOwnProperty("stories"))&&window.App.config.features.stories},updateProfile:function(t){this.profile=Object.assign(this.profile,t)}}}},95217:(t,e,s)=>{s.r(e),s.d(e,{default:()=>r});var o=s(26535),i=s(74338),n=s(37846),a=s(81104);const r={props:{status:{type:Object},profile:{type:Object},reactionBar:{type:Boolean,default:!0},useDropdownMenu:{type:Boolean,default:!1}},components:{"comment-drawer":o.default,"post-content":n.default,"post-header":i.default,"post-reactions":a.default},data:function(){return{key:1,menuLoading:!0,sensitive:!1,showCommentDrawer:!1,isReblogging:!1,isBookmarking:!1,owner:!1,admin:!1,license:!1}},mounted:function(){var t=this;this.license=!(!this.status.media_attachments||!this.status.media_attachments.length)&&this.status.media_attachments.filter((function(t){return t.hasOwnProperty("license")&&t.license&&t.license.hasOwnProperty("id")})).map((function(t){return t.license}))[0],this.admin=window._sharedData.user.is_admin,this.owner=this.status.account.id==window._sharedData.user.id,this.status.reply_count&&this.autoloadComments&&!1===this.status.comments_disabled&&setTimeout((function(){t.showCommentDrawer=!0}),1e3)},computed:{hideCounts:{get:function(){return 1==this.$store.state.hideCounts}},fixedHeight:{get:function(){return 1==this.$store.state.fixedHeight}},autoloadComments:{get:function(){return 1==this.$store.state.autoloadComments}},newReactions:{get:function(){return this.$store.state.newReactions}}},watch:{status:{deep:!0,immediate:!0,handler:function(t,e){this.isBookmarking=!1}}},methods:{openMenu:function(){this.$emit("menu")},like:function(){this.$emit("like")},unlike:function(){this.$emit("unlike")},showLikes:function(){this.$emit("likes-modal")},showShares:function(){this.$emit("shares-modal")},showComments:function(){this.showCommentDrawer=!this.showCommentDrawer},copyLink:function(){event.currentTarget.blur(),App.util.clipboard(this.status.url)},shareToOther:function(){navigator.canShare?navigator.share({url:this.status.url}).then((function(){return console.log("Share was successful.")})).catch((function(t){return console.log("Sharing failed",t)})):swal("Not supported","Your current device does not support native sharing.","error")},counterChange:function(t){this.$emit("counter-change",t)},showCommentLikes:function(t){this.$emit("comment-likes-modal",t)},shareStatus:function(){this.$emit("share")},unshareStatus:function(){this.$emit("unshare")},handleReport:function(t){this.$emit("handle-report",t)},follow:function(){this.$emit("follow")},unfollow:function(){this.$emit("unfollow")},handleReblog:function(){var t=this;this.isReblogging=!0,this.status.reblogged?this.$emit("unshare"):this.$emit("share"),setTimeout((function(){t.isReblogging=!1}),5e3)},handleBookmark:function(){var t=this;event.currentTarget.blur(),this.isBookmarking=!0,this.$emit("bookmark"),setTimeout((function(){t.isBookmarking=!1}),5e3)},getStatusAvatar:function(){return window._sharedData.user.id==this.status.account.id?window._sharedData.user.avatar:this.status.account.avatar},openModTools:function(){this.$emit("mod-tools")}}}},8671:(t,e,s)=>{s.r(e),s.d(e,{default:()=>o});const o={props:{status:{type:Object,default:{}}},data:function(){return{statusId:void 0,tabIndex:0,showFull:!1}},methods:{open:function(){this.$refs.modal.show()},close:function(){var t=this;this.$refs.moda