You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/public/js/group-topic-feed.js

1 line
132 KiB
JavaScript

(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[8774],{2133:(t,e,s)=>{"use strict";s.r(e);var o=s(64954),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a)},2815:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});var o=s(9266),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const i=o.default},4777:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>i});var o=s(35986),a={};for(const t in o)"default"!==t&&(a[t]=()=>o[t]);s.d(e,a);const i=o.default},6234:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>g});var o=s(69513),a=s(84125),i=s(78841),n=s(21466),r=s(98051),l=s(37128),d=s(61518),c=s(79427),u=s(42013),p=s(93934),h=s(40798),m=s(76746);function f(t){return function(t){if(Array.isArray(t))return v(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 v(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)?v(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 v(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,o=Array(e);s<e;s++)o[s]=t[s];return o}const g={props:{groupId:{type:String},group:{type:Object},profile:{type:Object},prestatus:{type:Object},recommended:{type:Boolean,default:!1},reactionBar:{type:Boolean,default:!0},hasTopBorder:{type:Boolean,default:!0},size:{type:String,validator:function(t){return["regular","small"].includes(t)},default:"regular"},permalinkMode:{type:Boolean,default:!1},showGroupChevron:{type:Boolean,default:!1},showGroupHeader:{type:Boolean,default:!1}},components:{"comment-drawer":o.default,"context-menu":a.default,"poll-card":i.default,"mixed-album-presenter":n.default,"photo-album-presenter":r.default,"photo-presenter":l.default,"video-album-presenter":d.default,"video-presenter":c.default,"post-modal":u.default,"parent-unavailable":h.default,"group-post-header":m.default},data:function(){return{config:window.App.config,status:{},loaded:!1,replies:[],replyId:null,lightboxMedia:!1,showSuggestions:!0,showReadMore:!0,replyStatus:{},replyText:"",replyNsfw:!1,emoji:window.App.util.emoji,commentDrawerKey:0,showCommentDrawer:!1,parentContext:void 0,childContext:void 0,parentUnavailable:void 0,showModal:!1,likes:[],likesPage:1,openLikesModal:!1}},computed:{renderedCaption:{get:function(){if(this.prestatus){var t=this.prestatus.gid;return null==this.prestatus.content?"":(0,p.autoLink)(this.prestatus.content,{hashtagUrlBase:App.config.site.url+"/groups/".concat(t,"/topics/"),usernameUrlBase:App.config.site.url+"/groups/".concat(t,"/username/")})}return this.prestatus.content}}},mounted:function(){var t=this;this.status=this.prestatus;var e=this;setTimeout((function(){1==t.permalinkMode&&t.prestatus.in_reply_to_id?(e.childContext=e.status,axios.get("/api/v0/groups/status",{params:{gid:e.groupId,sid:e.status.in_reply_to_id}}).then((function(t){e.status=t.data,e.parentUnavailable=!1,e.showCommentDrawer=!0,e.parentContext=t.data,e.loaded=!0})).catch((function(s){e.status=t.prestatus,e.parentUnavailable=!0,e.showCommentDrawer=!0,e.parentContext=t.prestatus,e.loaded=!0}))):(e.parentUnavailable=!1,e.showCommentDrawer=!1,e.loaded=!0)}),100)},methods:{formatCount:function(t){return App.util.format.count(t)},statusUrl:function(t){return 1==t.local?t.url:"/i/web/post/_/"+t.account.id+"/"+t.id},profileUrl:function(t){return 1==t.local?t.account.url:"/i/web/profile/_/"+t.account.id},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},shortTimestamp:function(t){return window.App.util.format.timeAgo(t)},statusCardUsernameFormat:function(t){if(1==t.account.local)return t.account.username;var e=window.App.config.username.remote.format,s=window.App.config.username.remote.custom,o=t.account.username,a=document.createElemen