(window.webpackJsonp=window.webpackJsonp||[]).push([[49],{468:function(e,t,l){"use strict";l.r(t);var o=l(3),r={data:()=>({db:{dialect:"sqlite",storage:"./gancio.sqlite",host:"localhost",database:"gancio"},loading:!1}),methods:{checkDb(){var e=this;return Object(o.a)((function*(){e.loading=!0;try{yield e.$axios.$post("/setup/db",{db:e.db}),e.$root.$message("DB Connection OK!",{color:"success"}),e.$emit("complete",e.db)}catch(t){e.$root.$message(t.response.data,{color:"error"})}e.loading=!1}))()}}},d=l(6),component=Object(d.a)(r,(function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("v-container",[l("v-card-title",{staticClass:"text-h5"},[e._v("Database"),l("v-card-text"),l("v-form",[l("v-btn-toggle",{attrs:{text:"",color:"primary"},model:{value:e.db.dialect,callback:function(t){e.$set(e.db,"dialect",t)},expression:"db.dialect"}},[l("v-btn",{attrs:{value:"sqlite",text:""}},[e._v("sqlite")]),l("v-btn",{attrs:{value:"postgres",text:""}},[e._v("postgres")]),l("v-btn",{attrs:{value:"mariadb",text:""}},[e._v("mariadb")])],1),"sqlite"===e.db.dialect?[l("v-text-field",{attrs:{label:"Path"},model:{value:e.db.storage,callback:function(t){e.$set(e.db,"storage",t)},expression:"db.storage"}})]:e._e(),"sqlite"!==e.db.dialect?[l("v-text-field",{attrs:{label:"Hostname",rules:[e.$validators.required("hostname")]},model:{value:e.db.host,callback:function(t){e.$set(e.db,"host",t)},expression:"db.host"}}),l("v-text-field",{attrs:{label:"Database",rules:[e.$validators.required("database")]},model:{value:e.db.database,callback:function(t){e.$set(e.db,"database",t)},expression:"db.database"}}),l("v-text-field",{attrs:{label:"Username",rules:[e.$validators.required("username")]},model:{value:e.db.username,callback:function(t){e.$set(e.db,"username",t)},expression:"db.username"}}),l("v-text-field",{attrs:{type:"password",label:"Password",rules:[e.$validators.required("password")]},model:{value:e.db.password,callback:function(t){e.$set(e.db,"password",t)},expression:"db.password"}})]:e._e()],2)],1),l("v-card-actions",[l("v-btn",{attrs:{text:"",color:"primary",loading:e.loading,disabled:e.loading},on:{click:e.checkDb}},[e._v(e._s(e.$t("common.next"))),l("v-icon",[e._v("mdi-arrow-right")])],1)],1)],1)}),[],!1,null,null,null);t.default=component.exports}}]);