PageSourceSearch

https://hype.news/js/auth-Login-vue.3dc7b439.js

js hype.news collected 2026-10-01 06:52:35 UTC 7,293 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunk_hypefactors_hypenews"]=self["webpackChunk_hypefactors_hypenews"]||[]).push([[598,5763],{85595(t,s,e){e.r(s),e.d(s,{default:()=>v});var r=function(){var t=this,s=t._self._c;return s("auth",[s("div",{staticClass:"Login rounded-card border border-solid border-line bg-white p-8 shadow-sm"},[s("h1",{staticClass:"mb-6 text-center font-display text-2xl font-bold text-ink"},[t._v(" "+t._s(t.$t("pages.login.title"))+" ")]),s("transition",{attrs:{name:"fade"}},[t.errorMsg?s("div",{staticClass:"mb-5"},[s("div",{staticClass:"rounded-lg border border-solid border-brand/30 bg-brand/5 px-4 py-3 font-sans text-base leading-snug text-brand",attrs:{"data-testid":"Login__Error"}},[t._v(" "+t._s(t.errorMsg)+" ")]),403===t.status?s("div",{staticClass:"mt-3 text-center"},[s("button",{staticClass:"cursor-pointer rounded-full border border-solid border-outline bg-white px-5 py-2.5 text-sm font-bold text-ink transition-colors hover:text-accent disabled:cursor-not-allowed disabled:opacity-60",attrs:{disabled:t.isResendingActivation,type:"button"},on:{click:t.resendActivation}},[t._v(" "+t._s(t.$t("components.login.resend_activation"))+" ")])]):t._e()]):t._e()]),s("form",{on:{submit:function(s){return s.preventDefault(),t.login.apply(null,arguments)}}},[s("div",{staticClass:"mb-4"},[s("label",{staticClass:"mb-1.5 block font-display text-sm font-semibold text-ink"},[t._v(" "+t._s(t.$t("forms.your_email"))+" ")]),s("input",{directives:[{name:"model",rawName:"v-model",value:t.form.email,expression:"form.email"}],class:t.inputClass(t.$v.form.email),attrs:{placeholder:t.$t("forms.your_email"),type:"email",name:"email","data-testid":"LoginInput__Email"},domProps:{value:t.form.email},on:{input:[function(s){s.target.composing||t.$set(t.form,"email",s.target.value)},function(s){return t.$v.form.email.$touch()}]}}),t.$v.form.email.$error?s("p",{staticClass:"mt-1 text-sm text-brand"},[t._v(" "+t._s(t.fieldError(t.$v.form.email,t.$t("forms.your_email")))+" ")]):t._e()]),s("div",{staticClass:"mb-2"},[s("label",{staticClass:"mb-1.5 block font-display text-sm font-semibold text-ink"},[t._v(" "+t._s(t.$t("forms.password"))+" ")]),s("input",{directives:[{name:"model",rawName:"v-model",value:t.form.password,expression:"form.password"}],class:t.inputClass(t.$v.form.password),attrs:{placeholder:t.$t("forms.password"),type:"password",name:"password","data-testid":"LoginInput__Password"},domProps:{value:t.form.password},on:{input:[function(s){s.target.composing||t.$set(t.form,"password",s.target.value)},function(s){return t.$v.form.password.$touch()}]}}),t.$v.form.password.$error?s("p",{staticClass:"mt-1 text-sm text-brand"},[t._v(" "+t._s(t.fieldError(t.$v.form.password,t.$t("forms.password")))+" ")]):t._e()]),s("div",{staticClass:"mb-5 text-right"},[s("router-link",{staticClass:"forgot-password font-display text-base font-semibold text-ink hover:text-accent",attrs:{to:{name:"forgotten-password"}}},[t._v(" "+t._s(t.$t("forms.forgot_password"))+" ")])],1),s("button",{staticClass:"w-full cursor-pointer rounded-full border-none bg-accent px-6 py-3 text-sm font-bold text-white transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",attrs:{disabled:t.isLoading,type:"submit","data-testid":"Login__Submit"}},[t._v(" "+t._s(t.$t("components.login.login"))+" ")])]),s("div",{staticClass:"mt-8 border-0 border-t border-solid border-line pt-6"},[s("h2",{staticClass:"mb-4 font-display text-base font-bold text-ink"},[t._v(" "+t._s(t.$t("components.login.create_an_account"))+" ")]),s("div",{staticClass:"grid grid-cols-1 gap-4 sm:grid-cols-2"},[s("div",[s("p",{staticClass:"mb-2 font-sans text-base text-muted"},[t._v(" "+t._s(t.$t("components.login.newsroom_signup"))+" ")]),s("router-link",{staticClass:"inline-flex cursor-pointer rounded-full border border-solid border-outline bg-white px-5 py-2.5 text-sm font-bold text-ink transition-colors hover:text-accent",attrs:{to:{name:"NewsroomRegister"}}},[t._v(" "+t._s(t.$t("components.login.signup"))+" ")])],1),s("div",[s("p",{staticClass:"mb-2 font-sans text-base text-muted"},[t._v(" "+t._s(t.$t("components.login.journalist_signup"))+" ")]),s("router-link",{staticClass:"inline-flex cursor-pointer rounded-full border border-solid border-outline bg-white px-5 py-2.5 text-sm font-bold text-ink transition-colors hover:text-accent",attrs:{to:{name:"JournalistRegister"}}},[t._v(" "+t._s(t.$t("components.login.signup"))+" ")])],1)])])],1
1)])},o=[],n=e(9217),i=e(24634),a=e(7180),l=(e(28706),e(44114),e(26099),e(33278)),d=e(95353),c=e(87147),u=e(43102),m=e(47392);const p={name:"Login",components:{Auth:c["default"]},mixins:[u.A],data:function(){return{form:{email:null,password:null},errorMsg:"",isResendingActivation:!1,isLoading:!1,status:null}},validations:{form:{email:{email:l.Rp,required:l.mw},password:{required:l.mw,min:(0,l.Bp)(6)}}},computed:(0,a.A)((0,a.A)({},(0,d.L8)(["currentUser","isLoggedIn"])),(0,d.L8)("personalNewsrooms",["firstNewsroom"])),mounted:function(){this.form.email=this.form.email||this.$route.query.signin,this.isLoggedIn&&this.closeAllAuthModals()},methods:(0,a.A)((0,a.A)({},(0,d.i0)(["loginUserRequest"])),{},{login:function(){var t=this;if(this.$v.$touch(),this.$v.$error)return!1;this.resetErrors(),this.isLoading=!0,this.loginUserRequest(this.form).then(function(){var s=t.currentUser;m.z.identify(s),t.$ma.setUsername(s.id),t.$notify.success(t.$t("success.logged_in_as",{user:"".concat(s.first_name," ").concat(s.last_name)}));var e={name:"home"};t.$route.query.redirect?e={path:t.$route.query.redirect}:"company"===s.type&&t.firstNewsroom?e={name:"newsroom.edit",params:{newsroomSlug:t.firstNewsroom.slug}}:"reader"===s.type&&(e={name:"dashboard"}),t.$router.push(e)})["catch"](function(s){s.response&&(t.errorMsg=s.response.data.message,t.status=s.response.status),t.$displayRequestError(s,t.$t("errors.user_could_not_be_authenticated"),5e3,[404])})["finally"](function(){t.isLoading=!1})},resetErrors:function(){this.errorMsg="",this.status=null},resendActivation:function(){var t=this;return(0,i.A)((0,n.A)().m(function s(){var e;return(0,n.A)().w(function(s){while(1)switch(s.p=s.n){case 0:return s.p=0,s.n=1,t.$confirm(t.$t("components.login.confirm_resend_activation"));case 1:return t.isResendingActivation=!0,s.n=2,t.$api.post("activation/resend",{email:t.form.email});case 2:t.resetErrors(),t.$notify.success(t.$t("success.successfully_sent_new_email_with_token")),s.n=5;break;case 3:if(s.p=3,e=s.v,"cancel"!==e){s.n=4;break}return s.a(2);case 4:t.$displayRequestError(e);case 5:return s.p=5,t.isResendingActivation=!1,s.f(5);case 6:return s.a(2)}},s,null,[[0,3,5,6]])}))()}})},f=p;var b=e(81656),g=(0,b.A)(f,r,o,!1,null,null,null);const v=g.exports},87147(t,s,e){e.r(s),e.d(s,{default:()=>d});var r=function(){var t=this,s=t._self._c;return s("div",{staticClass:"AuthLayout relative flex min-h-screen items-center justify-center bg-cover bg-center px-4 py-10",style:{backgroundImage:"url(".concat(t.$asset("/images/sections/auth/login_background.jpg"),")")}},[s("div",{staticClass:"absolute inset-0 bg-ink/40"}),s("div",{staticClass:"relative w-full max-w-md"},[t._t("default")],2)])},o=[];const n={},i=n;var a=e(81656),l=(0,a.A)(i,r,o,!1,null,null,null);const d=l.exports}}]);
2//# sourceMappingURL=auth-Login-vue.3dc7b439.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.