Files
ploi-core/public/js/23.js
2020-11-12 13:34:27 +01:00

1 line
14 KiB
JavaScript
Vendored

(window.webpackJsonp=window.webpackJsonp||[]).push([[23,73],{0:function(t,e,s){"use strict";function a(t,e,s,a,r,i,n,o){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=s,u._compiled=!0),a&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),n?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},u._ssrRegister=l):r&&(l=o?function(){r.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}s.d(e,"a",(function(){return a}))},120:function(t,e,s){"use strict";s.r(e);var a=s(35),r=s(1),i=s(6),n=s(7),o=s(8),l=s(9),u=s(10),c=s(2),d=s(11),p=s(12),_=s(4),f=s(5),h=s(3),m=s(15),v=s(16),b=s(13),x=s(18),w=s(14),y=s(19),g=s(37),C=s(20),T=s(22),$=s(23),S=s(24),P=s(25),F=s(21),O=s(32),B=s(34),j={data:function(){return{copied:!1}},props:{label:String,value:String},methods:{copy:function(){this.copied=!0,this.$copyText(this.value)}},watch:{copied:function(){var t=this;this.copied&&setTimeout((function(){t.copied=!1}),1250)}},computed:{copyText:function(){return this.copied?this.__("Copied to clipboard"):"".concat(this.label)}}},k=s(0),E=Object(k.a)(j,(function(){var t=this.$createElement;return(this._self._c||t)("span",{staticClass:"cursor-pointer",domProps:{innerHTML:this._s(this.copyText)},on:{click:this.copy}})}),[],!1,null,null,null).exports,I={metaInfo:function(){return{title:this.site.domain}},layout:h.a,components:{TopBar:a.default,Container:r.a,Content:i.a,Page:n.a,PageHeader:o.a,PageHeaderTitle:l.a,PageBody:u.a,Button:c.a,List:d.a,ListItem:p.a,StatusBubble:_.a,NotificationBadge:f.a,FormInput:b.a,SettingsLayout:m.a,SettingsSegment:v.a,Form:x.a,FormActions:w.a,Tabs:g.default,Table:C.a,TableHead:T.a,TableHeader:$.a,TableRow:S.a,TableBody:P.a,TableData:F.a,Modal:O.a,ModalContainer:B.a,Copy:E},data:function(){return{sending:!1,modalIsOpen:!1,ftp_password:null,form:{password:null},breadcrumbs:[{title:this.$page.props.settings.name,to:"/"},{title:this.__("Sites"),to:this.route("sites.index")},{title:this.site.domain,to:this.route("sites.show",this.site.id)}]}},props:{site:Object,ip_address:String,system_user:Object},methods:{useNotification:y.a,confirmRequestFtpPassword:function(){this.$page.props.auth.user.requires_password_for_ftp?this.modalIsOpen=!0:this.requestFtpPassword()},closeModal:function(){this.form.password=null,this.modalIsOpen=!1,this.$page.props.errors=[]},requestFtpPassword:function(){var t=this;this.$page.props.errors=[],window.axios.post(this.route("sites.request-ftp-password",this.site.id).url(),this.form).then((function(e){e.data.ftp_password?(t.form.password=null,t.modalIsOpen=!1,t.ftp_password=e.data.ftp_password):t.useNotification({variant:"danger",title:t.__("FTP password"),message:t.__("Unable to retrieve FTP password")})})).catch((function(e){t.$page.props.errors=e.response.data.errors}))}}},R=Object(k.a)(I,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("Page",[s("Portal",{attrs:{to:"modals"}},[s("ModalContainer",[t.modalIsOpen?s("Modal",{on:{close:function(){return t.closeModal()},submit:t.requestFtpPassword},scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Request FTP password")))]},proxy:!0},{key:"form",fn:function(){return[s("FormInput",{attrs:{type:"password",label:t.__("Enter your account password to reveal FTP password"),errors:t.$page.props.errors.password},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})]},proxy:!0},{key:"form-actions",fn:function(){return[s("Button",{domProps:{textContent:t._s(t.__("Request"))}})]},proxy:!0}],null,!1,1402468597)}):t._e()],1)],1),t._v(" "),s("TopBar",{attrs:{breadcrumbs:t.breadcrumbs}}),t._v(" "),s("Content",[s("Container",[s("PageHeader",{scopedSlots:t._u([{key:"start",fn:function(){return[s("PageHeaderTitle",[t._v(t._s(t.site.domain))])]},proxy:!0}])}),t._v(" "),s("PageBody",[s("SettingsLayout",{scopedSlots:t._u([{key:"nav",fn:function(){return[s("Tabs",{attrs:{site:t.site}})]},proxy:!0},{key:"segments",fn:function(){return[s("SettingsSegment",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Overview")))]},proxy:!0},{key:"content",fn:function(){return[s("div",[s("Table",{attrs:{caption:"Database list overview"}},[s("TableBody",[s("TableRow",[s("TableHeader",[t._v(t._s(t.__("Website path")))]),t._v(" "),s("TableData",{attrs:{border:!1}},[t._v("\n /home/"+t._s(t.system_user.user_name)+"/"+t._s(t.site.domain)+"\n ")])],1),t._v(" "),s("TableRow",[s("TableHeader",[t._v(t._s(t.__("FTP host")))]),t._v(" "),s("TableData",{attrs:{border:!1}},[s("copy",{attrs:{label:""+t.ip_address,value:t.ip_address}})],1)],1),t._v(" "),s("TableRow",[s("TableHeader",[t._v(t._s(t.__("FTP user")))]),t._v(" "),s("TableData",{attrs:{border:!1}},[s("copy",{attrs:{label:""+t.system_user.user_name,value:t.system_user.user_name}})],1)],1),t._v(" "),s("TableRow",[s("TableHeader",[t._v(t._s(t.__("FTP password")))]),t._v(" "),s("TableData",{attrs:{border:!1}},[t.ftp_password?s("div",{domProps:{textContent:t._s(t.ftp_password)}},[s("copy",{attrs:{label:""+t.ftp_password,value:t.ftp_password}})],1):s("Button",{attrs:{variant:"secondary",size:"sm"},on:{click:t.confirmRequestFtpPassword}},[t._v("\n "+t._s(t.__("Request FTP password"))+"\n ")])],1)],1),t._v(" "),s("TableRow",[s("TableHeader",[t._v(t._s(t.__("Creation date")))]),t._v(" "),s("TableData",{attrs:{border:!1}},[t._v(t._s(t.site.created_at))])],1)],1)],1)],1)]},proxy:!0}])}),t._v(" "),s("SettingsSegment",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("DNS settings")))]},proxy:!0},{key:"subtitle",fn:function(){return[t._v("\n "+t._s(t.__("Setup these DNS records to attach your webhosting to your domain."))+"\n ")]},proxy:!0},{key:"form",fn:function(){return[s("form",{staticClass:"space-y-4"},[s("div",{staticClass:"grid grid-cols-2 gap-4"},[s("div",{staticClass:"col-span-2 md:col-span-1"},[s("FormInput",{attrs:{label:"A",errors:t.$page.props.errors.domain,value:t.site.domain}})],1),t._v(" "),s("div",{staticClass:"col-span-2 md:col-span-1"},[s("FormInput",{attrs:{label:"IP","allow-copy":"",errors:t.$page.props.errors.domain,value:t.ip_address}})],1)]),t._v(" "),s("div",{staticClass:"grid grid-cols-2 gap-4"},[s("div",{staticClass:"col-span-2 md:col-span-1"},[s("FormInput",{attrs:{label:"A",errors:t.$page.props.errors.domain,value:"www"}})],1),t._v(" "),s("div",{staticClass:"col-span-2 md:col-span-1"},[s("FormInput",{attrs:{label:"IP","allow-copy":"",errors:t.$page.props.errors.domain,value:t.ip_address}})],1)])])]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)}),[],!1,null,null,null);e.default=R.exports},15:function(t,e,s){"use strict";var a={props:{items:{type:Array,required:!1}}},r=s(0),i=Object(r.a)(a,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"grid grid-cols-4 gap-8 md:gap-16"},[e("aside",{staticClass:"col-span-4 md:col-span-1"},[this._t("nav")],2),this._v(" "),e("section",{staticClass:"col-span-4 md:col-span-3"},[e("div",{staticClass:"space-y-16"},[this._t("segments")],2)])])}),[],!1,null,null,null);e.a=i.exports},16:function(t,e,s){"use strict";var a=s(0),r=Object(a.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("section",{staticClass:"px-8 pb-8 space-y-6 border rounded border-low-emphasis"},[e("header",{staticClass:"-mt-4"},[e("h2",{staticClass:"inline-flex px-4 -mx-4 font-medium bg-surface-1 text-title"},[this._t("title")],2),this._v(" "),e("p",{staticClass:"mt-1 text-small text-medium-emphasis"},[this._t("subtitle")],2)]),this._v(" "),e("div",{staticClass:"space-y-4"},[this._t("form"),this._v(" "),this._t("content")],2)])}),[],!1,null,null,null);e.a=r.exports},20:function(t,e,s){"use strict";var a={props:{caption:{type:String,required:!0}}},r=s(0),i=Object(r.a)(a,(function(){var t=this.$createElement,e=this._self._c||t;return e("table",{staticClass:"w-full text-left table-auto text-small"},[e("caption",{staticClass:"sr-only"},[this._v(this._s(this.caption))]),this._v(" "),this._t("default")],2)}),[],!1,null,null,null);e.a=i.exports},21:function(t,e,s){"use strict";var a={props:{border:{type:Boolean,default:!0}}},r=s(0),i=Object(r.a)(a,(function(){var t=this.$createElement;return(this._self._c||t)("td",{staticClass:"py-2",class:{"border-t border-low-emphasis":this.border}},[this._t("default")],2)}),[],!1,null,null,null);e.a=i.exports},22:function(t,e,s){"use strict";var a=s(0),r=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("thead",[this._t("default")],2)}),[],!1,null,null,null);e.a=r.exports},23:function(t,e,s){"use strict";var a=s(0),r=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("th",{staticClass:"pb-2"},[this._t("default")],2)}),[],!1,null,null,null);e.a=r.exports},24:function(t,e,s){"use strict";var a=s(0),r=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("tr",[this._t("default")],2)}),[],!1,null,null,null);e.a=r.exports},25:function(t,e,s){"use strict";var a=s(0),r=Object(a.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("tbody",[this._t("default")],2)}),[],!1,null,null,null);e.a=r.exports},32:function(t,e,s){"use strict";var a=s(75),r=s(14),i=s(18),n={components:{IconClose:a.a,FormActions:r.a,Form:i.a}},o=s(0),l=Object(o.a)(n,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("aside",{directives:[{name:"click-outside",rawName:"v-click-outside",value:function(){return t.$emit("close")},expression:"() => $emit('close')"}],staticClass:"relative w-full h-full max-w-lg p-8 rounded shadow-2xl pointer-events-auto bg-overlay bf-blur"},[s("button",{staticClass:"absolute top-0 right-0 flex items-center justify-center w-12 h-12",on:{click:function(e){return t.$emit("close")}}},[s("IconClose",{staticClass:"w-8 h-8 text-low-emphasis"})],1),t._v(" "),s("Form",{on:{submit:function(e){return t.$emit("submit")}}},[s("div",[s("h2",{staticClass:"font-medium text-title"},[t._t("title")],2),t._v(" "),s("p",{staticClass:"text-medium-emphasis"},[t._t("subtitle")],2)]),t._v(" "),t._t("form"),t._v(" "),s("FormActions",[t._t("form-actions")],2)],2)],1)}),[],!1,null,null,null);e.a=l.exports},34:function(t,e,s){"use strict";var a=s(0),r=Object(a.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"fixed inset-0 z-50 flex flex-col items-end w-full h-screen p-6 pointer-events-none"},[e("Transition",{attrs:{"enter-active-class":"transition ease-out transform duration-slow","enter-class":"scale-95 translate-x-full","enter-to-class":"scale-100 translate-x-0","leave-active-class":"transition ease-out transform duration-slow","leave-class":"scale-95 translate-x-0","leave-to-class":"scale-95 translate-x-full"}},[this._t("default")],2)],1)}),[],!1,null,null,null);e.a=r.exports},35:function(t,e,s){"use strict";s.r(e);var a=s(39),r=s(40),i=s(41),n=s(42),o={components:{TopBar:a.a,Breadcrumbs:r.a,TabBar:i.a,TopBarTabBarContainer:n.a},props:{breadcrumbs:Array},data:function(){return{tabBars:[{title:this.__("Dashboard"),to:this.route("dashboard"),active:this.route().current("dashboard")},{title:this.__("Sites"),to:this.route("sites.index"),active:this.route().current("sites.*")},{title:"Servers",to:this.route("servers.index")}]}}},l=s(0),u=Object(l.a)(o,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("TopBar",{scopedSlots:t._u([{key:"breadcrumbs",fn:function(){return[s("Breadcrumbs",{attrs:{items:t.breadcrumbs}})]},proxy:!0},{key:"tab-bar",fn:function(){return[s("TopBarTabBarContainer",[s("TabBar",{attrs:{items:t.tabBars}})],1)]},proxy:!0}])})}),[],!1,null,null,null);e.default=u.exports},37:function(t,e,s){"use strict";s.r(e);var a={props:{site:Object},data:function(){return{items:[{title:this.__("General"),to:this.route("sites.show",this.site.id),active:this.route().current("sites.show")},{title:this.__("Apps"),to:this.route("sites.apps.index",this.site.id),active:this.route().current("sites.apps.index")},{title:this.__("Databases"),to:this.route("sites.databases.index",this.site.id),active:this.route().current("sites.databases.index")},{title:this.__("Cronjobs"),to:this.route("sites.cronjobs.index",this.site.id),active:this.route().current("sites.cronjobs.index")},{title:this.__("Redirects"),to:this.route("sites.redirects.index",this.site.id),active:this.route().current("sites.redirects.index")},{title:this.__("Certificates"),to:this.route("sites.certificates.index",this.site.id),active:this.route().current("sites.certificates.index")},this.site.dns_id?{title:this.__("DNS"),to:this.route("sites.dns.index",this.site.id),active:this.route().current("sites.dns.index")}:null,this.can("sites","update")?{title:this.__("Settings"),to:this.route("sites.settings.show",this.site.id),active:this.route().current("sites.settings.show")}:null,{title:this.__("View site"),to:"http://".concat(this.site.domain),type:"a"}]}}},r=s(0),i=Object(r.a)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"md:-ml-4 space-y-1"},t._l(t.items,(function(e){return e?s("li",[s(e.type&&"a"===e.type?"a":"inertia-link",{tag:"component",staticClass:"flex items-center h-10 px-4 font-medium text-medium-emphasis",class:{"rounded shadow text-primary bg-surface-3":e.active},attrs:{target:e.type&&"a"===e.type?"_blank":"_self",href:e.to}},[t._v(t._s(e.title)+" "+t._s(e.route))])],1):t._e()})),0)}),[],!1,null,null,null);e.default=i.exports},75:function(t,e,s){"use strict";var a=s(0),r=Object(a.a)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{"fill-rule":"evenodd",d:"M11.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708-.708l7-7a.5.5 0 0 1 .708 0z"}}),this._v(" "),e("path",{attrs:{"fill-rule":"evenodd",d:"M4.146 4.146a.5.5 0 0 0 0 .708l7 7a.5.5 0 0 0 .708-.708l-7-7a.5.5 0 0 0-.708 0z"}})])}),[],!1,null,null,null);e.a=r.exports}}]);