pixelfed/public/js/profile.js

1 line
114 KiB
JavaScript
Raw Normal View History

2021-07-21 00:15:30 +00:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{"2Jpm":function(t,e,n){"use strict";n.r(e);var i={props:["status"],methods:{altText:function(t){var e=t.media_attachments[0].description;return e||"Video was not tagged with any alt text."},playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())},toggleContentWarning:function(t){this.$emit("togglecw")}}},o=(n("XWj2"),n("KHd+")),s=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 1==t.status.sensitive?n("div",{staticClass:"content-label-wrapper"},[n("div",{staticClass:"text-light content-label"},[t._m(0),t._v(" "),n("p",{staticClass:"h4 font-weight-bold text-center"},[t._v("\n\t\t\tSensitive Content\n\t\t")]),t._v(" "),n("p",{staticClass:"text-center py-2"},[t._v("\n\t\t\t"+t._s(t.status.spoiler_text?t.status.spoiler_text:"This post may contain sensitive content.")+"\n\t\t")]),t._v(" "),n("p",{staticClass:"mb-0"},[n("button",{staticClass:"btn btn-outline-light btn-block btn-sm font-weight-bold",on:{click:function(e){return t.toggleContentWarning()}}},[t._v("See Post")])])]),t._v(" "),n("blur-hash-image",{attrs:{width:"32",height:"32",punch:1,hash:t.status.media_attachments[0].blurhash,alt:t.altText(t.status)}})],1):n("div",{staticClass:"embed-responsive embed-responsive-16by9"},[n("video",{staticClass:"video",attrs:{controls:"",preload:"metadata",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id}},[n("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"text-center"},[e("i",{staticClass:"far fa-eye-slash fa-2x"})])}],!1,null,"4b79c47a",null);e.default=s.exports},"2wtg":function(t,e,n){Vue.component("photo-presenter",n("d+I4").default),Vue.component("video-presenter",n("2Jpm").default),Vue.component("photo-album-presenter",n("Mrqh").default),Vue.component("video-album-presenter",n("9wGH").default),Vue.component("mixed-album-presenter",n("exej").default),Vue.component("post-menu",n("yric").default),Vue.component("story-viewer",n("Zhjo").default),Vue.component("profile",n("EHjT").default)},4:function(t,e,n){t.exports=n("2wtg")},"5CDs":function(t,e,n){"use strict";n("z6B+")},"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 n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,s=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?t:(o=0===s.indexOf("//")?s:0===s.indexOf("/")?n+s:i+s.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},"9wGH":function(t,e,n){"use strict";n.r(e);var i={props:["status"]},o=n("KHd+"),s=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 1==t.status.sensitive?n("div",[n("details",{staticClass:"details-animated"},[n("summary",[n("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),n("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),n("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,(function(t,e){return n("b-carousel-slide",{key:t.id+"-media"},[n("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%",poster:t.preview_url},slot:"img"},[n("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)]):n("div",[n("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carous