chainetv_web/backend/dist/static/js/app.4531b81aca620b5eb3ab.js

2 lines
9.5 KiB
JavaScript
Raw Permalink Normal View History

webpackJsonp([1],{"90d9":function(t,e){},BihB:function(t,e){},GK12:function(t,e){},NHnr:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s("7+uW"),a={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("router-view")],1)},staticRenderFns:[]};var i=s("VU/8")({name:"App"},a,!1,function(t){s("90d9")},null,null).exports,o=s("/ocq"),r=s("mtWM"),c=s.n(r),l={name:"ping",data:function(){return{msg:""}},methods:{getMessage:function(){var t=this;c.a.get("/chainetv/api/v1/ping").then(function(e){t.msg=e.data}).catch(function(t){console.error(t)})}},created:function(){this.getMessage()}},u={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("h1",[this._v(this._s(this.msg))])])},staticRenderFns:[]};var h=s("VU/8")(l,u,!1,function(t){s("anuS")},"data-v-894ab75e",null).exports,d=s("lHA8"),m=s.n(d),v=s("Gu7T"),p=s.n(v),f="/chainetv/api/v1";var g=new n.a;var _={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"modal is-active"},[s("div",{staticClass:"modal-background"}),t._v(" "),s("button",{staticClass:"modal-close is-large",attrs:{"aria-label":"close"},on:{click:function(e){return t.$emit("close")}}}),t._v(" "),s("div",{staticClass:"modal-content box"},[t._t("default")],2)])])},staticRenderFns:[]},w=s("VU/8")({},_,!1,null,null,null).exports,C={data:function(){return{name:"",password:"",errorMsg:""}},components:{modal:w},methods:{authenticate:function(){var t=this;this.$store.dispatch("login",{name:this.name,password:this.password}).then(function(){t.$store.getters.isAuthenticated&&t.$emit("close")})},register:function(){var t=this;this.$store.dispatch("register",{name:this.name,password:this.password}).then(function(){return t.$router.push("/")})}},mounted:function(){var t=this;g.$on("failedRegistering",function(e){t.errorMsg=e}),g.$on("failedAuthentication",function(e){t.errorMsg=e})},beforeDestroy:function(){g.$off("failedRegistering"),g.$off("failedAuthentication")}},k={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("modal",{on:{close:function(e){return t.$emit("close")}}},[s("div",{staticClass:"hero is-success"},[s("div",{staticClass:"hero-body has-text-centered"},[s("h2",{staticClass:"title"},[t._v("Login")]),t._v(" "),s("p",{staticClass:"subtitle error-msg"},[t._v(t._s(t.errorMsg))])])]),t._v(" "),s("section",{staticClass:"section",on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.authenticate(e)}}},[s("div",{staticClass:"field"},[s("label",{staticClass:"label",attrs:{for:"name"}},[t._v("Name:")]),t._v(" "),s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.name,expression:"name"}],staticClass:"input",attrs:{type:"name",id:"email"},domProps:{value:t.name},on:{input:function(e){e.target.composing||(t.name=e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"field"},[s("label",{staticClass:"label",attrs:{for:"password"}},[t._v("Password:")]),t._v(" "),s("div",{staticClass:"control"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],staticClass:"input",attrs:{type:"password",id:"password"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"control"},[s("a",{staticClass:"button is-success is-large",on:{click:t.authenticate}},[t._v("Login")])])])])},staticRenderFns:[]},b={name:"chainetv",components:{modalLogin:s("VU/8")(C,k,!1,null,null,null).exports,modal:w},data:function(){return{chaine:"",showModalLogin:!1,showModal:!1,modalmessage:""}},methods:{checkchaine:function(){var t=this;if(""===this.chaine)return this.modalmessage="rentrer un numéro de chaine",void(this.showModal=!0);this.$store.state.arrayresultchaines=[];var e=[].concat(p()(new m.a(this.chaine.split(" ")))),s=new RegExp("^[0-9]*-[0-9]*$");e.forEach(function(e){if(""!==e)if(s.test(e))for(var n=e.split("-").map(Number),a=n[0];a<=n[1];a+=1)t.$store.dispatch
//# sourceMappingURL=app.4531b81aca620b5eb3ab.js.map