diff --git a/public/js/status.js b/public/js/status.js index a18c4283b..ed4691d7c 100644 --- a/public/js/status.js +++ b/public/js/status.js @@ -1 +1 @@ -!function(t){var e={};function s(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=e,s.d=function(t,e,a){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(a,n,function(e){return t[e]}.bind(null,n));return a},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/",s(s.s=5)}({5:function(t,e,s){t.exports=s("CJs/")},"6ZA0":function(t,e,s){"use strict";s.r(e);function a(t){return function(t){if(Array.isArray(t)){for(var e=0,s=new Array(t.length);e0?((n=e.likes).push.apply(n,a(o.data)),e.likesPage++,t.loaded()):t.complete()})},infiniteSharesHandler:function(t){var e=this;axios.get("/api/v2/shares/profile/"+this.statusUsername+"/status/"+this.statusId,{params:{page:this.sharesPage}}).then(function(s){var n,o=s.data;o.data.length>0?((n=e.shares).push.apply(n,a(o.data)),e.sharesPage++,t.loaded()):t.complete()})},likeStatus:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:this.status.id}).then(function(t){if(e.status.favourites_count=t.data.count,1==e.reactions.liked){e.reactions.liked=!1;var s=e.user.id;e.likes=e.likes.filter(function(t){return t.id!==s})}else{e.reactions.liked=!0;var a=e.user;e.likes.push(a)}}).catch(function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})},shareStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:this.status.id}).then(function(e){if(t.status.reblogs_count=e.data.count,1==t.reactions.shared){t.reactions.shared=!1;var s=t.user.id;t.shares=t.shares.filter(function(t){return t.id!==s})}else{t.reactions.shared=!0;var a=t.user;t.shares.push(a)}}).catch(function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})},bookmarkStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/bookmark",{item:this.status.id}).then(function(e){1==t.reactions.bookmarked?t.reactions.bookmarked=!1:t.reactions.bookmarked=!0}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},muteProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:this.status.account.id}).then(function(e){swal("Success","You have successfully muted "+t.status.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:this.status.account.id}).then(function(e){swal("Success","You have successfully blocked "+t.status.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},deletePost:function(t){if(confirm("Are you sure you want to delete this post?")){if(0==$("body").hasClass("loggedIn"))return;axios.post("/i/delete",{type:"status",item:this.status.id}).then(function(t){swal("Success","You have successfully deleted this post","success"),window.location.href="/"}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})}},owner:function(){return this.user.id===this.status.account.id},admin:function(){return 1==this.user.is_admin},ownerOrAdmin:function(){return this.owner()||this.admin()},lightbox:function(t){this.lightboxMedia=t,this.$refs.lightboxModal.show()}}},o=(s("z+DR"),s("KHd+")),r=Object(o.a)(n,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"postComponent d-none"},[s("div",{staticClass:"container px-0"},[s("div",{staticClass:"card card-md-rounded-0 status-container orientation-unknown"},[s("div",{staticClass:"row px-0 mx-0"},[s("div",{staticClass:"d-flex d-md-none align-items-center justify-content-between card-header bg-white w-100"},[s("a",{staticClass:"d-flex align-items-center status-username text-truncate",attrs:{href:t.statusProfileUrl,"data-toggle":"tooltip","data-placement":"bottom",title:t.statusUsername}},[s("div",{staticClass:"status-avatar mr-2"},[s("img",{staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),s("div",{staticClass:"username"},[s("span",{staticClass:"username-link font-weight-bold text-dark"},[t._v(t._s(t.statusUsername))])])]),t._v(" "),0!=t.user?s("div",{staticClass:"float-right"},[s("div",{staticClass:"post-actions"},[s("div",{staticClass:"dropdown"},[t._m(0),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[t.owner()?t._e():s("div",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl()}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(e){return t.muteProfile()}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(e){return t.blockProfile()}}},[t._v("Block Profile")])]),t._v(" "),t.ownerOrAdmin()?s("div",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.editUrl()}},[t._v("Edit")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(e){return t.deletePost(t.status)}}},[t._v("Delete")])]):t._e()])])])]):t._e()]),t._v(" "),s("div",{staticClass:"col-12 col-md-8 px-0 mx-0"},[t._m(1),t._v(" "),s("div",{staticClass:"postPresenterContainer d-none d-flex justify-content-center align-items-center"},["photo"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("video-presenter",{attrs:{status:t.status}})],1):"photo:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("video-album-presenter",{attrs:{status:t.status}})],1):"photo:video:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):s("div",{staticClass:"w-100"},[s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])])]),t._v(" "),s("div",{staticClass:"col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0"},[s("div",{staticClass:"d-md-flex d-none align-items-center justify-content-between card-header py-3 bg-white"},[s("a",{staticClass:"d-flex align-items-center status-username text-truncate",attrs:{href:t.statusProfileUrl,"data-toggle":"tooltip","data-placement":"bottom",title:t.statusUsername}},[s("div",{staticClass:"status-avatar mr-2"},[s("img",{staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),s("div",{staticClass:"username"},[s("span",{staticClass:"username-link font-weight-bold text-dark"},[t._v(t._s(t.statusUsername))])])]),t._v(" "),s("div",{staticClass:"float-right"},[s("div",{staticClass:"post-actions"},[s("div",{staticClass:"dropdown"},[t._m(2),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[s("span",{staticClass:"menu-user d-none"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl()}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:t.muteProfile}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:t.blockProfile}},[t._v("Block Profile")])]),t._v(" "),s("span",{staticClass:"menu-author d-none"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.editUrl()}},[t._v("Edit")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:t.deletePost}},[t._v("Delete")])])])])])])]),t._v(" "),s("div",{staticClass:"d-flex flex-md-column flex-column-reverse h-100"},[s("div",{staticClass:"card-body status-comments"},[s("div",{staticClass:"status-comment"},[s("p",{staticClass:"mb-1 read-more",staticStyle:{overflow:"hidden"}},[s("span",{staticClass:"font-weight-bold pr-1"},[t._v(t._s(t.statusUsername))]),t._v(" "),s("span",{staticClass:"comment-text",attrs:{id:t.status.id+"-status-readmore"},domProps:{innerHTML:t._s(t.status.content)}})]),t._v(" "),s("post-comments",{attrs:{user:this.user,"post-id":t.statusId,"post-username":t.statusUsername}})],1)]),t._v(" "),s("div",{staticClass:"card-body flex-grow-0 py-1"},[s("div",{staticClass:"reactions my-1"},[s("h3",{class:[t.reactions.liked?"fas fa-heart text-danger pr-3 m-0":"far fa-heart pr-3 m-0 like-btn"],attrs:{title:"Like"},on:{click:t.likeStatus}}),t._v(" "),s("h3",{staticClass:"far fa-comment pr-3 m-0",attrs:{title:"Comment"},on:{click:t.commentFocus}}),t._v(" "),s("h3",{class:[t.reactions.shared?"far fa-share-square pr-3 m-0 text-primary":"far fa-share-square pr-3 m-0 share-btn"],attrs:{title:"Share"},on:{click:t.shareStatus}}),t._v(" "),s("h3",{class:[t.reactions.bookmarked?"fas fa-bookmark text-warning m-0 float-right":"far fa-bookmark m-0 float-right"],attrs:{title:"Bookmark"},on:{click:t.bookmarkStatus}})]),t._v(" "),s("div",{staticClass:"reaction-counts font-weight-bold mb-0"},[s("span",{staticStyle:{cursor:"pointer"},on:{click:t.likesModal}},[s("span",{staticClass:"like-count"},[t._v(t._s(t.status.favourites_count||0))]),t._v(" likes\n ")]),t._v(" "),s("span",{staticClass:"float-right",staticStyle:{cursor:"pointer"},on:{click:t.sharesModal}},[s("span",{staticClass:"share-count pl-4"},[t._v(t._s(t.status.reblogs_count||0))]),t._v(" shares\n ")])]),t._v(" "),s("div",{staticClass:"timestamp"},[s("a",{staticClass:"small text-muted",attrs:{href:t.statusUrl}},[t._v("\n "+t._s(t.timestampFormat())+"\n ")])])])]),t._v(" "),s("div",{staticClass:"card-footer bg-white sticky-md-bottom"},[t._m(3),t._v(" "),s("form",{staticClass:"comment-form d-none",attrs:{method:"post",action:"/i/comment","data-id":t.statusId,"data-truncate":"false"}},[s("input",{attrs:{type:"hidden",name:"_token",value:""}}),t._v(" "),s("input",{attrs:{type:"hidden",name:"item"},domProps:{value:t.statusId}}),t._v(" "),s("input",{staticClass:"form-control",attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off"}}),t._v(" "),s("input",{staticClass:"btn btn-primary comment-submit",attrs:{type:"submit",value:"Send"}})])])])])])]),t._v(" "),s("b-modal",{ref:"likesModal",attrs:{id:"l-modal","hide-footer":"",centered:"",title:"Likes","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.likes,function(e,a){return s("div",{key:"modal_likes_"+a,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])])])])}),t._v(" "),s("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteLikesHandler}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),s("b-modal",{ref:"sharesModal",attrs:{id:"s-modal","hide-footer":"",centered:"",title:"Shares","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.shares,function(e,a){return s("div",{key:"modal_shares_"+a,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("div",{staticClass:"d-inline-block"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])]),t._v(" "),s("p",{staticClass:"float-right"})])])])}),t._v(" "),s("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteSharesHandler}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),s("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":!0,"hide-footer":!0,centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?s("div",{class:t.lightboxMedia.filter_class},[s("img",{staticClass:"img-fluid",attrs:{src:t.lightboxMedia.url}})]):t._e()])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"postPresenterLoader text-center"},[e("div",{staticClass:"lds-ring"},[e("div"),e("div"),e("div"),e("div")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"comment-form-guest"},[e("a",{attrs:{href:"/login"}},[this._v("Login")]),this._v(" to like or comment.\n ")])}],!1,null,"42f79fcc",null);e.default=r.exports},"8lQw":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.text-lighter[data-v-61f5338e] {\n color:#B8C2CC !important;\n}\n.text-break[data-v-61f5338e] {\n word-break: break-all !important;\n}\n.comments p[data-v-61f5338e] {\n margin-bottom: 0;\n}\n",""])},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var s=e.protocol+"//"+e.host,a=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(n=0===o.indexOf("//")?o:0===o.indexOf("/")?s+o:a+o.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},"CJs/":function(t,e,s){Vue.component("post-component",s("6ZA0").default),Vue.component("post-comments",s("oeKV").default)},D2Wo:function(t,e,s){var a=s("vSZR");"string"==typeof a&&(a=[[t.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,n);a.locals&&(t.exports=a.locals)},E1D4:function(t,e,s){"use strict";var a=s("D2Wo");s.n(a).a},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var s=function(t,e){var s=t[1]||"",a=t[3];if(!a)return s;if(e&&"function"==typeof btoa){var n=(r=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),o=a.sources.map(function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"});return[s].concat(o).concat([n]).join("\n")}var r;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s}).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},n=0;n=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var a=function(){0;return s.nc}();a&&(t.attrs.nonce=a)}return g(e,t.attrs),m(t,e),e}function g(t,e){Object.keys(e).forEach(function(s){t.setAttribute(s,e[s])})}function b(t,e){var s,a,n,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var r=c++;s=l||(l=v(e)),a=w.bind(null,s,r,!1),n=w.bind(null,s,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),m(t,e),e}(e),a=function(t,e,s){var a=s.css,n=s.sourceMap,o=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||o)&&(a=u(a));n&&(a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var r=new Blob([a],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}.bind(null,s,e),n=function(){h(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),a=function(t,e){var s=e.css,a=e.media;a&&t.setAttribute("media",a);if(t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,s),n=function(){h(s)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=p(t,e);return f(s,e),function(t){for(var a=[],n=0;n0&&$(".load-more-link").removeClass("d-none"),$(".postCommentsLoader").addClass("d-none"),$(".postCommentsContainer").removeClass("d-none")}).catch(function(t){if(t.response)switch(t.response.status){case 401:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("Please login to view.");break;default:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")}else $(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")})},loadMore:function(t){var e=this;if(t.preventDefault(),1!=this.pagination.total_pages&&this.pagination.current_page!=this.pagination.total_pages){$(".postCommentsLoader").removeClass("d-none");var s=this.pagination.links.next;axios.get(s).then(function(t){var s=t.data.data;$(".postCommentsLoader").addClass("d-none");for(var a=0;a0?((n=e.likes).push.apply(n,a(r.data)),e.likesPage++,t.loaded()):t.complete()})},infiniteSharesHandler:function(t){var e=this;axios.get("/api/v2/shares/profile/"+this.statusUsername+"/status/"+this.statusId,{params:{page:this.sharesPage}}).then(function(s){var n,r=s.data;r.data.length>0?((n=e.shares).push.apply(n,a(r.data)),e.sharesPage++,t.loaded()):t.complete()})},likeStatus:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:this.status.id}).then(function(t){if(e.status.favourites_count=t.data.count,1==e.reactions.liked){e.reactions.liked=!1;var s=e.user.id;e.likes=e.likes.filter(function(t){return t.id!==s})}else{e.reactions.liked=!0;var a=e.user;e.likes.push(a)}}).catch(function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})},shareStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:this.status.id}).then(function(e){if(t.status.reblogs_count=e.data.count,1==t.reactions.shared){t.reactions.shared=!1;var s=t.user.id;t.shares=t.shares.filter(function(t){return t.id!==s})}else{t.reactions.shared=!0;var a=t.user;t.shares.push(a)}}).catch(function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})},bookmarkStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/bookmark",{item:this.status.id}).then(function(e){1==t.reactions.bookmarked?t.reactions.bookmarked=!1:t.reactions.bookmarked=!0}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},muteProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:this.status.account.id}).then(function(e){swal("Success","You have successfully muted "+t.status.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:this.status.account.id}).then(function(e){swal("Success","You have successfully blocked "+t.status.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},deletePost:function(t){if(confirm("Are you sure you want to delete this post?")){if(0==$("body").hasClass("loggedIn"))return;axios.post("/i/delete",{type:"status",item:this.status.id}).then(function(t){swal("Success","You have successfully deleted this post","success"),window.location.href="/"}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})}},owner:function(){return this.user.id===this.status.account.id},admin:function(){return 1==this.user.is_admin},ownerOrAdmin:function(){return this.owner()||this.admin()},lightbox:function(t){this.lightboxMedia=t,this.$refs.lightboxModal.show()}}},r=(s("qr0Y"),s("KHd+")),o=Object(r.a)(n,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"postComponent d-none"},[s("div",{staticClass:"container px-0"},[s("div",{staticClass:"card card-md-rounded-0 status-container orientation-unknown"},[s("div",{staticClass:"row px-0 mx-0"},[s("div",{staticClass:"d-flex d-md-none align-items-center justify-content-between card-header bg-white w-100"},[s("a",{staticClass:"d-flex align-items-center status-username text-truncate",attrs:{href:t.statusProfileUrl,"data-toggle":"tooltip","data-placement":"bottom",title:t.statusUsername}},[s("div",{staticClass:"status-avatar mr-2"},[s("img",{staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),s("div",{staticClass:"username"},[s("span",{staticClass:"username-link font-weight-bold text-dark"},[t._v(t._s(t.statusUsername))])])]),t._v(" "),0!=t.user?s("div",{staticClass:"float-right"},[s("div",{staticClass:"post-actions"},[s("div",{staticClass:"dropdown"},[t._m(0),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[t.owner()?t._e():s("div",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl()}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(e){return t.muteProfile()}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(e){return t.blockProfile()}}},[t._v("Block Profile")])]),t._v(" "),t.ownerOrAdmin()?s("div",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.editUrl()}},[t._v("Edit")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(e){return t.deletePost(t.status)}}},[t._v("Delete")])]):t._e()])])])]):t._e()]),t._v(" "),s("div",{staticClass:"col-12 col-md-8 px-0 mx-0"},[t._m(1),t._v(" "),s("div",{staticClass:"postPresenterContainer d-none d-flex justify-content-center align-items-center"},["photo"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("video-presenter",{attrs:{status:t.status}})],1):"photo:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("video-album-presenter",{attrs:{status:t.status}})],1):"photo:video:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):s("div",{staticClass:"w-100"},[s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])])]),t._v(" "),s("div",{staticClass:"col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0"},[s("div",{staticClass:"d-md-flex d-none align-items-center justify-content-between card-header py-3 bg-white"},[s("a",{staticClass:"d-flex align-items-center status-username text-truncate",attrs:{href:t.statusProfileUrl,"data-toggle":"tooltip","data-placement":"bottom",title:t.statusUsername}},[s("div",{staticClass:"status-avatar mr-2"},[s("img",{staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),s("div",{staticClass:"username"},[s("span",{staticClass:"username-link font-weight-bold text-dark"},[t._v(t._s(t.statusUsername))])])]),t._v(" "),s("div",{staticClass:"float-right"},[s("div",{staticClass:"post-actions"},[s("div",{staticClass:"dropdown"},[t._m(2),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[s("span",{staticClass:"menu-user d-none"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl()}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:t.muteProfile}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:t.blockProfile}},[t._v("Block Profile")])]),t._v(" "),s("span",{staticClass:"menu-author d-none"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.editUrl()}},[t._v("Edit")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:t.deletePost}},[t._v("Delete")])])])])])])]),t._v(" "),s("div",{staticClass:"d-flex flex-md-column flex-column-reverse h-100"},[s("div",{staticClass:"card-body status-comments"},[s("div",{staticClass:"status-comment"},[s("p",{staticClass:"mb-1 read-more",staticStyle:{overflow:"hidden"}},[s("span",{staticClass:"font-weight-bold pr-1"},[t._v(t._s(t.statusUsername))]),t._v(" "),s("span",{staticClass:"comment-text",attrs:{id:t.status.id+"-status-readmore"},domProps:{innerHTML:t._s(t.status.content)}})]),t._v(" "),s("post-comments",{attrs:{user:this.user,"post-id":t.statusId,"post-username":t.statusUsername}})],1)]),t._v(" "),s("div",{staticClass:"card-body flex-grow-0 py-1"},[s("div",{staticClass:"reactions my-1"},[s("h3",{class:[t.reactions.liked?"fas fa-heart text-danger pr-3 m-0":"far fa-heart pr-3 m-0 like-btn"],attrs:{title:"Like"},on:{click:t.likeStatus}}),t._v(" "),s("h3",{staticClass:"far fa-comment pr-3 m-0",attrs:{title:"Comment"},on:{click:t.commentFocus}}),t._v(" "),s("h3",{class:[t.reactions.shared?"far fa-share-square pr-3 m-0 text-primary":"far fa-share-square pr-3 m-0 share-btn"],attrs:{title:"Share"},on:{click:t.shareStatus}}),t._v(" "),s("h3",{class:[t.reactions.bookmarked?"fas fa-bookmark text-warning m-0 float-right":"far fa-bookmark m-0 float-right"],attrs:{title:"Bookmark"},on:{click:t.bookmarkStatus}})]),t._v(" "),s("div",{staticClass:"reaction-counts font-weight-bold mb-0"},[s("span",{staticStyle:{cursor:"pointer"},on:{click:t.likesModal}},[s("span",{staticClass:"like-count"},[t._v(t._s(t.status.favourites_count||0))]),t._v(" likes\n ")]),t._v(" "),s("span",{staticClass:"float-right",staticStyle:{cursor:"pointer"},on:{click:t.sharesModal}},[s("span",{staticClass:"share-count pl-4"},[t._v(t._s(t.status.reblogs_count||0))]),t._v(" shares\n ")])]),t._v(" "),s("div",{staticClass:"timestamp"},[s("a",{staticClass:"small text-muted",attrs:{href:t.statusUrl}},[t._v("\n "+t._s(t.timestampFormat())+"\n ")])])])]),t._v(" "),s("div",{staticClass:"card-footer bg-white sticky-md-bottom"},[t._m(3),t._v(" "),s("form",{staticClass:"comment-form d-none",attrs:{method:"post",action:"/i/comment","data-id":t.statusId,"data-truncate":"false"}},[s("input",{attrs:{type:"hidden",name:"_token",value:""}}),t._v(" "),s("input",{attrs:{type:"hidden",name:"item"},domProps:{value:t.statusId}}),t._v(" "),s("input",{staticClass:"form-control",attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off"}}),t._v(" "),s("input",{staticClass:"btn btn-primary comment-submit",attrs:{type:"submit",value:"Send"}})])])])])])]),t._v(" "),s("b-modal",{ref:"likesModal",attrs:{id:"l-modal","hide-footer":"",centered:"",title:"Likes","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.likes,function(e,a){return s("div",{key:"modal_likes_"+a,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])])])])}),t._v(" "),s("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteLikesHandler}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),s("b-modal",{ref:"sharesModal",attrs:{id:"s-modal","hide-footer":"",centered:"",title:"Shares","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.shares,function(e,a){return s("div",{key:"modal_shares_"+a,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("div",{staticClass:"d-inline-block"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])]),t._v(" "),s("p",{staticClass:"float-right"})])])])}),t._v(" "),s("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteSharesHandler}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),s("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":!0,"hide-footer":!0,centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?s("div",{class:t.lightboxMedia.filter_class},[s("img",{staticClass:"img-fluid",staticStyle:{"min-height":"100%","min-width":"100%"},attrs:{src:t.lightboxMedia.url}})]):t._e()])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"postPresenterLoader text-center"},[e("div",{staticClass:"lds-ring"},[e("div"),e("div"),e("div"),e("div")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"comment-form-guest"},[e("a",{attrs:{href:"/login"}},[this._v("Login")]),this._v(" to like or comment.\n ")])}],!1,null,"27d8ef40",null);e.default=o.exports},"8lQw":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.text-lighter[data-v-61f5338e] {\n color:#B8C2CC !important;\n}\n.text-break[data-v-61f5338e] {\n word-break: break-all !important;\n}\n.comments p[data-v-61f5338e] {\n margin-bottom: 0;\n}\n",""])},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var s=e.protocol+"//"+e.host,a=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(n=0===r.indexOf("//")?r:0===r.indexOf("/")?s+r:a+r.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},Bt0e:function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.status-comments[data-v-27d8ef40],\n.reactions[data-v-27d8ef40],\n.col-md-4[data-v-27d8ef40] {\n background: #fff;\n}\n.postPresenterContainer[data-v-27d8ef40] {\n background: #fff;\n}\n@media(min-width: 720px) {\n.postPresenterContainer[data-v-27d8ef40] {\n min-height: 600px;\n}\n}\n",""])},"CJs/":function(t,e,s){Vue.component("post-component",s("6ZA0").default),Vue.component("post-comments",s("oeKV").default)},D2Wo:function(t,e,s){var a=s("vSZR");"string"==typeof a&&(a=[[t.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,n);a.locals&&(t.exports=a.locals)},E1D4:function(t,e,s){"use strict";var a=s("D2Wo");s.n(a).a},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var s=function(t,e){var s=t[1]||"",a=t[3];if(!a)return s;if(e&&"function"==typeof btoa){var n=(o=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),r=a.sources.map(function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"});return[s].concat(r).concat([n]).join("\n")}var o;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s}).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},n=0;n=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var a=function(){0;return s.nc}();a&&(t.attrs.nonce=a)}return g(e,t.attrs),m(t,e),e}function g(t,e){Object.keys(e).forEach(function(s){t.setAttribute(s,e[s])})}function b(t,e){var s,a,n,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var o=c++;s=l||(l=v(e)),a=w.bind(null,s,o,!1),n=w.bind(null,s,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),m(t,e),e}(e),a=function(t,e,s){var a=s.css,n=s.sourceMap,r=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||r)&&(a=u(a));n&&(a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([a],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}.bind(null,s,e),n=function(){h(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),a=function(t,e){var s=e.css,a=e.media;a&&t.setAttribute("media",a);if(t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,s),n=function(){h(s)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=p(t,e);return f(s,e),function(t){for(var a=[],n=0;n0&&$(".load-more-link").removeClass("d-none"),$(".postCommentsLoader").addClass("d-none"),$(".postCommentsContainer").removeClass("d-none")}).catch(function(t){if(t.response)switch(t.response.status){case 401:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("Please login to view.");break;default:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")}else $(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")})},loadMore:function(t){var e=this;if(t.preventDefault(),1!=this.pagination.total_pages&&this.pagination.current_page!=this.pagination.total_pages){$(".postCommentsLoader").removeClass("d-none");var s=this.pagination.links.next;axios.get(s).then(function(t){var s=t.data.data;$(".postCommentsLoader").addClass("d-none");for(var a=0;a10?t.complete():axios.get("/api/v1/notifications",{params:{page:this.notificationCursor}}).then(function(s){if(s.data.length){var i,a=s.data.filter(function(t){return!("share"==t.type&&!status)});(i=e.notifications).push.apply(i,o(a)),e.notificationCursor++,t.loaded()}else t.complete()})},reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},commentFocus:function(t,e){this.replyId!=t.id&&(this.replies={},this.replyId=t.id,this.fetchStatusComments(t,""))},likeStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:t.id}).then(function(e){t.favourites_count=e.data.count,t.favourited=!t.favourited}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},shareStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:t.id}).then(function(e){t.reblogs_count=e.data.count,t.reblogged=!t.reblogged}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},editUrl:function(t){return t.url+"/edit"},redirect:function(t){window.location.href=t},replyUrl:function(t){return"/p/"+this.profile.username+"/"+(t.account.id==this.profile.id?t.id:t.in_reply_to_id)},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},statusOwner:function(t){return t.account.id==this.profile.id},fetchStatusComments:function(t,e){var s=this;axios.get("/api/v2/status/"+t.id+"/replies").then(function(t){var e=t.data;s.replies=_.reverse(e)}).catch(function(t){})},muteProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully muted "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully blocked "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},deletePost:function(t,e){var s=this;0!=$("body").hasClass("loggedIn")&&t.account.id===this.profile.id&&axios.post("/i/delete",{type:"status",item:t.id}).then(function(t){s.feed.splice(e,1),swal("Success","You have successfully deleted this post","success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},commentSubmit:function(t,e){var s=this,o=t.id,i=e.target,a=$(i).find('input[name="comment"]').val();i.parentElement.parentElement.getElementsByClassName("comments")[0];axios.post("/i/comment",{item:o,comment:a}).then(function(t){i.reset(),i.blur(),s.replies.push(t.data.entity)})},moderatePost:function(t,e,s){var o=t.account.username;switch(console.log("action: "+e+" status id"+t.id),e){case"autocw":var i="Are you sure you want to enforce CW for "+o+" ?";swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully enforced CW for "+o,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"noautolink":i="Are you sure you want to disable auto linking for "+o+" ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled autolinking for "+o,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"unlisted":i="Are you sure you want to unlist from timelines for "+o+" ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully unlisted for "+o,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"disable":i="Are you sure you want to disable "+o+"’s account ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled "+o+"’s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"suspend":i="Are you sure you want to suspend "+o+"’s account ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully suspend "+o+"’s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})})}},toggleOptionsMenu:function(){this.optionMenuState=!this.optionMenuState},modeModToggle:function(){this.modes.mod=!this.modes.mod,window.ls.set("pixelfed-classicui-settings",this.modes)},modeNotifyToggle:function(){this.modes.notify=!this.modes.notify,window.ls.set("pixelfed-classicui-settings",this.modes)},modeDarkToggle:function(){if(1==this.modes.dark)this.modes.dark=!1,$("link[data-stylesheet=dark]").remove();else{this.modes.dark=!0;var t=document.head,e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href="/css/appdark.css",e.setAttribute("data-stylesheet","dark"),t.appendChild(e)}window.ls.set("pixelfed-classicui-settings",this.modes)},modeInfiniteToggle:function(){this.modes.infinite=!this.modes.infinite,window.ls.set("pixelfed-classicui-settings",this.modes)},followingModal:function(){var t=this;this.following.length>0?this.$refs.followingModal.show():(axios.get("/api/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){t.following=e.data,t.followingCursor++}),res.data.length<10&&(this.followingMore=!1),this.$refs.followingModal.show())},followersModal:function(){var t=this;this.followers.length>0?this.$refs.followerModal.show():(axios.get("/api/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){t.followers=e.data,t.followerCursor++}),res.data.length<10&&(this.followerMore=!1),this.$refs.followerModal.show())},followingLoadMore:function(){var t=this;axios.get("/api/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){var s;e.data.length>0&&((s=t.following).push.apply(s,o(e.data)),t.followingCursor++);e.data.length<10&&(t.followingMore=!1)})},followersLoadMore:function(){var t=this;axios.get("/api/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){var s;e.data.length>0&&((s=t.followers).push.apply(s,o(e.data)),t.followerCursor++);e.data.length<10&&(t.followerMore=!1)})},lightbox:function(t){this.lightboxMedia=t,this.$refs.lightboxModal.show()}}},a=(s("Yq+e"),s("KHd+")),n=Object(a.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-md-8 col-lg-8 pt-sm-2 px-0 my-sm-3 timeline order-2 order-md-1"},[t.loading?s("div",{staticClass:"text-center"},[t._m(0)]):t._e(),t._v(" "),t._l(t.feed,function(e,o){return s("div",{key:e.id,staticClass:"card mb-sm-4 status-card card-md-rounded-0",attrs:{"data-status-id":e.id}},[s("div",{staticClass:"card-header d-inline-flex align-items-center bg-white"},[s("img",{staticStyle:{"border-radius":"32px"},attrs:{src:e.account.avatar,width:"32px",height:"32px"}}),t._v(" "),s("a",{staticClass:"username font-weight-bold pl-2 text-dark",attrs:{href:e.account.url}},[t._v("\n\t\t\t\t\t\t"+t._s(e.account.username)+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[t._m(1,!0),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:e.url}},[t._v("Go to post")]),t._v(" "),0==t.statusOwner(e)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl(e)}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.muteProfile(e)}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.blockProfile(e)}}},[t._v("Block Profile")])]):t._e(),t._v(" "),1==t.statusOwner(e)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(s){return t.deletePost(e)}}},[t._v("Delete")])]):t._e(),t._v(" "),1==t.profile.is_admin&&1==t.modes.mod?s("span",[s("div",{staticClass:"dropdown-divider"}),t._v(" "),t.statusOwner(e)?t._e():s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(s){return t.deletePost(e)}}},[t._v("Delete")]),t._v(" "),s("div",{staticClass:"dropdown-divider"}),t._v(" "),s("h6",{staticClass:"dropdown-header"},[t._v("Mod Tools")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"autocw")}}},[s("p",{staticClass:"mb-0",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:"Adds a CW to every post made by this account."}},[t._v("Enforce CW")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"noautolink")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Do not transform mentions, hashtags or urls into HTML."}},[t._v("No Autolinking")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"unlisted")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Removes account from public/network timelines."}},[t._v("Unlisted Posts")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"disable")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Temporarily disable account until next time user log in."}},[t._v("Disable Account")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"suspend")}}},[s("p",{staticClass:"mb-0",attrs:{title:"This prevents any new interactions, without deleting existing data."}},[t._v("Suspend Account")])])]):t._e()])])]),t._v(" "),s("div",{staticClass:"postPresenterContainer"},["photo"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-presenter",{attrs:{status:e}})],1):"photo:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-album-presenter",{attrs:{status:e}})],1):"photo:video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("mixed-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):s("div",{staticClass:"w-100"},[s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])]),t._v(" "),s("div",{staticClass:"card-body"},[s("div",{staticClass:"reactions my-1"},[s("h3",{class:[e.favourited?"fas fa-heart text-danger pr-3 m-0 cursor-pointer":"far fa-heart pr-3 m-0 like-btn cursor-pointer"],attrs:{title:"Like"},on:{click:function(s){return t.likeStatus(e,s)}}}),t._v(" "),s("h3",{staticClass:"far fa-comment pr-3 m-0 cursor-pointer",attrs:{title:"Comment"},on:{click:function(s){return t.commentFocus(e,s)}}}),t._v(" "),s("h3",{class:[e.reblogged?"far fa-share-square pr-3 m-0 text-primary cursor-pointer":"far fa-share-square pr-3 m-0 share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:function(s){return t.shareStatus(e,s)}}})]),t._v(" "),s("div",{staticClass:"likes font-weight-bold"},[s("span",{staticClass:"like-count"},[t._v(t._s(e.favourites_count))]),t._v(" "+t._s(1==e.favourites_count?"like":"likes")+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"caption"},[s("p",{staticClass:"mb-2 read-more",staticStyle:{overflow:"hidden"}},[s("span",{staticClass:"username font-weight-bold"},[s("bdi",[s("a",{staticClass:"text-dark",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))])])]),t._v(" "),s("span",{domProps:{innerHTML:t._s(e.content)}})])]),t._v(" "),e.id==t.replyId?s("div",{staticClass:"comments"},t._l(t.replies,function(e,o){return s("p",{staticClass:"mb-0 d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[s("span",[s("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" "),s("span",{domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),s("span",{staticClass:"mb-0",staticStyle:{"min-width":"38px"}},[s("span",{on:{click:function(s){return t.likeStatus(e,s)}}},[s("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger":"far fa-heart fa-sm text-lighter"]})]),t._v(" "),s("post-menu",{staticClass:"d-inline-flex pl-2",attrs:{status:e,profile:t.profile,size:"sm",modal:"true",feed:t.feed}})],1)])}),0):t._e(),t._v(" "),s("div",{staticClass:"timestamp mt-2"},[s("p",{staticClass:"small text-uppercase mb-0"},[s("a",{staticClass:"text-muted",attrs:{href:e.url}},[s("timeago",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.bottom",modifiers:{hover:!0,bottom:!0}}],attrs:{datetime:e.created_at,"auto-update":60,"converter-options":{includeSeconds:!0},title:t.timestampFormat(e.created_at)}})],1)])])]),t._v(" "),e.id==t.replyId?s("div",{staticClass:"card-footer bg-white"},[s("form",{on:{submit:function(s){return s.preventDefault(),t.commentSubmit(e,s)}}},[s("input",{attrs:{type:"hidden",name:"item",value:""}}),t._v(" "),s("input",{staticClass:"form-control status-reply-input",attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off"}})])]):t._e()])}),t._v(" "),1==t.modes.infinite&&!t.loading&&t.feed.length>0?s("div",[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[s("infinite-loading",{on:{infinite:t.infiniteTimeline}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"},[t._v("No more posts to load")]),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"},[t._v("No posts found")])])],1)])]):t._e(),t._v(" "),0==t.modes.infinite&&!t.loading&&t.feed.length>0?s("div",{staticClass:"pagination"},[s("p",{staticClass:"btn btn-outline-secondary font-weight-bold btn-block",on:{click:t.loadMore}},[t._v("Load more posts")])]):t._e(),t._v(" "),t.loading||"home"!=t.scope||0!=t.feed.length?t._e():s("div",[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body text-center"},[s("p",{staticClass:"h2 font-weight-lighter p-5"},[t._v("Hello, "+t._s(t.profile.acct))]),t._v(" "),t._m(2),t._v(" "),s("p",{staticClass:"h3 font-weight-lighter p-5"},[t._v("Start following people to build your timeline.")]),t._v(" "),t._m(3)])])])],2),t._v(" "),s("div",{staticClass:"col-md-4 col-lg-4 pt-2 my-3 order-1 order-md-2 d-none d-md-block"},[s("div",{staticClass:"mb-4"},[s("div",{staticClass:"card profile-card"},[t._m(4),t._v(" "),s("div",{staticClass:"card-body contents d-none"},[s("div",{staticClass:"media d-flex align-items-center"},[s("a",{attrs:{href:t.profile.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:t.profile.avatar||"/storage/avatars/default.png",alt:"avatar",width:"64px",height:"64px"}})]),t._v(" "),s("div",{staticClass:"media-body d-flex justify-content-between word-break"},[s("div",[s("p",{staticClass:"mb-0 px-0 font-weight-bold"},[s("a",{staticClass:"text-dark",attrs:{href:t.profile.url}},[t._v("@"+t._s(t.profile.username))])]),t._v(" "),s("p",{staticClass:"my-0 text-muted pb-0"},[t._v(t._s(t.profile.display_name))])]),t._v(" "),s("div",{staticClass:"ml-2"},[s("a",{class:[1==t.optionMenuState?"text-primary":"text-muted"],on:{click:function(e){return t.toggleOptionsMenu()}}},[s("i",{staticClass:"fas fa-cog"})])])])])]),t._v(" "),s("div",{staticClass:"card-footer bg-white py-1 d-none"},[s("div",{staticClass:"d-flex justify-content-between text-center"},[s("span",{staticClass:"pl-3 cursor-pointer",on:{click:function(e){return t.redirect(t.profile.url)}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.profile.statuses_count))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Posts")])]),t._v(" "),s("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.followersModal()}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.profile.followers_count))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Followers")])]),t._v(" "),s("span",{staticClass:"pr-3 cursor-pointer",on:{click:function(e){return t.followingModal()}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.profile.following_count))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Following")])])])])])]),t._v(" "),1==t.optionMenuState?s("div",{staticClass:"mb-4"},[s("div",{staticClass:"card options-card"},[s("div",{staticClass:"card-body small"},[t.profile.is_admin?s("div",{staticClass:"custom-control custom-switch mb-3"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.mod,expression:"modes.mod"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-mod"},domProps:{checked:Array.isArray(t.modes.mod)?t._i(t.modes.mod,null)>-1:t.modes.mod},on:{click:function(e){return t.modeModToggle()},change:function(e){var s=t.modes.mod,o=e.target,i=!!o.checked;if(Array.isArray(s)){var a=t._i(s,null);o.checked?a<0&&t.$set(t.modes,"mod",s.concat([null])):a>-1&&t.$set(t.modes,"mod",s.slice(0,a).concat(s.slice(a+1)))}else t.$set(t.modes,"mod",i)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-mod"}},[t._v("Moderator Mode")])]):t._e(),t._v(" "),s("div",{staticClass:"custom-control custom-switch"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.infinite,expression:"modes.infinite"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-infinite"},domProps:{checked:Array.isArray(t.modes.infinite)?t._i(t.modes.infinite,null)>-1:t.modes.infinite},on:{click:function(e){return t.modeInfiniteToggle()},change:function(e){var s=t.modes.infinite,o=e.target,i=!!o.checked;if(Array.isArray(s)){var a=t._i(s,null);o.checked?a<0&&t.$set(t.modes,"infinite",s.concat([null])):a>-1&&t.$set(t.modes,"infinite",s.slice(0,a).concat(s.slice(a+1)))}else t.$set(t.modes,"infinite",i)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-infinite"}},[t._v("Enable Infinite Scroll")])]),t._v(" "),s("hr"),t._v(" "),s("p",{staticClass:"font-weight-bold"},[t._v("BETA FEATURES")]),t._v(" "),s("div",{staticClass:"custom-control custom-switch"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.dark,expression:"modes.dark"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-dark"},domProps:{checked:Array.isArray(t.modes.dark)?t._i(t.modes.dark,null)>-1:t.modes.dark},on:{click:function(e){return t.modeDarkToggle()},change:function(e){var s=t.modes.dark,o=e.target,i=!!o.checked;if(Array.isArray(s)){var a=t._i(s,null);o.checked?a<0&&t.$set(t.modes,"dark",s.concat([null])):a>-1&&t.$set(t.modes,"dark",s.slice(0,a).concat(s.slice(a+1)))}else t.$set(t.modes,"dark",i)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-dark"}},[t._v("Dark Mode")])])])])]):t._e(),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.modes.notify,expression:"modes.notify == true"}],staticClass:"mb-4"},[s("div",{staticClass:"card notification-card"},[t._m(5),t._v(" "),t._m(6),t._v(" "),s("div",{staticClass:"card-body pt-2 contents",staticStyle:{"max-height":"270px","overflow-y":"scroll"}},[t._l(t.notifications,function(e,o){return t.notifications.length>0?s("div",{staticClass:"media mb-3 align-items-center"},[s("img",{staticClass:"mr-2 rounded-circle",staticStyle:{border:"1px solid #ccc"},attrs:{src:e.account.avatar,alt:"",width:"32px",height:"32px"}}),t._v(" "),s("div",{staticClass:"media-body font-weight-light small"},["favourite"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" liked your "),s("a",{staticClass:"font-weight-bold",attrs:{href:t.replyUrl(e.status)}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t\t\t")])]):"comment"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" commented on your "),s("a",{staticClass:"font-weight-bold",attrs:{href:t.replyUrl(e.status)}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t\t\t")])]):"mention"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(e.status)}},[t._v("mentioned")]),t._v(" you.\n\t\t\t\t\t\t\t\t\t")])]):"follow"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" followed you.\n\t\t\t\t\t\t\t\t\t")])]):"share"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" shared your "),s("a",{staticClass:"font-weight-bold",attrs:{href:e.status.reblog.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t\t\t")])]):t._e()])]):t._e()}),t._v(" "),t.notifications.length?s("div",[s("infinite-loading",{on:{infinite:t.infiniteNotifications}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e(),t._v(" "),0==t.notifications.length?s("div",{staticClass:"text-lighter text-center py-3"},[t._m(7),t._v(" "),s("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("0 Notifications!")])]):t._e()],2)])]),t._v(" "),t._m(8)])]),t._v(" "),s("b-modal",{ref:"followingModal",attrs:{id:"following-modal","hide-footer":"",centered:"",title:"Following","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.following,function(e,o){return s("div",{key:"following_"+o,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])])])])}),t._v(" "),t.followingMore?s("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followingLoadMore()}}},[s("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),s("b-modal",{ref:"followerModal",attrs:{id:"follower-modal","hide-footer":"",centered:"",title:"Followers","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.followers,function(e,o){return s("div",{key:"follower_"+o,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])])])])}),t._v(" "),t.followerMore?s("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followersLoadMore()}}},[s("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),s("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":"true","hide-footer":"true",centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?s("div",{class:t.lightboxMedia.filter_class},[s("img",{staticClass:"img-fluid",attrs:{src:t.lightboxMedia.url}})]):t._e()])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle py-0",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v fa-lg text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"text-lighter"},[e("i",{staticClass:"fas fa-camera-retro fa-5x"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("a",{staticClass:"btn btn-primary font-weight-bold py-0",attrs:{href:"/discover"}},[this._v("Discover new people and posts")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body loader text-center"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header bg-white"},[e("p",{staticClass:"mb-0 d-flex align-items-center justify-content-between"},[e("span",{staticClass:"text-muted font-weight-bold"},[this._v("Notifications")]),this._v(" "),e("a",{staticClass:"text-dark small",attrs:{href:"/account/activity"}},[this._v("See All")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body loader text-center",staticStyle:{height:"270px"}},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("i",{staticClass:"fas fa-inbox fa-3x"})])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("footer",[s("div",{staticClass:"container pb-5"},[s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/about"}},[t._v("About Us")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/help"}},[t._v("Help")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/open-source"}},[t._v("Open Source")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/language"}},[t._v("Language")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/terms"}},[t._v("Terms")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/privacy"}},[t._v("Privacy")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/platform"}},[t._v("API")])]),t._v(" "),s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-muted",attrs:{href:"http://pixelfed.org",rel:"noopener",title:"","data-toggle":"tooltip"}},[t._v("Powered by PixelFed")])])])])}],!1,null,"c18c40ce",null);e.default=n.exports},KqaD:function(t,e,s){Vue.component("timeline",s("KhVi").default)},"Yq+e":function(t,e,s){"use strict";var o=s("rj47");s.n(o).a},"aET+":function(t,e,s){var o,i,a={},n=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=o.apply(this,arguments)),i}),r=function(t){var e={};return function(t,s){if("function"==typeof t)return t();if(void 0===e[t]){var o=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,s);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}}(),l=null,c=0,d=[],u=s("9tPo");function f(t,e){for(var s=0;s=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){0;return s.nc}();o&&(t.attrs.nonce=o)}return g(e,t.attrs),m(t,e),e}function g(t,e){Object.keys(e).forEach(function(s){t.setAttribute(s,e[s])})}function _(t,e){var s,o,i,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var n=c++;s=l||(l=v(e)),o=y.bind(null,s,n,!1),i=y.bind(null,s,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),m(t,e),e}(e),o=function(t,e,s){var o=s.css,i=s.sourceMap,a=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||a)&&(o=u(o));i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var n=new Blob([o],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(n),r&&URL.revokeObjectURL(r)}.bind(null,s,e),i=function(){h(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),o=function(t,e){var s=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,s),i=function(){h(s)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=n()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=p(t,e);return f(s,e),function(t){for(var o=[],i=0;i10?t.complete():axios.get("/api/v1/notifications",{params:{page:this.notificationCursor}}).then(function(s){if(s.data.length){var i,a=s.data.filter(function(t){return!("share"==t.type&&!status)});(i=e.notifications).push.apply(i,o(a)),e.notificationCursor++,t.loaded()}else t.complete()})},reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},commentFocus:function(t,e){this.replyId!=t.id&&(this.replies={},this.replyId=t.id,this.fetchStatusComments(t,""))},likeStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:t.id}).then(function(e){t.favourites_count=e.data.count,t.favourited=!t.favourited}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},shareStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:t.id}).then(function(e){t.reblogs_count=e.data.count,t.reblogged=!t.reblogged}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},editUrl:function(t){return t.url+"/edit"},redirect:function(t){window.location.href=t},replyUrl:function(t){return"/p/"+this.profile.username+"/"+(t.account.id==this.profile.id?t.id:t.in_reply_to_id)},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},statusOwner:function(t){return t.account.id==this.profile.id},fetchStatusComments:function(t,e){var s=this;axios.get("/api/v2/status/"+t.id+"/replies").then(function(t){var e=t.data;s.replies=_.reverse(e)}).catch(function(t){})},muteProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully muted "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully blocked "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},deletePost:function(t,e){var s=this;0!=$("body").hasClass("loggedIn")&&t.account.id===this.profile.id&&axios.post("/i/delete",{type:"status",item:t.id}).then(function(t){s.feed.splice(e,1),swal("Success","You have successfully deleted this post","success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},commentSubmit:function(t,e){var s=this,o=t.id,i=e.target,a=$(i).find('input[name="comment"]').val();i.parentElement.parentElement.getElementsByClassName("comments")[0];axios.post("/i/comment",{item:o,comment:a}).then(function(t){i.reset(),i.blur(),s.replies.push(t.data.entity)})},moderatePost:function(t,e,s){var o=t.account.username;switch(console.log("action: "+e+" status id"+t.id),e){case"autocw":var i="Are you sure you want to enforce CW for "+o+" ?";swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully enforced CW for "+o,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"noautolink":i="Are you sure you want to disable auto linking for "+o+" ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled autolinking for "+o,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"unlisted":i="Are you sure you want to unlist from timelines for "+o+" ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully unlisted for "+o,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"disable":i="Are you sure you want to disable "+o+"’s account ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled "+o+"’s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"suspend":i="Are you sure you want to suspend "+o+"’s account ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully suspend "+o+"’s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})})}},toggleOptionsMenu:function(){this.optionMenuState=!this.optionMenuState},modeModToggle:function(){this.modes.mod=!this.modes.mod,window.ls.set("pixelfed-classicui-settings",this.modes)},modeNotifyToggle:function(){this.modes.notify=!this.modes.notify,window.ls.set("pixelfed-classicui-settings",this.modes)},modeDarkToggle:function(){if(1==this.modes.dark)this.modes.dark=!1,$("link[data-stylesheet=dark]").remove();else{this.modes.dark=!0;var t=document.head,e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href="/css/appdark.css",e.setAttribute("data-stylesheet","dark"),t.appendChild(e)}window.ls.set("pixelfed-classicui-settings",this.modes)},modeInfiniteToggle:function(){this.modes.infinite=!this.modes.infinite,window.ls.set("pixelfed-classicui-settings",this.modes)},followingModal:function(){var t=this;this.following.length>0?this.$refs.followingModal.show():(axios.get("/api/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){t.following=e.data,t.followingCursor++}),res.data.length<10&&(this.followingMore=!1),this.$refs.followingModal.show())},followersModal:function(){var t=this;this.followers.length>0?this.$refs.followerModal.show():(axios.get("/api/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){t.followers=e.data,t.followerCursor++}),res.data.length<10&&(this.followerMore=!1),this.$refs.followerModal.show())},followingLoadMore:function(){var t=this;axios.get("/api/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){var s;e.data.length>0&&((s=t.following).push.apply(s,o(e.data)),t.followingCursor++);e.data.length<10&&(t.followingMore=!1)})},followersLoadMore:function(){var t=this;axios.get("/api/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){var s;e.data.length>0&&((s=t.followers).push.apply(s,o(e.data)),t.followerCursor++);e.data.length<10&&(t.followerMore=!1)})},lightbox:function(t){this.lightboxMedia=t,this.$refs.lightboxModal.show()}}},a=(s("Da4r"),s("KHd+")),n=Object(a.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-md-8 col-lg-8 pt-sm-2 px-0 my-sm-3 timeline order-2 order-md-1"},[t.loading?s("div",{staticClass:"text-center"},[t._m(0)]):t._e(),t._v(" "),t._l(t.feed,function(e,o){return s("div",{key:e.id,staticClass:"card mb-sm-4 status-card card-md-rounded-0",attrs:{"data-status-id":e.id}},[s("div",{staticClass:"card-header d-inline-flex align-items-center bg-white"},[s("img",{staticStyle:{"border-radius":"32px"},attrs:{src:e.account.avatar,width:"32px",height:"32px"}}),t._v(" "),s("a",{staticClass:"username font-weight-bold pl-2 text-dark",attrs:{href:e.account.url}},[t._v("\n\t\t\t\t\t\t"+t._s(e.account.username)+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[t._m(1,!0),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:e.url}},[t._v("Go to post")]),t._v(" "),0==t.statusOwner(e)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl(e)}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.muteProfile(e)}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.blockProfile(e)}}},[t._v("Block Profile")])]):t._e(),t._v(" "),1==t.statusOwner(e)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(s){return t.deletePost(e)}}},[t._v("Delete")])]):t._e(),t._v(" "),1==t.profile.is_admin&&1==t.modes.mod?s("span",[s("div",{staticClass:"dropdown-divider"}),t._v(" "),t.statusOwner(e)?t._e():s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(s){return t.deletePost(e)}}},[t._v("Delete")]),t._v(" "),s("div",{staticClass:"dropdown-divider"}),t._v(" "),s("h6",{staticClass:"dropdown-header"},[t._v("Mod Tools")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"autocw")}}},[s("p",{staticClass:"mb-0",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:"Adds a CW to every post made by this account."}},[t._v("Enforce CW")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"noautolink")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Do not transform mentions, hashtags or urls into HTML."}},[t._v("No Autolinking")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"unlisted")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Removes account from public/network timelines."}},[t._v("Unlisted Posts")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"disable")}}},[s("p",{staticClass:"mb-0",attrs:{title:"Temporarily disable account until next time user log in."}},[t._v("Disable Account")])]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(s){return t.moderatePost(e,"suspend")}}},[s("p",{staticClass:"mb-0",attrs:{title:"This prevents any new interactions, without deleting existing data."}},[t._v("Suspend Account")])])]):t._e()])])]),t._v(" "),s("div",{staticClass:"postPresenterContainer"},["photo"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-presenter",{attrs:{status:e}})],1):"photo:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-album-presenter",{attrs:{status:e}})],1):"photo:video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("mixed-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):s("div",{staticClass:"w-100"},[s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])]),t._v(" "),s("div",{staticClass:"card-body"},[s("div",{staticClass:"reactions my-1"},[s("h3",{class:[e.favourited?"fas fa-heart text-danger pr-3 m-0 cursor-pointer":"far fa-heart pr-3 m-0 like-btn cursor-pointer"],attrs:{title:"Like"},on:{click:function(s){return t.likeStatus(e,s)}}}),t._v(" "),s("h3",{staticClass:"far fa-comment pr-3 m-0 cursor-pointer",attrs:{title:"Comment"},on:{click:function(s){return t.commentFocus(e,s)}}}),t._v(" "),s("h3",{class:[e.reblogged?"far fa-share-square pr-3 m-0 text-primary cursor-pointer":"far fa-share-square pr-3 m-0 share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:function(s){return t.shareStatus(e,s)}}})]),t._v(" "),s("div",{staticClass:"likes font-weight-bold"},[s("span",{staticClass:"like-count"},[t._v(t._s(e.favourites_count))]),t._v(" "+t._s(1==e.favourites_count?"like":"likes")+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"caption"},[s("p",{staticClass:"mb-2 read-more",staticStyle:{overflow:"hidden"}},[s("span",{staticClass:"username font-weight-bold"},[s("bdi",[s("a",{staticClass:"text-dark",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))])])]),t._v(" "),s("span",{domProps:{innerHTML:t._s(e.content)}})])]),t._v(" "),e.id==t.replyId?s("div",{staticClass:"comments"},t._l(t.replies,function(e,o){return s("p",{staticClass:"mb-0 d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[s("span",[s("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" "),s("span",{domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),s("span",{staticClass:"mb-0",staticStyle:{"min-width":"38px"}},[s("span",{on:{click:function(s){return t.likeStatus(e,s)}}},[s("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger":"far fa-heart fa-sm text-lighter"]})]),t._v(" "),s("post-menu",{staticClass:"d-inline-flex pl-2",attrs:{status:e,profile:t.profile,size:"sm",modal:"true",feed:t.feed}})],1)])}),0):t._e(),t._v(" "),s("div",{staticClass:"timestamp mt-2"},[s("p",{staticClass:"small text-uppercase mb-0"},[s("a",{staticClass:"text-muted",attrs:{href:e.url}},[s("timeago",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.bottom",modifiers:{hover:!0,bottom:!0}}],attrs:{datetime:e.created_at,"auto-update":60,"converter-options":{includeSeconds:!0},title:t.timestampFormat(e.created_at)}})],1)])])]),t._v(" "),e.id==t.replyId?s("div",{staticClass:"card-footer bg-white"},[s("form",{on:{submit:function(s){return s.preventDefault(),t.commentSubmit(e,s)}}},[s("input",{attrs:{type:"hidden",name:"item",value:""}}),t._v(" "),s("input",{staticClass:"form-control status-reply-input",attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off"}})])]):t._e()])}),t._v(" "),1==t.modes.infinite&&!t.loading&&t.feed.length>0?s("div",[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[s("infinite-loading",{on:{infinite:t.infiniteTimeline}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"},[t._v("No more posts to load")]),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"},[t._v("No posts found")])])],1)])]):t._e(),t._v(" "),0==t.modes.infinite&&!t.loading&&t.feed.length>0?s("div",{staticClass:"pagination"},[s("p",{staticClass:"btn btn-outline-secondary font-weight-bold btn-block",on:{click:t.loadMore}},[t._v("Load more posts")])]):t._e(),t._v(" "),t.loading||"home"!=t.scope||0!=t.feed.length?t._e():s("div",[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body text-center"},[s("p",{staticClass:"h2 font-weight-lighter p-5"},[t._v("Hello, "+t._s(t.profile.acct))]),t._v(" "),t._m(2),t._v(" "),s("p",{staticClass:"h3 font-weight-lighter p-5"},[t._v("Start following people to build your timeline.")]),t._v(" "),t._m(3)])])])],2),t._v(" "),s("div",{staticClass:"col-md-4 col-lg-4 pt-2 my-3 order-1 order-md-2 d-none d-md-block"},[s("div",{staticClass:"mb-4"},[s("div",{staticClass:"card profile-card"},[t._m(4),t._v(" "),s("div",{staticClass:"card-body contents d-none"},[s("div",{staticClass:"media d-flex align-items-center"},[s("a",{attrs:{href:t.profile.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:t.profile.avatar||"/storage/avatars/default.png",alt:"avatar",width:"64px",height:"64px"}})]),t._v(" "),s("div",{staticClass:"media-body d-flex justify-content-between word-break"},[s("div",[s("p",{staticClass:"mb-0 px-0 font-weight-bold"},[s("a",{staticClass:"text-dark",attrs:{href:t.profile.url}},[t._v("@"+t._s(t.profile.username))])]),t._v(" "),s("p",{staticClass:"my-0 text-muted pb-0"},[t._v(t._s(t.profile.display_name))])]),t._v(" "),s("div",{staticClass:"ml-2"},[s("a",{class:[1==t.optionMenuState?"text-primary":"text-muted"],on:{click:function(e){return t.toggleOptionsMenu()}}},[s("i",{staticClass:"fas fa-cog"})])])])])]),t._v(" "),s("div",{staticClass:"card-footer bg-white py-1 d-none"},[s("div",{staticClass:"d-flex justify-content-between text-center"},[s("span",{staticClass:"pl-3 cursor-pointer",on:{click:function(e){return t.redirect(t.profile.url)}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.profile.statuses_count))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Posts")])]),t._v(" "),s("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.followersModal()}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.profile.followers_count))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Followers")])]),t._v(" "),s("span",{staticClass:"pr-3 cursor-pointer",on:{click:function(e){return t.followingModal()}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.profile.following_count))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Following")])])])])])]),t._v(" "),1==t.optionMenuState?s("div",{staticClass:"mb-4"},[s("div",{staticClass:"card options-card"},[s("div",{staticClass:"card-body small"},[t.profile.is_admin?s("div",{staticClass:"custom-control custom-switch mb-3"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.mod,expression:"modes.mod"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-mod"},domProps:{checked:Array.isArray(t.modes.mod)?t._i(t.modes.mod,null)>-1:t.modes.mod},on:{click:function(e){return t.modeModToggle()},change:function(e){var s=t.modes.mod,o=e.target,i=!!o.checked;if(Array.isArray(s)){var a=t._i(s,null);o.checked?a<0&&t.$set(t.modes,"mod",s.concat([null])):a>-1&&t.$set(t.modes,"mod",s.slice(0,a).concat(s.slice(a+1)))}else t.$set(t.modes,"mod",i)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-mod"}},[t._v("Moderator Mode")])]):t._e(),t._v(" "),s("div",{staticClass:"custom-control custom-switch"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.infinite,expression:"modes.infinite"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-infinite"},domProps:{checked:Array.isArray(t.modes.infinite)?t._i(t.modes.infinite,null)>-1:t.modes.infinite},on:{click:function(e){return t.modeInfiniteToggle()},change:function(e){var s=t.modes.infinite,o=e.target,i=!!o.checked;if(Array.isArray(s)){var a=t._i(s,null);o.checked?a<0&&t.$set(t.modes,"infinite",s.concat([null])):a>-1&&t.$set(t.modes,"infinite",s.slice(0,a).concat(s.slice(a+1)))}else t.$set(t.modes,"infinite",i)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-infinite"}},[t._v("Enable Infinite Scroll")])]),t._v(" "),s("hr"),t._v(" "),s("p",{staticClass:"font-weight-bold"},[t._v("BETA FEATURES")]),t._v(" "),s("div",{staticClass:"custom-control custom-switch"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.modes.dark,expression:"modes.dark"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"mode-dark"},domProps:{checked:Array.isArray(t.modes.dark)?t._i(t.modes.dark,null)>-1:t.modes.dark},on:{click:function(e){return t.modeDarkToggle()},change:function(e){var s=t.modes.dark,o=e.target,i=!!o.checked;if(Array.isArray(s)){var a=t._i(s,null);o.checked?a<0&&t.$set(t.modes,"dark",s.concat([null])):a>-1&&t.$set(t.modes,"dark",s.slice(0,a).concat(s.slice(a+1)))}else t.$set(t.modes,"dark",i)}}}),t._v(" "),s("label",{staticClass:"custom-control-label font-weight-bold",attrs:{for:"mode-dark"}},[t._v("Dark Mode")])])])])]):t._e(),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.modes.notify,expression:"modes.notify == true"}],staticClass:"mb-4"},[s("div",{staticClass:"card notification-card"},[t._m(5),t._v(" "),t._m(6),t._v(" "),s("div",{staticClass:"card-body pt-2 contents",staticStyle:{"max-height":"270px","overflow-y":"scroll"}},[t._l(t.notifications,function(e,o){return t.notifications.length>0?s("div",{staticClass:"media mb-3 align-items-center"},[s("img",{staticClass:"mr-2 rounded-circle",staticStyle:{border:"1px solid #ccc"},attrs:{src:e.account.avatar,alt:"",width:"32px",height:"32px"}}),t._v(" "),s("div",{staticClass:"media-body font-weight-light small"},["favourite"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" liked your "),s("a",{staticClass:"font-weight-bold",attrs:{href:t.replyUrl(e.status)}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t\t\t")])]):"comment"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" commented on your "),s("a",{staticClass:"font-weight-bold",attrs:{href:t.replyUrl(e.status)}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t\t\t")])]):"mention"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(e.status)}},[t._v("mentioned")]),t._v(" you.\n\t\t\t\t\t\t\t\t\t")])]):"follow"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" followed you.\n\t\t\t\t\t\t\t\t\t")])]):"share"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))]),t._v(" shared your "),s("a",{staticClass:"font-weight-bold",attrs:{href:e.status.reblog.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t\t\t")])]):t._e()])]):t._e()}),t._v(" "),t.notifications.length?s("div",[s("infinite-loading",{on:{infinite:t.infiniteNotifications}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e(),t._v(" "),0==t.notifications.length?s("div",{staticClass:"text-lighter text-center py-3"},[t._m(7),t._v(" "),s("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("0 Notifications!")])]):t._e()],2)])]),t._v(" "),t._m(8)])]),t._v(" "),s("b-modal",{ref:"followingModal",attrs:{id:"following-modal","hide-footer":"",centered:"",title:"Following","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.following,function(e,o){return s("div",{key:"following_"+o,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])])])])}),t._v(" "),t.followingMore?s("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followingLoadMore()}}},[s("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),s("b-modal",{ref:"followerModal",attrs:{id:"follower-modal","hide-footer":"",centered:"",title:"Followers","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.followers,function(e,o){return s("div",{key:"follower_"+o,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])])])])}),t._v(" "),t.followerMore?s("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followersLoadMore()}}},[s("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),s("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":"true","hide-footer":"true",centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?s("div",{class:t.lightboxMedia.filter_class},[s("img",{staticClass:"img-fluid",staticStyle:{"min-height":"100%","min-width":"100%"},attrs:{src:t.lightboxMedia.url}})]):t._e()])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle py-0",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v fa-lg text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"text-lighter"},[e("i",{staticClass:"fas fa-camera-retro fa-5x"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("a",{staticClass:"btn btn-primary font-weight-bold py-0",attrs:{href:"/discover"}},[this._v("Discover new people and posts")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body loader text-center"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header bg-white"},[e("p",{staticClass:"mb-0 d-flex align-items-center justify-content-between"},[e("span",{staticClass:"text-muted font-weight-bold"},[this._v("Notifications")]),this._v(" "),e("a",{staticClass:"text-dark small",attrs:{href:"/account/activity"}},[this._v("See All")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body loader text-center",staticStyle:{height:"270px"}},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("i",{staticClass:"fas fa-inbox fa-3x"})])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("footer",[s("div",{staticClass:"container pb-5"},[s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/about"}},[t._v("About Us")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/help"}},[t._v("Help")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/open-source"}},[t._v("Open Source")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/language"}},[t._v("Language")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/terms"}},[t._v("Terms")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/privacy"}},[t._v("Privacy")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/platform"}},[t._v("API")])]),t._v(" "),s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-muted",attrs:{href:"http://pixelfed.org",rel:"noopener",title:"","data-toggle":"tooltip"}},[t._v("Powered by PixelFed")])])])])}],!1,null,"3683386d",null);e.default=n.exports},KqaD:function(t,e,s){Vue.component("timeline",s("KhVi").default)},"aET+":function(t,e,s){var o,i,a={},n=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=o.apply(this,arguments)),i}),r=function(t){var e={};return function(t,s){if("function"==typeof t)return t();if(void 0===e[t]){var o=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,s);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}e[t]=o}return e[t]}}(),l=null,c=0,d=[],u=s("9tPo");function f(t,e){for(var s=0;s=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=function(){0;return s.nc}();o&&(t.attrs.nonce=o)}return g(e,t.attrs),m(t,e),e}function g(t,e){Object.keys(e).forEach(function(s){t.setAttribute(s,e[s])})}function _(t,e){var s,o,i,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var n=c++;s=l||(l=v(e)),o=y.bind(null,s,n,!1),i=y.bind(null,s,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),m(t,e),e}(e),o=function(t,e,s){var o=s.css,i=s.sourceMap,a=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||a)&&(o=u(o));i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var n=new Blob([o],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(n),r&&URL.revokeObjectURL(r)}.bind(null,s,e),i=function(){h(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),o=function(t,e){var s=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,s),i=function(){h(s)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=n()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=p(t,e);return f(s,e),function(t){for(var o=[],i=0;i
- +
diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 74cdedf4f..7679b53ab 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -365,7 +365,7 @@ body-class="p-0" >
- +
diff --git a/resources/views/site/help/safety-tips.blade.php b/resources/views/site/help/safety-tips.blade.php index a6e5f6d89..167365bf8 100644 --- a/resources/views/site/help/safety-tips.blade.php +++ b/resources/views/site/help/safety-tips.blade.php @@ -58,7 +58,7 @@

Make your account or posts private

-

You can limit the visibility of your content to specific people, followers, public and more.

+

You can make your account private and vet new follow requests to control who your posts are shared with.

@endsection