Files
ploi-core/public/js/16.js
2020-11-04 13:42:50 +01:00

1 line
12 KiB
JavaScript
Vendored

(window.webpackJsonp=window.webpackJsonp||[]).push([[16,66],{0:function(t,e,r){"use strict";function s(t,e,r,s,n,i,a,o){var u,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=r,l._compiled=!0),s&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),a?(u=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__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=u):n&&(u=o?function(){n.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:n),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(t,e){return u.call(e),c(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:t,options:l}}r.d(e,"a",(function(){return s}))},130:function(t,e,r){"use strict";r.r(e);var s=r(17),n=r(1),i=r(6),a=r(7),o=r(8),u=r(9),l=r(10),c=r(2),d=r(11),p=r(12),h=r(4),f=r(5),m=r(3),v=r(15),_=r(16),b=r(13),g=r(32),y=r(27),x=r(18),C=r(14),T=r(26),S=r(38),$=r(20),B=r(22),w=r(23),E=r(24),O=r(25),j=r(21),k={layout:m.a,metaInfo:function(){return{title:"".concat(this.__("Edit provider"))}},components:{TopBar:s.default,Container:n.a,Content:i.a,Page:a.a,PageHeader:o.a,PageHeaderTitle:u.a,PageBody:l.a,Button:c.a,List:d.a,ListItem:p.a,StatusBubble:h.a,NotificationBadge:f.a,FormInput:b.a,FormSelect:y.a,SettingsLayout:v.a,SettingsSegment:_.a,Form:x.a,FormActions:C.a,Tabs:S.default,FormTextarea:g.a,Table:$.a,TableHead:B.a,TableHeader:w.a,TableRow:E.a,TableBody:O.a,TableData:j.a},data:function(){return{sending:!1,form:{name:this.provider.name}}},props:{provider:Object},methods:{submit:function(){var t=this;this.$inertia.patch(this.route("admin.services.providers.update",this.provider.id),this.form,{onStart:function(){return t.sending=!0},onFinish:function(){return t.sending=!1}})},confirmDelete:function(){var t=this;Object(T.a)({title:this.__("Are you sure?"),message:this.__("Are you sure you want to delete this server? Everything associated with this server will be detached."),onConfirm:function(){return t.delete()}})},delete:function(){var t=this;this.sending=!0,this.$inertia.delete(this.route("admin.services.servers.delete",this.server.id)).then((function(){return t.sending=!1}))},attach:function(){var t=this;this.sending=!0,this.$inertia.post(this.route("admin.services.servers.attach",this.server.id),this.formAttach).then((function(){t.sending=!1,Object.keys(t.$page.props.errors).length||(t.formAttach.email=null)}))},confirmDetach:function(t){var e=this;Object(T.a)({title:this.__("Are you sure?"),message:this.__("Are you sure you want to detach this user from this server?"),onConfirm:function(){return e.detach(t)}})},detach:function(t){var e=this;this.sending=!0,this.$inertia.delete(this.route("admin.services.servers.detach",[this.server.id,t])).then((function(){return e.sending=!1}))}}},q=r(0),A=Object(q.a)(k,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Page",[r("TopBar"),t._v(" "),r("Content",[r("Container",[r("PageHeader",{scopedSlots:t._u([{key:"start",fn:function(){return[r("PageHeaderTitle",[t._v(t._s(t.__("Edit provider")))])]},proxy:!0}])}),t._v(" "),r("PageBody",[r("SettingsLayout",{scopedSlots:t._u([{key:"nav",fn:function(){return[r("Tabs")]},proxy:!0},{key:"segments",fn:function(){return[r("SettingsSegment",{scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(t.__("Edit")))]},proxy:!0},{key:"form",fn:function(){return[r("form",{staticClass:"space-y-4",on:{submit:function(e){return e.preventDefault(),t.submit(e)}}},[r("FormInput",{attrs:{label:t.__("Name"),errors:t.$page.props.errors.name},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}}),t._v(" "),r("FormActions",[r("Button",[t._v(t._s(t.__("Save changes")))]),t._v(" "),r("Button",{attrs:{variant:"danger",type:"button"},on:{click:t.confirmDelete}},[t._v(t._s(t.__("Delete")))])],1)],1)]},proxy:!0}])})]},proxy:!0}])})],1)],1)],1)],1)}),[],!1,null,null,null);e.default=A.exports},15:function(t,e,r){"use strict";var s={props:{items:{type:Array,required:!1}}},n=r(0),i=Object(n.a)(s,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"grid grid-cols-4 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,r){"use strict";var s=r(0),n=Object(s.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=n.exports},17:function(t,e,r){"use strict";r.r(e);var s=r(39),n=r(40),i=r(41),a=r(42),o={components:{TopBar:s.a,Breadcrumbs:n.a,TabBar:i.a,TopBarTabBarContainer:a.a},data:function(){return{tabBars:[{title:"Dashboard",to:this.route("admin.dashboard"),active:this.route().current("admin.dashboard")||this.route().current("admin.settings")||this.route().current("admin.system")},{title:this.__("Users"),to:this.route("admin.users.index"),active:this.route().current("admin.users.*")},{title:this.__("Packages"),to:this.route("admin.packages.index"),active:this.route().current("admin.packages.*")},this.$page.props.settings.support?{title:"".concat(this.__("Support")," (").concat(this.$page.props.openTickets,")"),to:this.route("admin.support.index"),active:this.route().current("admin.support.*")}:null,this.$page.props.settings.documentation?{title:this.__("Documentation"),to:this.route("admin.documentation.index"),active:this.route().current("admin.documentation.*")}:null,{title:"Services",to:this.route("admin.services.index"),active:this.route().current("admin.services.*")}],breadcrumbs:[{title:this.$page.props.settings.name,to:"/"},{title:this.__("Administration"),to:this.route("admin.dashboard")}]}}},u=r(0),l=Object(u.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("TopBar",{scopedSlots:t._u([{key:"breadcrumbs",fn:function(){return[r("Breadcrumbs",{attrs:{items:t.breadcrumbs}})]},proxy:!0},{key:"tab-bar",fn:function(){return[r("TopBarTabBarContainer",[r("TabBar",{attrs:{items:t.tabBars}})],1)]},proxy:!0}])})}),[],!1,null,null,null);e.default=l.exports},20:function(t,e,r){"use strict";var s={props:{caption:{type:String,required:!0}}},n=r(0),i=Object(n.a)(s,(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,r){"use strict";var s={props:{border:{type:Boolean,default:!0}}},n=r(0),i=Object(n.a)(s,(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,r){"use strict";var s=r(0),n=Object(s.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("thead",[this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},23:function(t,e,r){"use strict";var s=r(0),n=Object(s.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=n.exports},24:function(t,e,r){"use strict";var s=r(0),n=Object(s.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("tr",[this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},25:function(t,e,r){"use strict";var s=r(0),n=Object(s.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("tbody",[this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},26:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var s=r(62);function n(t){var e=t.title,r=t.message,n=t.onConfirm;return s.a.dispatch("confirmDelete/open",{title:e,message:r,onConfirm:function(){n(),s.a.dispatch("confirmDelete/close")}})}},27:function(t,e,r){"use strict";var s=r(65),n=r(64),i=r(66),a=r(74),o={props:{id:{type:String,required:!1},label:{type:String,required:!0},type:{type:String,default:function(){return"text"}},required:{type:Boolean,default:function(){return!1}},helperText:{type:String},errors:{type:Array},placeholder:{type:String},value:{required:!1,default:""},loading:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1}},components:{FormGroup:s.a,Label:n.a,ErrorText:i.a,HelperText:a.a},data:function(){return{defaultClasses:"w-full border-medium-emphasis text-body h-10 max-w-lg px-2 border rounded bg-surface-1 focus:outline-none focus:border-primary",selected:this.value}},methods:{updateValue:function(t){this.$emit("input",t)}}},u=r(0),l=Object(u.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("FormGroup",[r("Label",{attrs:{errors:t.errors,forId:t.id}},[t._v(t._s(t.label))]),t._v(" "),r("select",{directives:[{name:"model",rawName:"v-model",value:t.value,expression:"value"}],class:[t.defaultClasses,t.disabled||t.loading?"opacity-50":"",t.loading?"cursor-wait":""],attrs:{disabled:t.loading||t.disabled,id:t.id,required:t.required,placeholder:t.placeholder},on:{input:function(e){return t.updateValue(e.target.value)},change:function(e){var r=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.value=e.target.multiple?r:r[0]}}},[t._t("default")],2),t._v(" "),t.errors?r("ErrorText",[t._v(t._s(t.errors[0]))]):t._e(),t._v(" "),t.helperText&&!t.errors?r("HelperText",[t._v(t._s(t.helperText))]):t._e()],1)}),[],!1,null,null,null);e.a=l.exports},32:function(t,e,r){"use strict";var s=r(65),n=r(64),i=r(66),a={props:{id:{type:String,required:!1},label:{type:String,required:!0},required:{type:Boolean,default:function(){return!1}},errors:{type:Array},placeholder:{type:String},value:{required:!1,default:""},rows:{default:3,required:!1}},components:{FormGroup:s.a,Label:n.a,ErrorText:i.a},data:function(){return{defaultClasses:"w-full border-medium-emphasis text-body max-w-lg px-2 border rounded bg-surface-1 focus:outline-none focus:border-primary"}},methods:{updateValue:function(t){this.$emit("input",t)}}},o=r(0),u=Object(o.a)(a,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("FormGroup",[r("Label",{attrs:{errors:t.errors,forId:t.id}},[t._v(t._s(t.label))]),t._v(" "),r("textarea",{class:[t.defaultClasses],attrs:{id:t.id,required:t.required,rows:t.rows,placeholder:t.placeholder},domProps:{value:t.value},on:{input:function(e){return t.updateValue(e.target.value)}}}),t._v(" "),t.errors?r("ErrorText",[t._v(t._s(t.errors[0]))]):t._e()],1)}),[],!1,null,null,null);e.a=u.exports},38:function(t,e,r){"use strict";r.r(e);var s={data:function(){return{items:[{title:this.__("Overview"),to:this.route("admin.services.index"),active:this.route().current("admin.services.index")},{title:this.__("Synchronize servers"),to:this.route("admin.services.servers.index"),active:this.route().current("admin.services.servers.index")},{title:this.__("Synchronize providers"),to:this.route("admin.services.providers.index"),active:this.route().current("admin.services.providers.index")}]}}},n=r(0),i=Object(n.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("ul",{staticClass:"-ml-4 space-y-1"},t._l(t.items,(function(e){return r("li",[r("inertia-link",{staticClass:"flex items-center h-10 px-4 font-medium text-medium-emphasis",class:{"rounded shadow text-primary bg-surface-3":e.active},attrs:{href:e.to}},[t._v(t._s(e.title)+" "+t._s(e.route))])],1)})),0)}),[],!1,null,null,null);e.default=i.exports}}]);