1 line
13 KiB
JavaScript
Vendored
1 line
13 KiB
JavaScript
Vendored
(self.webpackChunk=self.webpackChunk||[]).push([[1970],{1970:(t,e,s)=>{"use strict";s.r(e),s.d(e,{default:()=>l});var n=s(3022),o=s(9870),a=s(5250),r=s(6684);const i={components:{TopBar:n.Z,Breadcrumbs:o.Z,TabBar:a.Z,TopBarTabBarContainer:r.Z},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")},{title:this.__("Servers"),to:this.route("servers.index")}]}}};const l=(0,s(1900).Z)(i,(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).exports},9870:(t,e,s)=>{"use strict";s.d(e,{Z:()=>r});const n={props:{to:{type:String,required:!0}}};var o=s(1900);const a={components:{BreadcrumbsItem:(0,o.Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("inertia-link",{staticClass:"font-medium text-body text-breadcrumbs",attrs:{href:t.to}},[t._t("default")],2)}),[],!1,null,null,null).exports},props:{items:{type:Array,required:!0}}};const r=(0,o.Z)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"flex items-center space-x-2"},t._l(t.items,(function(e,n){return s("li",{key:e.title},[s("BreadcrumbsItem",{attrs:{to:e.to}},[t._v(t._s(e.title))]),t._v(" "),n<t.items.length-1?s("span",{staticClass:"ml-2 text-low-emphasis"},[t._v("/")]):t._e()],1)})),0)}),[],!1,null,null,null).exports},8170:(t,e,s)=>{"use strict";s.d(e,{Z:()=>a});var n={small:"max-w-sm",base:"max-w-5xl",large:"max-w-screen-xl",fluid:"max-w-none"};const o={props:{size:{type:String,default:function(){return"base"},validator:function(t){return Object.keys(n).includes(t)}}},data:function(){return{baseClasses:"w-full px-4 sm:px-8 mx-auto",sizeClasses:n}}};const a=(0,s(1900).Z)(o,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{class:[t.baseClasses,t.sizeClasses[t.size]]},[t._t("default")],2)}),[],!1,null,null,null).exports},6653:(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});const n={data:function(){return{isOpen:!1,position:"top"}},methods:{open:function(){this.isOpen=!0,this.calculatePosition()},close:function(){this.isOpen=!1,this.calculatePosition()},toggle:function(){this.isOpen=!this.isOpen,this.calculatePosition()},outsideClickListener:function(t){this.$refs.dropdown!==t.target.closest(this.$refs.dropdown.tagName)&&this.close()},calculatePosition:function(){this.$refs.dropdown.getBoundingClientRect().top>.75*window.innerHeight?this.position="bottom":this.position="top"}},mounted:function(){window.addEventListener("click",this.outsideClickListener)},beforeDestroy:function(){window.removeEventListener("click",this.outsideClickListener)}};const o=(0,s(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.close,expression:"close"}],ref:"dropdown",staticClass:"relative"},[t._t("default",null,null,{isOpen:t.isOpen,open:t.open,close:t.close,toggle:t.toggle,position:t.position})],2)}),[],!1,null,null,null).exports},6111:(t,e,s)=>{"use strict";s.d(e,{Z:()=>a});var n={top:"right-0 top-0 mt-8",bottom:"right-0 bottom-0 mb-8"};const o={props:{position:{type:String,default:function(){return"top"},validator:function(t){return Object.keys(n).includes(t)}}},computed:{positionClasses:function(){return n[this.position]}}};const a=(0,s(1900).Z)(o,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{class:["absolute flex flex-col py-1 overflow-hidden rounded shadow-2xl z-20 bg-surface-1",t.positionClasses]},[t._t("default")],2)}),[],!1,null,null,null).exports},659:(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});const n={props:{to:{type:String,required:!0},method:{required:!1,default:"get"}}};const o=(0,s(1900).Z)(n,(function(){var t=this,e=t.$createElement;return(t._self._c||e)("inertia-link",{staticClass:"flex items-center w-full h-10 px-6 whitespace-nowrap text-medium-emphasis text-small focus:bg-primary focus:text-on-primary hover:text-high-emphasis focus:outline-none",attrs:{href:t.to,method:t.method}},[t._t("default")],2)}),[],!1,null,null,null).exports},319:(t,e,s)=>{"use strict";s.d(e,{Z:()=>n});const n=(0,s(1900).Z)({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("button",{staticClass:"inline-flex items-center justify-center w-10 h-10 text-medium-emphasis rounded-circle focus:outline-none focus:text-high-emphasis",on:{click:function(e){return t.$emit("click")}}},[t._t("default")],2)}),[],!1,null,null,null).exports},5250:(t,e,s)=>{"use strict";s.d(e,{Z:()=>r});const n={props:{to:{type:String,required:!0},active:{type:Boolean,default:!1}},data:function(){return{baseClasses:"inline-flex items-center justify-center h-10 px-6 font-medium rounded text-small text-tab-bar",activeClasses:"shadow text-tab-bar-active bg-tab-bar-item",transitionClasses:"transition duration-fast hover:text-high-emphasis focus:text-high-emphasis"}}};var o=s(1900);const a={components:{TabBarItem:(0,o.Z)(n,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("li",[s("inertia-link",{class:[t.baseClasses,t.transitionClasses,t.active?t.activeClasses:null],attrs:{href:t.to}},[t._t("default")],2)],1)}),[],!1,null,null,null).exports},props:{items:{type:Array,required:!0}}};const r=(0,o.Z)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"inline-flex flex-row p-1 overflow-hidden overflow-x-auto whitespace-nowrap rounded bg-tab-bar"},t._l(t.items,(function(e){return e?s("TabBarItem",{key:e.title,attrs:{to:e.to,active:e.active}},[t._v("\n "+t._s(e.title)+"\n ")]):t._e()})),1)}),[],!1,null,null,null).exports},3022:(t,e,s)=>{"use strict";s.d(e,{Z:()=>m});var n=s(8170),o=s(6653),a=s(6111),r=s(659),i=s(1900);const l=(0,i.Z)({},(function(){var t=this.$createElement,e=this._self._c||t;return e("svg",{staticClass:"bi bi-moon",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:"M14.53 10.53a7 7 0 0 1-9.058-9.058A7.003 7.003 0 0 0 8 15a7.002 7.002 0 0 0 6.53-4.47z"}})])}),[],!1,null,null,null).exports;const c=(0,i.Z)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("svg",{staticClass:"bi bi-sun",attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[s("path",{attrs:{d:"M3.5 8a4.5 4.5 0 1 1 9 0 4.5 4.5 0 0 1-9 0z"}}),t._v(" "),s("path",{attrs:{"fill-rule":"evenodd",d:"M8.202.28a.25.25 0 0 0-.404 0l-.91 1.255a.25.25 0 0 1-.334.067L5.232.79a.25.25 0 0 0-.374.155l-.36 1.508a.25.25 0 0 1-.282.19l-1.532-.245a.25.25 0 0 0-.286.286l.244 1.532a.25.25 0 0 1-.189.282l-1.509.36a.25.25 0 0 0-.154.374l.812 1.322a.25.25 0 0 1-.067.333l-1.256.91a.25.25 0 0 0 0 .405l1.256.91a.25.25 0 0 1 .067.334L.79 10.768a.25.25 0 0 0 .154.374l1.51.36a.25.25 0 0 1 .188.282l-.244 1.532a.25.25 0 0 0 .286.286l1.532-.244a.25.25 0 0 1 .282.189l.36 1.508a.25.25 0 0 0 .374.155l1.322-.812a.25.25 0 0 1 .333.067l.91 1.256a.25.25 0 0 0 .405 0l.91-1.256a.25.25 0 0 1 .334-.067l1.322.812a.25.25 0 0 0 .374-.155l.36-1.508a.25.25 0 0 1 .282-.19l1.532.245a.25.25 0 0 0 .286-.286l-.244-1.532a.25.25 0 0 1 .189-.282l1.508-.36a.25.25 0 0 0 .155-.374l-.812-1.322a.25.25 0 0 1 .067-.333l1.256-.91a.25.25 0 0 0 0-.405l-1.256-.91a.25.25 0 0 1-.067-.334l.812-1.322a.25.25 0 0 0-.155-.374l-1.508-.36a.25.25 0 0 1-.19-.282l.245-1.532a.25.25 0 0 0-.286-.286l-1.532.244a.25.25 0 0 1-.282-.189l-.36-1.508a.25.25 0 0 0-.374-.155l-1.322.812a.25.25 0 0 1-.333-.067L8.203.28zM8 2.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11z"}})])}),[],!1,null,null,null).exports;const u=(0,i.Z)({},(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("svg",{staticClass:"bi bi-search",attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[s("path",{attrs:{"fill-rule":"evenodd",d:"M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z"}}),t._v(" "),s("path",{attrs:{"fill-rule":"evenodd",d:"M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z"}})])}),[],!1,null,null,null).exports;var d=s(319);const p={components:{Container:n.Z,Dropdown:o.Z,DropdownList:a.Z,DropdownListItem:r.Z,IconMoon:l,IconSearch:u,IconSun:c,IconButton:d.Z},data:function(){return{themeMode:this.$page.props.auth.user.theme}},mounted:function(){this.setDarkMode()},methods:{toggleTheme:function(){var t=this;window.axios.post("/profile/toggle-theme").then((function(e){t.themeMode=e.data,t.setDarkMode()}))},setDarkMode:function(){"auto"===this.themeMode?this.checkDarkMode()?document.documentElement.classList.add("theme--dark"):document.documentElement.classList.remove("theme--dark"):"dark"===this.themeMode?document.documentElement.classList.add("theme--dark"):document.documentElement.classList.remove("theme--dark")},checkDarkMode:function(){return window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches},triggerSearch:function(){window.eventBus.$emit("openSearch")}}};const m=(0,i.Z)(p,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("header",{staticClass:"sticky top-0 border-b border-low-emphasis bg-top-bar z-30"},[s("div",{staticClass:"w-full px-4 sm:px-8 mx-auto max-w-top-bar-container"},[s("div",{staticClass:"flex flex-col"},[s("nav",{staticClass:"flex flex-col items-center justify-between py-4 space-y-4 md:space-y-0 md:flex-row text-top-bar"},[s("div",{staticClass:"flex items-center space-x-5"},[t.$page.props.settings.logo?s("img",{staticClass:"h-top-bar-logo",attrs:{src:t.$page.props.settings.logo}}):t._e(),t._v(" "),t._t("breadcrumbs")],2),t._v(" "),s("ul",{staticClass:"flex items-center space-x-4"},[s("li",{attrs:{"aria-label":t.__("Search"),"data-balloon-blunt":"","data-balloon-pos":"down"}},[s("IconButton",{on:{click:t.triggerSearch}},[s("IconSearch",{staticClass:"text-top-bar"})],1)],1),t._v(" "),s("li",{attrs:{"aria-label":"light"===t.themeMode?t.__("Enable dark mode"):t.__("Enable light mode"),"data-balloon-blunt":"","data-balloon-pos":"down"}},[s("IconButton",{on:{click:t.toggleTheme}},["light"===t.themeMode?s("IconMoon",{staticClass:"text-top-bar"}):t._e(),t._v(" "),"dark"===t.themeMode?s("IconSun",{staticClass:"text-top-bar"}):t._e()],1)],1),t._v(" "),s("li",[s("Dropdown",{scopedSlots:t._u([{key:"default",fn:function(e){var n=e.toggle,o=e.isOpen;return[s("button",{staticClass:"flex h-auto m-0 appearance-none items-center",on:{click:n}},[s("span",[t._v(t._s(t.$page.props.auth.user.name))]),t._v(" "),s("img",{staticClass:"ml-2 inline w-8 h-8 rounded-avatar bg-surface-2",attrs:{src:t.$page.props.auth.user.avatar,alt:t.$page.props.auth.user.name}})]),t._v(" "),o?s("DropdownList",[t.$page.props.settings.support?s("DropdownListItem",{attrs:{to:"/support"}},[t._v(t._s(t.__("Support"))+"\n ")]):t._e(),t._v(" "),t.$page.props.settings.documentation?s("DropdownListItem",{attrs:{to:"/documentation"}},[t._v(t._s(t.__("Documentation")))]):t._e(),t._v(" "),s("DropdownListItem",{attrs:{to:t.route("profile.index")}},[t._v(t._s(t.__("Profile"))+"\n ")]),t._v(" "),t.$page.props.settings.billing?s("DropdownListItem",{attrs:{to:t.route("profile.billing.index")}},[t._v(t._s(t.__("Billing"))+"\n ")]):t._e(),t._v(" "),"admin"===t.$page.props.auth.user.role?s("DropdownListItem",{staticClass:"text-danger",attrs:{to:t.route("admin.dashboard")}},[t._v(t._s(t.__("Administration"))+"\n ")]):t._e(),t._v(" "),s("DropdownListItem",{attrs:{to:t.route("logout"),method:"post"}},[t._v(t._s(t.__("Sign out"))+"\n ")])],1):t._e()]}}])})],1)])]),t._v(" "),t._t("tab-bar")],2)])])}),[],!1,null,null,null).exports},6684:(t,e,s)=>{"use strict";s.d(e,{Z:()=>n});const n=(0,s(1900).Z)({},(function(){var t=this,e=t.$createElement;return(t._self._c||e)("nav",{staticClass:"flex items-center justify-center pb-4"},[t._t("default")],2)}),[],!1,null,null,null).exports},1900:(t,e,s)=>{"use strict";function n(t,e,s,n,o,a,r,i){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),r?(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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=l):o&&(l=i?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}s.d(e,{Z:()=>n})}}]); |