pixelfed/public/js/compose-123122-swxib.js

1 line
111 KiB
JavaScript
Raw Normal View History

2022-12-31 08:44:14 +00:00
"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[407],{31054:(t,e,i)=>{i.r(e),i.d(e,{default:()=>l});var s=i(42755),a=i(88231),o=i(14205),n=i(64439);const l={components:{drawer:s.default,sidebar:a.default,"compose-desktop":o.default,"compose-modal":n.default},data:function(){return{isLoaded:!1,profile:void 0,showNew:!1}},mounted:function(){this.profile=window._sharedData.user,this.isLoaded=!0;var t=new URLSearchParams(window.location.search);t.has("fl")&&"v6"==t.get("fl")&&(this.showNew=!0)},methods:{closeModal:function(){this.$router.push("/i/web")}}}},32955:(t,e,i)=>{i.r(e),i.d(e,{default:()=>r});var s=i(17652),a=(i(70461),i(29655)),o=(i(67964),i(15235));function n(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}const r={components:{VueCropper:s.default,Autocomplete:a.default,VueTribute:o.default},data:function(){return{config:App.config,tab:"home",tabs:["home","crop","edit","caption","alt-text","settings"],profile:[],media:[],mediaIndex:0,maxFileSize:15e3,ids:[],activeCrop:!1,cropRatios:[0,1,.8,16/9],cropRatio:0,crops:[],filters:App.util.filters,activeFilter:null,composeText:null,composeScope:"public",composeDisabledComments:!1,tributeSettings:{collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}}]},availableLicenses:[{id:1,name:"All Rights Reserved",title:""},{id:5,name:"Public Domain Work",title:""},{id:6,name:"Public Domain Dedication (CC0)",title:"CC0"},{id:11,name:"Attribution",title:"CC BY"},{id:12,name:"Attribution-ShareAlike",title:"CC BY-SA"},{id:13,name:"Attribution-NonCommercial",title:"CC BY-NC"},{id:14,name:"Attribution-NonCommercial-ShareAlike",title:"CC BY-NC-SA"},{id:15,name:"Attribution-NoDerivs",title:"CC BY-ND"},{id:16,name:"Attribution-NonCommercial-NoDerivs",title:"CC BY-NC-ND"}],licenseIndex:0,sensitive:!1,altTextModel:null,uploading:!1,uploadProgress:100,editTab:"filters",editTabs:["filters","edit"],settingsTitle:"Advanced Settings",settingsTab:"home",settingTabs:["home","audience","license","media","schedule","collection","group"],schedule:{enabled:!1,date:void 0,time:"00:00:00",tz:void 0,minDate:void 0,maxDate:void 0},collections:[],collectionsSelected:[],collectionsLoaded:!1,collectionsPage:1,collectionsCanLoadMore:!1,edit:{brightness:100,contrast:100,saturation:100},previewCssFilters:"",isPosting:!1}},mounted:function(){var t=this;this.maxFileSize=filesize(1024*this.config.uploader.max_photo_size,{round:!1}),this.setScheduleDateLimits(),axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data}))},methods:{resetData:function(){this.tab="home",this.profile=[],this.media=[],this.mediaIndex=0,this.ids=[],this.activeCrop=!1,this.crops=[],this.activeFilter=null,this.composeText=null,this.composeScope="public",this.composeDisabledComments=!1,this.licenseIndex=0,this.sensitive=!1,this.altTextModel=null,this.uploading=!1,this.uploadProgress=100,this.editTab="filters",this.settingsTitle="Advanced Settings",this.settingsTab="home",this.collections=[],this.collectionsSelected=[],this.collectionsLoaded=!1,this.collectionsPage=1,t