pixelfed/public/js/home.chunk.8bbc3c5c38dde66d.js

2 wiersze
244 KiB
JavaScript

2024-04-12 10:43:38 +00:00
/*! For license information please see home.chunk.8bbc3c5c38dde66d.js.LICENSE.txt */
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[4951],{27836:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>l});var i=s(5787),a=s(28772),o=s(59993),n=s(67051),r=(s(76830),s(88153));const l={props:{scope:{type:String,default:"home"}},components:{drawer:i.default,sidebar:a.default,timeline:n.default,rightbar:o.default,"story-carousel":r.default},data:function(){return{isLoaded:!1,profile:void 0,recommended:[],trending:[],storiesEnabled:!1,shouldRefresh:!1,showUpdateWarning:!1,showUpdateConnectionWarning:!1,updateInfo:void 0}},mounted:function(){this.init()},watch:{$route:"init"},methods:{init:function(){var t;this.profile=window._sharedData.user,this.isLoaded=!0,this.storiesEnabled=!(null===(t=window.App)||void 0===t||null===(t=t.config)||void 0===t||null===(t=t.features)||void 0===t||!t.hasOwnProperty("stories"))&&window.App.config.features.stories,this.profile.is_admin&&this.softwareUpdateCheck()},updateProfile:function(t){this.profile=Object.assign(this.profile,t)},softwareUpdateCheck:function(){var t=this;axios.get("/api/web-admin/software-update/check").then((function(e){if(e&&e.data&&e.data.hasOwnProperty("running_latest")&&!e.data.running_latest){if(null===e.data.running_latest)return t.updateInfo=e.data,void(t.showUpdateConnectionWarning=!0);t.updateInfo=e.data,t.showUpdateWarning=!e.data.running_latest}})).catch((function(e){t.showUpdateConnectionWarning=!0}))}}}},56987:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>r});var i=s(20243),a=s(84800),o=s(79110),n=s(27821);const r={props:{status:{type:Object},profile:{type:Object},reactionBar:{type:Boolean,default:!0},useDropdownMenu:{type:Boolean,default:!1}},components:{"comment-drawer":i.default,"post-content":o.default,"post-header":a.default,"post-reactions":n.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.shadowStatus.media_attachments||!this.shadowStatus.media_attachments.length)&&this.shadowStatus.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.shadowStatus.account.id==window._sharedData.user.id,this.shadowStatus.reply_count&&this.autoloadComments&&!1===this.shadowStatus.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}},isReblog:{get:function(){return null!=this.status.reblog}},reblogAccount:{get:function(){return this.status.reblog?this.status.account:null}},shadowStatus:{get:function(){return this.status.reblog?this.status.reblog:this.status}}},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:funct