pleroma/priv/static/adminfe/static/js/chunk-546f.f1e72e3b.js

2 lines
27 KiB
JavaScript
Raw Normal View History

2020-10-12 17:13:54 +02:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-546f"],{"26YS":function(e,t,a){"use strict";a.r(t);var o=a("o0o1"),s=a.n(o),i=a("yXPU"),c=a.n(i),n=a("cDf5"),l=a.n(n),r=a("QILm"),m=a.n(r),p=a("mm8V"),u={props:{host:{type:String,required:!0},packName:{type:String,required:!0},shortcode:{type:String,required:!0},file:{type:String,required:!0},isLocal:{type:Boolean,required:!0}},data:function(){return{newShortcode:null,newFile:null,copyToLocalPackName:null,copyPopoverVisible:!1,copyToShortcode:"",copyToFilename:""}},computed:{emojiName:{get:function(){return null!==this.newShortcode?this.newShortcode:this.shortcode},set:function(e){this.newShortcode=e}},emojiFile:{get:function(){return null!==this.newFile?this.newFile:this.file},set:function(e){this.newFile=e}},isDesktop:function(){return"desktop"===this.$store.state.app.device},isMobile:function(){return"mobile"===this.$store.state.app.device},localPacks:function(){return this.$store.state.emojiPacks.localPacks},remoteInstance:function(){return this.$store.state.emojiPacks.remoteInstance}},methods:{update:function(){var e=this;return c()(s.a.mark(function t(){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,e.$store.dispatch("UpdateEmojiFile",{packName:e.packName,shortcode:e.shortcode,newShortcode:e.emojiName,newFilename:e.emojiFile,force:!0}),t.next=7;break;case 4:return t.prev=4,t.t0=t.catch(0),t.abrupt("return");case 7:e.newShortcode=null,e.newFile=null,e.$store.dispatch("ReloadEmoji");case 10:case"end":return t.stop()}},t,null,[[0,4]])}))()},remove:function(){var e=this;this.$confirm("This will delete the emoji, are you sure?","Warning",{confirmButtonText:"Yes, delete the emoji",cancelButtonText:"No, leave it be",type:"warning"}).then(function(){e.$store.dispatch("DeleteEmojiFile",{packName:e.packName,shortcode:e.shortcode}).then(function(){e.newShortcode=null,e.newFile=null,e.$store.dispatch("ReloadEmoji")})})},copyToLocal:function(){try{this.$store.dispatch("AddNewEmojiFile",{packName:this.copyToLocalPackName,file:this.addressOfEmojiInPack(this.remoteInstance,this.packName,this.file),shortcode:""!==this.copyToShortcode.trim()?this.copyToShortcode.trim():this.shortcode,filename:""!==this.copyToFilename.trim()?this.copyToFilename.trim():this.file})}catch(e){return}this.copyToLocalPackName=null,this.copyToLocalVisible=!1,this.copyToShortcode="",this.copyToFilename="",this.$store.dispatch("ReloadEmoji")},addressOfEmojiInPack:p.b}},d=(a("4ySm"),a("KHd+")),h=Object(d.a)(u,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.isLocal?a("div",{class:e.isMobile?"emoji-container-flex":"emoji-container-grid"},[a("img",{staticClass:"emoji-preview-img",attrs:{src:e.addressOfEmojiInPack(e.host,e.packName,e.file)}}),e._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{placeholder:e.$t("emoji.shortcode")},model:{value:e.emojiName,callback:function(t){e.emojiName=t},expression:"emojiName"}}),e._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{placeholder:e.$t("emoji.file")},model:{value:e.emojiFile,callback:function(t){e.emojiFile=t},expression:"emojiFile"}}),e._v(" "),a("div",{staticClass:"emoji-buttons"},[a("el-button",{attrs:{type:"primary"},on:{click:e.update}},[e._v(e._s(e.$t("emoji.update")))]),e._v(" "),a("el-button",{staticClass:"remove-emoji-button",on:{click:e.remove}},[e._v(e._s(e.$t("emoji.remove")))])],1)],1):e._e(),e._v(" "),e.isLocal?e._e():a("div",{class:e.isMobile?"emoji-container-flex":"remote-emoji-container-grid"},[a("img",{staticClass:"emoji-preview-img",attrs:{src:e.addressOfEmojiInPack(e.remoteInstance,e.packName,e.file)}}),e._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{value:e.emojiName,placeholder:e.$t("emoji.shortcode")}}),e._v(" "),a("el-input",{staticClass:"emoji-info",attrs:{value:e.emojiFile,placeholder:e.$t("emoji.file")}}),e._v(" "),a("el-popover",{staticClass:"copy-pack-container",attrs:{placement:"left-start","popper-class":"copy-popover"},model:{value:e.copyPopoverVisible,callback:function(t){e.copyPopoverVisible=t},expression:"copyPopoverVisible"}},[a("p",[e._v(e._s(e.$t("emoj
//# sourceMappingURL=chunk-546f.f1e72e3b.js.map