pleroma/priv/static/adminfe/static/js/chunk-136a.c4719e3e.js

2 lines
19 KiB
JavaScript
Raw Normal View History

2020-03-12 21:12:29 +01:00
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-136a"],{"26YS":function(e,t,a){"use strict";a.r(t);var o=a("o0o1"),i=a.n(o),s=a("yXPU"),l=a.n(s),c=a("mm8V"),n={props:{host:{type:String,required:!0},packName:{type:String,required:!0},name:{type:String,required:!0},file:{type:String,required:!0},isLocal:{type:Boolean,required:!0}},data:function(){return{newName:null,newFile:null,copyToLocalPackName:null,copyPopoverVisible:!1,copyToShortcode:"",copyToFilename:""}},computed:{emojiName:{get:function(){return null!==this.newName?this.newName:this.name},set:function(e){this.newName=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;this.$store.dispatch("UpdateAndSavePackFile",{action:"update",packName:this.packName,oldName:this.name,newName:this.emojiName,newFilename:this.emojiFile}).then(function(){e.newName=null,e.newFile=null,e.$store.dispatch("ReloadEmoji")})},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("UpdateAndSavePackFile",{action:"remove",packName:e.packName,name:e.name}).then(function(){e.newName=null,e.newFile=null,e.$store.dispatch("ReloadEmoji")})})},copyToLocal:function(){var e=this;this.$store.dispatch("UpdateAndSavePackFile",{action:"add",packName:this.copyToLocalPackName,shortcode:""!==this.copyToShortcode.trim()?this.copyToShortcode.trim():this.name,fileName:""!==this.copyToFilename.trim()?this.copyToFilename.trim():this.file,file:this.addressOfEmojiInPack(this.host,this.packName,this.file)}).then(function(){e.copyToLocalPackName=null,e.copyToLocalVisible=!1,e.copyToShortcode="",e.copyToFilename="",e.$store.dispatch("ReloadEmoji")})},addressOfEmojiInPack:c.a}},r=(a("4ySm"),a("KHd+")),m=Object(r.a)(n,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("emoji.selectLocalPack")))]),e._v(" "),a("el-select",{staticClass:"copy-pack-select",attrs:{placeholder:e.$t("emoji.localPack")},model:{value:e.copyToLocalPackName,callback:function(t){e.copyToLocalPackName=t},expression:"copyToLocalPackName"}},e._l(e.localPacks,function(e,t){return a(
//# sourceMappingURL=chunk-136a.c4719e3e.js.map