2024-07-10 06:11:42 +00:00
|
|
|
(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([["/js/admin_invite"],{"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js":
|
|
|
|
/*!****************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js ***!
|
|
|
|
\****************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var n=s(/*! jquery */"./node_modules/jquery/dist/jquery.js");const i={props:["code"],data:function(){return{instance:{},inviteConfig:{},tabIndex:0,isProceeding:!1,errors:{username:void 0,email:void 0,password:void 0,password_confirm:void 0},form:{username:void 0,email:void 0,password:void 0,password_confirm:void 0,display_name:void 0}}},mounted:function(){this.fetchInstanceData()},methods:{fetchInstanceData:function(){var e=this;axios.get("/api/v1/instance").then((function(t){e.instance=t.data})).then((function(t){e.verifyToken()})).catch((function(e){console.log(e)}))},verifyToken:function(){var e=this;axios.post("/api/v1.1/auth/invite/admin/verify",{token:this.code}).then((function(t){e.tabIndex=1,e.inviteConfig=t.data})).catch((function(t){e.tabIndex="invalid-code"}))},checkUsernameAvailability:function(){var e=this;axios.post("/api/v1.1/auth/invite/admin/uc",{token:this.code,username:this.form.username}).then((function(t){t&&t.data?(e.isProceeding=!1,e.tabIndex=2):(e.tabIndex="invalid-code",e.isProceeding=!1)})).catch((function(t){t.response.data&&t.response.data.username?(e.errors.username=t.response.data.username[0],e.isProceeding=!1):(e.tabIndex="invalid-code",e.isProceeding=!1)}))},checkEmailAvailability:function(){var e=this;axios.post("/api/v1.1/auth/invite/admin/ec",{token:this.code,email:this.form.email}).then((function(t){t&&t.data?(e.isProceeding=!1,e.tabIndex=3):(e.tabIndex="invalid-code",e.isProceeding=!1)})).catch((function(t){t.response.data&&t.response.data.email?(e.errors.email=t.response.data.email[0],e.isProceeding=!1):(e.tabIndex="invalid-code",e.isProceeding=!1)}))},validateEmail:function(){return!(!this.form.email||!this.form.email.length)&&/^[a-zA-Z]+[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+[a-zA-Z]$/i.test(this.form.email)},handleRegistration:function(){var e=n("<form>",{action:"/api/v1.1/auth/invite/admin/re",method:"post"}),t={_token:document.head.querySelector('meta[name="csrf-token"]').content,token:this.code,username:this.form.username,name:this.form.display_name,email:this.form.email,password:this.form.password,password_confirm:this.form.password_confirm};n.each(t,(function(t,s){n("<input>").attr({type:"hidden",name:t,value:s}).appendTo(e)})),e.appendTo("body").submit()},proceed:function(e){switch(this.isProceeding=!0,event.currentTarget.blur(),e){case 1:this.checkUsernameAvailability();break;case 2:this.checkEmailAvailability();break;case 3:this.isProceeding=!1,this.tabIndex=4;break;case 4:this.isProceeding=!1,this.tabIndex=5;break;case 5:this.tabIndex=6,this.handleRegistration()}}}}},"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=template&id=71014157":
|
|
|
|
/*!***************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=template&id=71014157 ***!
|
|
|
|
\***************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{render:()=>n,staticRenderFns:()=>i});var n=function(){var e=this,t=e._self._c;return t("div",{staticClass:"admin-invite-component"},[t("div",{staticClass:"admin-invite-component-inner"},[t("div",{staticClass:"card bg-dark"},[0===e.tabIndex?t("div",{staticClass:"card-body d-flex align-items-center justify-content-center"},[t("div",{staticClass:"text-center"},[t("b-spinner",{attrs:{variant:"muted"}}),e._v(" "),t("p",{staticClass:"text-muted mb-0"},[e._v("Loading...")])],1)]):1===e.tabIndex?t("div",{staticClass:"card-body"},[e._m(0),e._v(" "),t("div",{staticClass:"d-flex flex-column align-items-center justify-content-center"},[t("p",{staticClass:"lead mb-1 text-muted"},[e._v("You've been invited to join")]),e._v(" "),t("p",{staticClass:"h3 mb-2"},[e._v(e._s(e.instance.uri))]),e._v(" "),t("p",{staticClass:"mb-0 text-muted"},[t("span",[e._v(e._s(e.instance.stats.user_count.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}))+" users")]),e._v(" "),t("span",[e._v("·")]),e._v(" "),t("span",[e._v(e._s(e.instance.stats.status_count.toLocaleString("en-CA",{compactDisplay:"short",notation:"compact"}))+" posts")])]),e._v(" "),"You've been invited to join"!=e.inviteConfig.message?t("div",[t("div",{staticClass:"admin-message"},[t("p",{staticClass:"small text-light mb-0"},[e._v("Message from admin(s):")]),e._v("\n "+e._s(e.inviteConfig.message)+"\n ")])]):e._e()]),e._v(" "),t("div",{staticClass:"mt-5"},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"username"}},[e._v("Username")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.username,expression:"form.username"}],staticClass:"form-control form-control-lg",attrs:{type:"text",placeholder:"What should everyone call you?",minlength:"2",maxlength:"15"},domProps:{value:e.form.username},on:{input:function(t){t.target.composing||e.$set(e.form,"username",t.target.value)}}}),e._v(" "),e.errors.username?t("p",{staticClass:"form-text text-danger"},[t("i",{staticClass:"far fa-exclamation-triangle mr-1"}),e._v("\n "+e._s(e.errors.username)+"\n ")]):e._e()]),e._v(" "),t("button",{staticClass:"btn btn-primary btn-block font-weight-bold",attrs:{disabled:e.isProceeding||!e.form.username||e.form.username.length<2},on:{click:function(t){return e.proceed(e.tabIndex)}}},[e.isProceeding?[t("b-spinner",{attrs:{small:""}})]:[e._v("\n Continue\n ")]],2),e._v(" "),e._m(1),e._v(" "),e._m(2)])]):2===e.tabIndex?t("div",{staticClass:"card-body"},[e._m(3),e._v(" "),t("div",{staticClass:"d-flex flex-column align-items-center justify-content-center"},[t("p",{staticClass:"lead mb-1 text-muted"},[e._v("You've been invited to join")]),e._v(" "),t("p",{staticClass:"h3 mb-2"},[e._v(e._s(e.instance.uri))])]),e._v(" "),t("div",{staticClass:"mt-5"},[t("div",{staticClass:"form-group"},[t("label",{attrs:{for:"username"}},[e._v("Email Address")]),e._v(" "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.email,expression:"form.email"}],staticClass:"form-control form-control-lg",attrs:{type:"email",placeholder:"Your email address"},domProps:{value:e.form.email},on:{input:function(t){t.target.composing||e.$set(e.form,"email",t.target.value)}}}),e._v(" "),e.errors.email?t("p",{staticClass:"form-text text-danger"},[t("i",{staticClass:"far fa-exclamation-triangle mr-1"}),e._v("\n "+e._s(e.errors.email)+"\n ")]):e._e()]),e._v(" "),t("button",{staticClass:"btn btn-primary btn-block font-weight-bold",attrs:{disabled:e.isProceeding||!e.form.email||!e.validateEmail()},on:{click:function(t){return e.proceed(e.tabIndex)}}},[e.isProceeding?[t
|
|
|
|
/*!*********************************************!*\
|
|
|
|
!*** ./resources/assets/js/admin_invite.js ***!
|
|
|
|
\*********************************************/(e,t,s)=>{Vue.component("admin-invite",s(/*! ./../components/invite/AdminInvite.vue */"./resources/assets/components/invite/AdminInvite.vue").default)},"./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss":
|
|
|
|
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss ***!
|
|
|
|
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var n=s(/*! ../../../../node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js */"./node_modules/laravel-mix/node_modules/css-loader/dist/runtime/api.js"),i=s.n(n)()((function(e){return e[1]}));i.push([e.id,".admin-invite-component {\n font-family: var(--font-family-sans-serif);\n}\n.admin-invite-component-inner {\n display: flex;\n width: 100wv;\n height: 100vh;\n justify-content: center;\n align-items: center;\n}\n.admin-invite-component-inner .card {\n width: 100%;\n color: #fff;\n padding: 1.25rem 2.5rem;\n border-radius: 10px;\n min-height: 530px;\n}\n@media (min-width: 768px) {\n.admin-invite-component-inner .card {\n width: 30%;\n}\n}\n.admin-invite-component-inner .card label {\n color: var(--muted);\n font-weight: bold;\n text-transform: uppercase;\n}\n.admin-invite-component-inner .card .login-link {\n margin-top: 10px;\n font-weight: 600;\n}\n.admin-invite-component-inner .card .register-terms {\n font-size: 12px;\n color: var(--muted);\n}\n.admin-invite-component-inner .card .form-control {\n color: #fff;\n}\n.admin-invite-component-inner .card .admin-message {\n margin-top: 20px;\n border: 1px solid var(--dropdown-item-hover-color);\n color: var(--text-lighter);\n padding: 1rem;\n border-radius: 5px;\n}",""]);const a=i},"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss":
|
|
|
|
/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
|
|
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss ***!
|
|
|
|
\************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var n=s(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=s.n(n),a=s(/*! !!../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!../../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss */"./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss"),o={insert:"head",singleton:!1};i()(a.default,o);const r=a.default.locals||{}},"./resources/assets/components/invite/AdminInvite.vue":
|
|
|
|
/*!************************************************************!*\
|
|
|
|
!*** ./resources/assets/components/invite/AdminInvite.vue ***!
|
|
|
|
\************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var n=s(/*! ./AdminInvite.vue?vue&type=template&id=71014157 */"./resources/assets/components/invite/AdminInvite.vue?vue&type=template&id=71014157"),i=s(/*! ./AdminInvite.vue?vue&type=script&lang=js */"./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js"),a={};for(const e in i)"default"!==e&&(a[e]=()=>i[e]);s.d(t,a);s(/*! ./AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss */"./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss");var o=(0,s(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */"./node_modules/vue-loader/lib/runtime/componentNormalizer.js").default)(i.default,n.render,n.staticRenderFns,!1,null,null,null);o.options.__file="resources/assets/components/invite/AdminInvite.vue";const r=o.exports},"./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js":
|
|
|
|
/*!************************************************************************************!*\
|
|
|
|
!*** ./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js ***!
|
|
|
|
\************************************************************************************/(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>a});var n=s(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminInvite.vue?vue&type=script&lang=js */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=script&lang=js"),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);s.d(t,i);const a=n.default},"./resources/assets/components/invite/AdminInvite.vue?vue&type=template&id=71014157":
|
|
|
|
/*!******************************************************************************************!*\
|
|
|
|
!*** ./resources/assets/components/invite/AdminInvite.vue?vue&type=template&id=71014157 ***!
|
|
|
|
\******************************************************************************************/(e,t,s)=>{"use strict";s.r(t);var n=s(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminInvite.vue?vue&type=template&id=71014157 */"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=template&id=71014157"),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);s.d(t,i)},"./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss":
|
|
|
|
/*!*********************************************************************************************************!*\
|
|
|
|
!*** ./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss ***!
|
|
|
|
\*********************************************************************************************************/(e,t,s)=>{"use strict";s.r(t);var n=s(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!../../../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss */"./node_modules/style-loader/dist/cjs.js!./node_modules/laravel-mix/node_modules/css-loader/dist/cjs.js??clonedRuleSet-17.use[1]!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-17.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-17.use[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/assets/components/invite/AdminInvite.vue?vue&type=style&index=0&id=71014157&lang=scss"),i={};for(const e in n)"default"!==e&&(i[e]=()=>n[e]);s.d(t,i)}},e=>{e.O(0,["/js/vendor"],(()=>{return t="./resources/assets/js/admin_invite.js",e(e.s=t);var t}));e.O()}]);
|