pleroma/priv/static/adminfe/static/js/chunk-0cb6.b9f32e0c.js

2 lines
16 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0cb6"],{"3XKG":function(e,t,a){},"5BBj":function(e,t,a){"use strict";var o=a("mK29");a.n(o).a},"8YcG":function(e,t,a){"use strict";var o=a("H3Pu");a.n(o).a},BHDh:function(e,t,a){"use strict";var o=a("JR8x");a.n(o).a},D45k:function(e,t,a){},H3Pu:function(e,t,a){},JR8x:function(e,t,a){},eGqU:function(e,t,a){"use strict";var o=a("D45k");a.n(o).a},mK29:function(e,t,a){},rCuO:function(e,t,a){"use strict";a.r(t);var o={props:{name:{type:String,required:!0}}},i=(a("vB9w"),a("KHd+")),n=Object(i.a)(o,function(){var e=this.$createElement,t=this._self._c||e;return t("el-row",{staticClass:"prop-row",attrs:{gutter:20}},[t("el-col",{attrs:{span:4}},[t("b",[this._v(this._s(this.name))])]),this._v(" "),t("el-col",{attrs:{span:10}},[this._t("default")],2)],1)},[],!1,null,null,null);n.options.__file="PropertyEditingRow.vue";var c=n.exports,s=a("qh4k"),l={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,copyToLocalVisible:!1,copyToShortcode:"",copyToFilename:""}},computed:{modifyingName:{get:function(){return null!==this.newName?this.newName:this.name},set:function(e){this.newName=e}},modifyingFile:{get:function(){return null!==this.newFile?this.newFile:this.file},set:function(e){this.newFile=e}}},methods:{update:function(){var e=this;this.$store.dispatch("UpdateAndSavePackFile",{action:"update",packName:this.packName,oldName:this.name,newName:this.modifyingName,newFilename:this.modifyingFile}).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:s.a}},r=(a("BHDh"),Object(i.a)(l,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[e.isLocal?a("el-input",{attrs:{placeholder:"Name/Shortcode"},model:{value:e.modifyingName,callback:function(t){e.modifyingName=t},expression:"modifyingName"}}):a("el-input",{attrs:{value:e.modifyingName,placeholder:"Name/Shortcode"}})],1),e._v(" "),a("el-col",{attrs:{span:6}},[e.isLocal?a("el-input",{attrs:{placeholder:"File"},model:{value:e.modifyingFile,callback:function(t){e.modifyingFile=t},expression:"modifyingFile"}}):a("el-input",{attrs:{value:e.modifyingFile,placeholder:"File"}})],1),e._v(" "),e.isLocal?a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{type:"primary"},on:{click:e.update}},[e._v("Update")])],1):e._e(),e._v(" "),e.isLocal?a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{type:"danger"},on:{click:e.remove}},[e._v("Remove")])],1):e._e(),e._v(" "),e.isLocal?e._e():a("el-col",{attrs:{span:4}},[a("el-popover",{attrs:{placement:"bottom"},model:{value:e.copyToLocalVisible,callback:function(t){e.copyToLocalVisible=t},expression:"copyToLocalVisible"}},[a("p",[e._v("Select the local pack to copy to")]),e._v(" "),a("el-select",{attrs:{placeholder:"Local pack"},model:{value:e.copyToLocalPackName,callback:function(t){e.copyToLocalPackName=t},expression:"copyToLocalPackName"}},e._l(e.$store.state.emoji_packs.localPacks,function(e,t){return a("el-option",{key:t,attr
//# sourceMappingURL=chunk-0cb6.b9f32e0c.js.map