2024-07-10 06:11:42 +00:00
|
|
|
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([["/js/compose-classic"],{"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=script&lang=js":
|
|
|
|
/*!***************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=script&lang=js ***!
|
|
|
|
\***************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var o=s(/*! jquery */"./node_modules/jquery/dist/jquery.js");const i={data:function(){return{config:window.App.config,profile:{},composeText:"",composeTextLength:0,nsfw:!1,filters:[],ids:[],media:[],carouselCursor:0,visibility:"public",mediaDrawer:!1,composeState:"publish",uploading:!1,uploadProgress:0,composeType:!1}},beforeMount:function(){this.fetchProfile()},mounted:function(){this.mediaWatcher(),this.filters=[["1977","filter-1977"],["Aden","filter-aden"],["Amaro","filter-amaro"],["Ashby","filter-ashby"],["Brannan","filter-brannan"],["Brooklyn","filter-brooklyn"],["Charmes","filter-charmes"],["Clarendon","filter-clarendon"],["Crema","filter-crema"],["Dogpatch","filter-dogpatch"],["Earlybird","filter-earlybird"],["Gingham","filter-gingham"],["Ginza","filter-ginza"],["Hefe","filter-hefe"],["Helena","filter-helena"],["Hudson","filter-hudson"],["Inkwell","filter-inkwell"],["Kelvin","filter-kelvin"],["Kuno","filter-juno"],["Lark","filter-lark"],["Lo-Fi","filter-lofi"],["Ludwig","filter-ludwig"],["Maven","filter-maven"],["Mayfair","filter-mayfair"],["Moon","filter-moon"],["Nashville","filter-nashville"],["Perpetua","filter-perpetua"],["Poprocket","filter-poprocket"],["Reyes","filter-reyes"],["Rise","filter-rise"],["Sierra","filter-sierra"],["Skyline","filter-skyline"],["Slumber","filter-slumber"],["Stinson","filter-stinson"],["Sutro","filter-sutro"],["Toaster","filter-toaster"],["Valencia","filter-valencia"],["Vesper","filter-vesper"],["Walden","filter-walden"],["Willow","filter-willow"],["X-Pro II","filter-xpro-ii"]]},methods:{fetchProfile:function(){var e=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(t){e.profile=t.data,1==t.data.locked&&(e.visibility="private")})).catch((function(e){}))},addMedia:function(e){var t=o(e.target);t.attr("disabled",""),o('.file-input[name="media"]').trigger("click"),t.blur(),t.removeAttr("disabled")},mediaWatcher:function(){var e=this;o(document).on("change",".file-input",(function(t){var s=document.querySelector(".file-input");Array.prototype.forEach.call(s.files,(function(t,s){if(e.uploading=!0,e.media&&e.media.length+s>=e.config.uploader.album_limit)swal("Error","You can only upload "+e.config.uploader.album_limit+" photos per album","error");else{var i=t.type,a=e.config.uploader.media_types.split(",");if(-1!=o.inArray(i,a)){var l=new FormData;l.append("file",t);var r={onUploadProgress:function(t){var s=Math.round(100*t.loaded/t.total);e.uploadProgress=s}};axios.post("/api/pixelfed/v1/media",l,r).then((function(t){e.uploadProgress=100,e.ids.push(t.data.id),e.media.push(t.data),setTimeout((function(){e.uploading=!1}),1e3)})).catch((function(s){e.uploading=!1,t.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error")})),t.value=null,e.uploadProgress=0}else swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+e.config.uploader.media_types+" only.","error")}}))}))},toggleFilter:function(e,t){this.media[this.carouselCursor].filter_class=t},updateMedia:function(){this.mediaDrawer=!1},deleteMedia:function(){var e=this;if(0!=window.confirm("Are you sure you want to delete this media?")){var t=this.media[this.carouselCursor].id;axios.delete("/api/pixelfed/v1/media",{params:{id:t}}).then((function(t){1==e.media.length&&(e.mediaDrawer=!1,e.ids=[],e.media=[],e.carouselCursor=0),e.ids.splice(e.carouselCursor,1),e.media.splice(e.carouselCursor,1)})).catch((function(e){swal("Whoops!","An error occured when attempting to delete this, please try again","error")}))}},mediaAltText:function(){},mediaLicense:function(){},compose:function(){var e=this.composeState;if(100==this.uploadProgress&&0!=this.ids.length)if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(e){case"pu
|
|
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=template&id=63ff4c97&scoped=true ***!
|
|
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{render:()=>o,staticRenderFns:()=>i});var o=function(){var e=this,t=e._self._c;return t("div",[t("input",{staticClass:"d-none file-input",attrs:{type:"file",name:"media",multiple:"",accept:e.config.uploader.media_types}}),e._v(" "),t("div",{staticClass:"timeline"},[t("div",{staticClass:"card status-card card-md-rounded-0"},[t("div",{staticClass:"card-header d-inline-flex align-items-center bg-white"},[t("img",{staticClass:"box-shadow",staticStyle:{"border-radius":"32px"},attrs:{src:e.profile.avatar,width:"32px",height:"32px"}}),e._v(" "),t("a",{staticClass:"username font-weight-bold pl-2 text-dark",attrs:{href:e.profile.url}},[e._v("\n\t\t\t\t\t"+e._s(e.profile.username)+"\n\t\t\t\t")]),e._v(" "),t("div",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[t("div",{staticClass:"dropdown"},[e._m(0),e._v(" "),t("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[t("div",{staticClass:"dropdown-item small font-weight-bold",on:{click:e.createCollection}},[e._v("Create Collection")]),e._v(" "),t("div",{staticClass:"dropdown-divider"}),e._v(" "),t("div",{staticClass:"dropdown-item small font-weight-bold",on:{click:e.about}},[e._v("About")]),e._v(" "),t("div",{staticClass:"dropdown-item small font-weight-bold",on:{click:e.closeModal}},[e._v("Close")])])])])]),e._v(" "),t("div",{staticClass:"postPresenterContainer"},[e.uploading?t("div",[t("div",{staticClass:"w-100 h-100 bg-light py-5",staticStyle:{"border-bottom":"1px solid #f1f1f1"}},[t("div",{staticClass:"p-5"},[t("b-progress",{attrs:{value:e.uploadProgress,max:100,striped:"",animated:!0}}),e._v(" "),t("p",{staticClass:"text-center mb-0 font-weight-bold"},[e._v("Uploading ... ("+e._s(e.uploadProgress)+"%)")])],1)])]):t("div",[e.ids.length>0&&e.ids.length!=e.config.uploader.album_limit?t("div",{staticClass:"card-header py-2 bg-primary m-2 rounded cursor-pointer",on:{click:function(t){return e.addMedia(t)}}},[e._m(1)]):e._e(),e._v(" "),0==e.ids.length?t("div",{staticClass:"w-100 h-100 bg-light py-5 cursor-pointer",staticStyle:{"border-bottom":"1px solid #f1f1f1"},on:{click:function(t){return e.addMedia(t)}}},[t("div",{staticClass:"p-5"},[t("p",{staticClass:"text-center font-weight-bold"},[e._v(e._s(e.composeMessage()))]),e._v(" "),t("p",{staticClass:"text-muted mb-0 small text-center"},[e._v("Accepted Formats: "),t("b",[e._v(e._s(e.acceptedFormats()))])]),e._v(" "),t("p",{staticClass:"text-muted mb-0 small text-center"},[e._v("Max File Size: "),t("b",[e._v(e._s(e.maxSize()))])]),e._v(" "),t("p",{staticClass:"text-muted mb-0 small text-center"},[e._v("Albums can contain up to "),t("b",[e._v(e._s(e.config.uploader.album_limit))]),e._v(" photos or videos")])])]):e._e(),e._v(" "),e.ids.length>0?t("div",[t("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333"},attrs:{id:"p-carousel",controls:"",indicators:"",background:"#ffffff",interval:0},model:{value:e.carouselCursor,callback:function(t){e.carouselCursor=t},expression:"carouselCursor"}},e._l(e.media,(function(s,o){return e.ids.length>0?t("b-carousel-slide",{key:"preview_media_"+o},[t("div",{class:[e.media[o].filter_class?e.media[o].filter_class:""],staticStyle:{display:"flex","min-height":"320px","align-items":"center"},attrs:{slot:"img"},slot:"img"},[t("img",{staticClass:"d-block img-fluid w-100",attrs:{src:s.url,alt:s.description,title:s.description}})])]):e._e()})),1)],1):e._e(),e._v(" "),e.ids.length>0&&"image"==e.media[e.carouselCursor].type?t("div",{staticClass:"bg-dark align-items-center"},[t("ul",{staticClass:"nav media-drawer-filters text-center"},[t("li",{staticClass:"nav-item"},[t("div",{staticClass:"p-1 pt-3"},[t("img",{staticClass:"cursor-pointer",attrs:{src:e.media[e.carouselCursor].url,width:"100px",height:"60px"},on:
|
|
|
|
/*!************************************************!*\
|
|
|
|
!*** ./resources/assets/js/compose-classic.js ***!
|
|
|
|
\************************************************/(e,t,s)=>{Vue.component("compose-classic",s(/*! ./components/ComposeClassic.vue */"./resources/assets/js/components/ComposeClassic.vue").default)},"./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css":
|
|
|
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css ***!
|
|
|
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var o=s(/*! ../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */"./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,"\n.media-drawer-filters[data-v-63ff4c97] {\n\t\toverflow-x: scroll;\n\t\tflex-wrap:unset;\n}\n.media-drawer-filters .nav-link[data-v-63ff4c97] {\n\t\tmin-width:100px;\n\t\tpadding-top: 1rem;\n\t\tpadding-bottom: 1rem;\n}\n.media-drawer-filters .active[data-v-63ff4c97] {\n\t\tcolor: #fff;\n\t\tfont-weight: bold;\n}\n@media (hover: none) and (pointer: coarse) {\n.media-drawer-filters[data-v-63ff4c97]::-webkit-scrollbar {\n\t display: none;\n}\n}\n",""]);const a=i},"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css":
|
|
|
|
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css ***!
|
|
|
|
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var o=s(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=s.n(o),a=s(/*! !!../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css */"./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css"),l={insert:"head",singleton:!1};i()(a.default,l);const r=a.default.locals||{}},"./resources/assets/js/components/ComposeClassic.vue":
|
|
|
|
/*!***********************************************************!*\
|
|
|
|
!*** ./resources/assets/js/components/ComposeClassic.vue ***!
|
|
|
|
\***********************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var o=s(/*! ./ComposeClassic.vue?vue&type=template&id=63ff4c97&scoped=true */"./resources/assets/js/components/ComposeClassic.vue?vue&type=template&id=63ff4c97&scoped=true"),i=s(/*! ./ComposeClassic.vue?vue&type=script&lang=js */"./resources/assets/js/components/ComposeClassic.vue?vue&type=script&lang=js"),a={};for(const e in i)"default"!==e&&(a[e]=()=>i[e]);s.d(t,a);s(/*! ./ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css */"./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css");var l=(0,s(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(i.default,o.render,o.staticRenderFns,!1,null,"63ff4c97",null);l.options.__file="resources/assets/js/components/ComposeClassic.vue";const r=l.exports},"./resources/assets/js/components/ComposeClassic.vue?vue&type=script&lang=js":
|
|
|
|
/*!***********************************************************************************!*\
|
|
|
|
!*** ./resources/assets/js/components/ComposeClassic.vue?vue&type=script&lang=js ***!
|
|
|
|
\***********************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var o=s(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ComposeClassic.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=script&lang=js"),i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);s.d(t,i);const a=o.default},"./resources/assets/js/components/ComposeClassic.vue?vue&type=template&id=63ff4c97&scoped=true":
|
|
|
|
/*!*****************************************************************************************************!*\
|
|
|
|
!*** ./resources/assets/js/components/ComposeClassic.vue?vue&type=template&id=63ff4c97&scoped=true ***!
|
|
|
|
\*****************************************************************************************************/(e,t,s)=>{"use strict";s.r(t);var o=s(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ComposeClassic.vue?vue&type=template&id=63ff4c97&scoped=true */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=template&id=63ff4c97&scoped=true"),i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);s.d(t,i)},"./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css":
|
|
|
|
/*!*******************************************************************************************************************!*\
|
|
|
|
!*** ./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css ***!
|
|
|
|
\*******************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t);var o=s(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css */"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-14.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-14.use[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/js/components/ComposeClassic.vue?vue&type=style&index=0&id=63ff4c97&scoped=true&lang=css"),i={};for(const e in o)"default"!==e&&(i[e]=()=>o[e]);s.d(t,i)}},e=>{e.O(0,["/js/vendor"],(()=>{return t="./resources/assets/js/compose-classic.js",e(e.s=t);var t}));e.O()}]);
|