Files
DirectAdmin-1.62.4/directadmin-1.62.4/data/skins/evolution/assets/pages/53.js
tuend-work 0b28a76e20 ud
2025-11-12 23:24:15 +07:00

1 line
8.3 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{1289:function(t,e,n){"use strict";n.r(e);var a=n(2985),o=n(1641);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n(2508);var i=n(0),s=n(2510),u=n.n(s),l=Object(i.a)(o.default,a.a,a.b,!1,null,"8c10fb8a",null);"function"==typeof u.a&&u()(l),e.default=l.exports},1641:function(t,e,n){"use strict";n.r(e);var a=n(1642),o=n.n(a);for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e.default=o.a},1642:function(t,e,n){"use strict";var a=n(10),o=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i,s=o(n(15)),u=o(n(16)),l=a(n(2285)),c=o(n(1465)),f=o(n(2507)),d={preload:l.getFile,components:{RootAuthDialog:f.default,InputTextEditor:c.default},beforeRouteUpdate:(i=(0,u.default)(s.default.mark((function t(e,n,a){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.getFile(e.query);case 2:this.text=this.data,this.$dialog("ROOT_AUTH_DIALOG").close(),a();case 5:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return i.apply(this,arguments)}),data:function(){return{text:""}},api:[{command:l.getFile,bind:"data"}],computed:{data:function(){return this.$api.data.data},files:function(){return this.$api.data.files},auth:function(){return this.$api.data.auth},file:function(){return this.$route.query.file}},mounted:function(){this.text=this.data},methods:{requestAuthAndSave:function(){this.auth?this.$dialog("ROOT_AUTH_DIALOG").open():this.save()},save:(r=(0,u.default)(s.default.mark((function t(){return s.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.saveFile({file:this.file,text:this.text});case 2:t.sent&&this.$router.push({name:"admin/file-editor"});case 4:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})}};e.default=d},1643:function(t,e,n){"use strict";n.r(e);var a=n(1644),o=n.n(a);for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e.default=o.a},1644:function(t,e,n){"use strict";var a=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,r=a(n(15)),i=a(n(16)),s=n(2285),u={data:function(){return{rootpass:""}},props:{file:String,text:String},methods:{auth:(o=(0,i.default)(r.default.mark((function t(){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,s.authenticate)({file:this.file,text:this.text,rootpass:this.rootpass});case 2:t.sent&&(this.$emit("confirmSave"),this.$dialog("ROOT_AUTH_DIALOG").close());case 4:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})}};e.default=u},1645:function(t,e,n){var a=n(2509);"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);(0,n(5).default)("771b7ace",a,!0,{})},2285:function(t,e,n){"use strict";var a=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.authenticate=e.saveFile=e.getFile=void 0;var o=a(n(2)),r=a(n(30));function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}var s="/CMD_ADMIN_FILE_EDITOR",u=r.default.get({id:"FILE_DATA",url:s,schema:{file:r.default.OPTIONAL_STRING},after:function(t){return t.flow(t.moveProp({FILEDATA:"data",FILES:"files",READONLY:"readOnly",REQUIRE_ROOT_AUTH:"auth"}),t.mapProps({auth:t.convert.toAppBoolean,readOnly:t.convert.toAppBoolean,files:t.flow(t.mapValues((function(t,e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{file:e})})),t.toArray,t.mapArrayProps({exists:t.isEqual("1"),size:t.convert.toAppNumber})),data:t.convert.toAppText}))}});e.getFile=u;var l=r.default.post({url:s,params:{action:"save"},schema:{file:r.default.REQUIRED_STRING,text:r.default.REQUIRED_STRING}});e.saveFile=l;var c=r.default.post({url:s,params:{action:"save",authenticate:!0},schema:{rootpass:r.default.REQUIRED_STRING,file:r.default.REQUIRED_STRING,text:r.default.REQUIRED_STRING}});e.authenticate=c},2507:function(t,e,n){"use strict";n.r(e);var a=n(3128),o=n(1643);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);var i=n(0),s=Object(i.a)(o.default,a.a,a.b,!1,null,null,null);e.default=s.exports},2508:function(t,e,n){"use strict";var a=n(1645);n.n(a).a},2509:function(t,e,n){(t.exports=n(4)(!0)).push([t.i,"#file-editor textarea[data-v-8c10fb8a]{width:100%;max-height:75vh;height:40rem;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,monospace,serif;font-size:13px;line-height:15px;font-weight:300}","",{version:3,sources:["/home/evo/evolution/src/js/pages/admin/file-editor.vue"],names:[],mappings:"AAgIA,uCAEQ,WACA,gBACA,aACA,2HACA,eACA,iBACA,eAAgB,CAAA",file:"file-editor.vue?vue&type=style&index=0&id=8c10fb8a&lang=scss&scoped=true&",sourcesContent:['\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n#file-editor {\n textarea {\n width: 100%;\n max-height: 75vh;\n height: 40rem;\n font-family: Consolas, Menlo, Monaco, "Lucida Console","Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", monospace, serif;\n font-size: 13px;\n line-height: 15px;\n font-weight: 300;\n }\n}\n'],sourceRoot:""}])},2510:function(t,e){},2985:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("app-page",{attrs:{id:"file-editor"}},[t.file?n("app-page-section",[n("input-text-editor",{model:{value:t.text,callback:function(e){t.text=e},expression:"text"}},[n("template",{slot:"header"},[t._v(t._s(t.file))])],2)],1):n("app-page-section",[n("ui-r-table",t._b({attrs:{disablePagination:""},scopedSlots:t._u([{key:"col:file",fn:function(e){var a=e.file;return[n("ui-link",{attrs:{name:"admin/file-editor",query:{file:a}}},[t._v("\n "+t._s(a)+"\n ")])]}},{key:"col:size",fn:function(e){var a=e.size;return[e.exists?[t._v("\n "+t._s(t._f("humanReadableSize")(a))+"\n ")]:n("translate",[t._v("\n Does not exist\n ")])]}}],null,!1,2217317318)},"ui-r-table",{rows:t.files,columns:[{id:"file",label:t.$gettext("File"),grow:!0,editable:!1},{id:"size",label:t.$gettext("Size")}],isCheckable:!1,verticalLayout:t.$_Client.isPhone},!1))],1),t._v(" "),t.file?n("ui-button",{attrs:{slot:"footer:buttons",theme:"safe"},on:{click:t.requestAuthAndSave},slot:"footer:buttons"},[n("translate",[t._v("Save")])],1):t._e(),t._v(" "),n("root-auth-dialog",t._b({on:{confirmSave:t.save,close:function(e){return t.$router.push({name:"admin/file-editor",query:{}})}}},"root-auth-dialog",{file:t.file,text:t.text},!1))],1)},o=[];n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return o}))},3128:function(t,e,n){"use strict";var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ui-dialog",{attrs:{id:"ROOT_AUTH_DIALOG",theme:"danger",noCloseBtn:"",noCloseIcon:"",noAutoClose:""},on:{"dialog:close":function(e){t.rootpass=""}}},[n("translate",{attrs:{slot:"title"},slot:"title"},[t._v("Authenticate")]),t._v(" "),n("ui-form-element",{attrs:{slot:"content",vertical:"",group:"rootAuth",validators:{required:!0}},slot:"content"},[n("translate",{attrs:{slot:"title"},slot:"title"},[t._v("This file is tagged as secure. Root password required to edit")]),t._v(" "),n("input-password",{attrs:{slot:"content",autocomplete:!1},slot:"content",model:{value:t.rootpass,callback:function(e){t.rootpass=e},expression:"rootpass"}})],1),t._v(" "),n("ui-button",{attrs:{slot:"buttons",theme:"danger",validateGroup:"rootAuth"},on:{click:t.auth},slot:"buttons"},[n("translate",[t._v("Authenticate")])],1),t._v(" "),n("ui-button",{attrs:{slot:"buttons",theme:"neutral"},on:{click:function(e){return t.$emit("close")}},slot:"buttons"},[n("translate",[t._v("Back")])],1)],1)},o=[];n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return o}))}}]);