diff --git a/public/js/loops.js b/public/js/loops.js index 76a8dc9c..d198506f 100644 --- a/public/js/loops.js +++ b/public/js/loops.js @@ -1 +1 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=10)}({10:function(t,e,n){t.exports=n("v6kC")},"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,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}var s;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o=0&&l.splice(e,1)}function b(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return m(e,t.attrs),v(t,e),e}function m(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function y(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var s=u++;n=c||(c=b(e)),r=w.bind(null,n,s,!1),o=w.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",m(e,t.attrs),v(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([r],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,e),o=function(){h(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){h(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}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=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var r=[],o=0;o0&&!this.paused&&!this.ended&&this.readyState>2)}});var r={data:function(){return{version:1,loops:[],tab:"new"}},mounted:function(){var t=this;axios.get("/api/v2/loops").then(function(e){t.loops=e.data})},methods:{videoSrc:function(t){return t.media_attachments[0].url},setTab:function(t){this.tab=t},toggleVideo:function(t,e){var n=e.target;$("video").each(function(){n.src!=$(this)[0].src&&$(this)[0].pause()}),n.playing?n.pause():n.play()},incrementLoop:function(t){},timestamp:function(t){return new Date(t.created_at).toLocaleDateString()}}},o=(n("ZmVo"),n("KHd+")),i=Object(o.a)(r,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"mb-4"},[n("p",{staticClass:"text-center"},[n("a",{class:["new"==t.tab?"btn font-weight-bold py-0 btn-success":"btn font-weight-bold py-0 btn-outline-success"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setTab("new")}}},[t._v("New")]),t._v(" "),n("a",{class:["about"==t.tab?"btn font-weight-bold py-0 btn-success":"btn font-weight-bold py-0 btn-outline-success"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setTab("about")}}},[t._v("About")])])]),t._v(" "),"about"!=t.tab?n("div",{staticClass:"row loops-container"},t._l(t.loops,function(e,r){return n("div",{staticClass:"col-12 col-md-4 mb-3"},[n("div",{staticClass:"card border border-success"},[n("div",{staticClass:"embed-responsive embed-responsive-1by1"},[n("video",{staticClass:"embed-responsive-item",attrs:{src:t.videoSrc(e),preload:"auto",width:"100%",height:"100%",loop:""},on:{click:function(n){return t.toggleVideo(e,n)}}})]),t._v(" "),n("div",{staticClass:"card-body"},[n("p",{staticClass:"username font-weight-bolder lead d-flex justify-content-between"},[n("a",{attrs:{href:e.account.url}},[t._v(t._s(e.account.acct))]),t._v(" "),n("a",{attrs:{href:e.url}},[t._v(t._s(t.timestamp(e)))])]),t._v(" "),n("p",{staticClass:"small text-muted text-truncate",domProps:{innerHTML:t._s(e.content?e.content:"Untitled")}}),t._v(" "),n("div",{staticClass:"small text-muted d-flex justify-content-between mb-0"},[n("span",[t._v(t._s(e.favourites_count)+" Likes")]),t._v(" "),n("span",[t._v(t._s(e.reblogs_count)+" Shares")]),t._v(" "),n("span",[t._v(t._s(e.reply_count)+" Comments")])])])])])}),0):n("div",{staticClass:"col-12"},[t._m(0)])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("p",{staticClass:"lead text-center mb-0"},[this._v("Loops are an exciting new way to explore short videos on Pixelfed.")])])])}],!1,null,null,null);e.default=i.exports},iXJE:function(t,e,n){var r=n("LsAn");"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(t.exports=r.locals)},v6kC:function(t,e,n){Vue.component("loops-component",n("i8Ta").default)}}); \ No newline at end of file +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=10)}({10:function(t,e,n){t.exports=n("v6kC")},"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,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),i=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(i).concat([o]).join("\n")}var s;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o=0&&l.splice(e,1)}function b(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return m(e,t.attrs),v(t,e),e}function m(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function y(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var s=u++;n=c||(c=b(e)),r=w.bind(null,n,s,!1),o=w.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",m(e,t.attrs),v(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,i=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([r],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,e),o=function(){h(n),n.href&&URL.revokeObjectURL(n.href)}):(n=b(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){h(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}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=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var r=[],o=0;o0&&!this.paused&&!this.ended&&this.readyState>2)}});var r={data:function(){return{version:1,loops:[],tab:"new"}},mounted:function(){var t=this;axios.get("/api/v2/loops").then(function(e){t.loops=e.data})},methods:{videoSrc:function(t){return t.media_attachments[0].url},posterSrc:function(t){return t.media_attachments[0].preview_url},setTab:function(t){this.tab=t},toggleVideo:function(t,e){var n=e.target;$("video").each(function(){n.src!=$(this)[0].src&&$(this)[0].pause()}),n.playing?n.pause():n.play()},incrementLoop:function(t){},timestamp:function(t){return new Date(t.created_at).toLocaleDateString()}}},o=(n("ZmVo"),n("KHd+")),i=Object(o.a)(r,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"mb-4"},[n("p",{staticClass:"text-center"},[n("a",{class:["new"==t.tab?"btn font-weight-bold py-0 btn-success":"btn font-weight-bold py-0 btn-outline-success"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setTab("new")}}},[t._v("New")]),t._v(" "),n("a",{class:["about"==t.tab?"btn font-weight-bold py-0 btn-success":"btn font-weight-bold py-0 btn-outline-success"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setTab("about")}}},[t._v("About")])])]),t._v(" "),"about"!=t.tab?n("div",{staticClass:"row loops-container"},t._l(t.loops,function(e,r){return n("div",{staticClass:"col-12 col-md-4 mb-3"},[n("div",{staticClass:"card border border-success"},[n("div",{staticClass:"embed-responsive embed-responsive-1by1"},[n("video",{staticClass:"embed-responsive-item",attrs:{src:t.videoSrc(e),preload:"none",width:"100%",height:"100%",loop:"",poster:t.posterSrc(e)},on:{click:function(n){return t.toggleVideo(e,n)}}})]),t._v(" "),n("div",{staticClass:"card-body"},[n("p",{staticClass:"username font-weight-bolder lead d-flex justify-content-between"},[n("a",{attrs:{href:e.account.url}},[t._v(t._s(e.account.acct))]),t._v(" "),n("a",{attrs:{href:e.url}},[t._v(t._s(t.timestamp(e)))])]),t._v(" "),n("p",{staticClass:"small text-muted text-truncate",domProps:{innerHTML:t._s(e.content?e.content:"Untitled")}}),t._v(" "),n("div",{staticClass:"small text-muted d-flex justify-content-between mb-0"},[n("span",[t._v(t._s(e.favourites_count)+" Likes")]),t._v(" "),n("span",[t._v(t._s(e.reblogs_count)+" Shares")]),t._v(" "),n("span",[t._v(t._s(e.reply_count)+" Comments")])])])])])}),0):n("div",{staticClass:"col-12"},[t._m(0)])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("p",{staticClass:"lead text-center mb-0"},[this._v("Loops are an exciting new way to explore short videos on Pixelfed.")])])])}],!1,null,null,null);e.default=i.exports},iXJE:function(t,e,n){var r=n("LsAn");"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(t.exports=r.locals)},v6kC:function(t,e,n){Vue.component("loops-component",n("i8Ta").default)}}); \ No newline at end of file diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 088f452d..8aeb5c54 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -8,7 +8,7 @@ "/js/compose.js": "/js/compose.js?id=f69f248dc1cfcb8ae092", "/js/developers.js": "/js/developers.js?id=1359f11c7349301903f8", "/js/discover.js": "/js/discover.js?id=0625385218493e556ccc", - "/js/loops.js": "/js/loops.js?id=37e6648f5124600735a1", + "/js/loops.js": "/js/loops.js?id=04604e13614f26617f27", "/js/profile.js": "/js/profile.js?id=257d02b221142438d173", "/js/search.js": "/js/search.js?id=27e8be8bfef6be586d25", "/js/status.js": "/js/status.js?id=fb2f77026b548814adc3",