mirror of https://github.com/wg-easy/wg-easy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
5.6 KiB
2 lines
5.6 KiB
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["VueSetup"]=t():e["VueSetup"]=t()})("undefined"!==typeof self?self:this,(()=>(()=>{"use strict";var e={};(()=>{e.d=(t,r)=>{for(var s in r)e.o(r,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:r[s]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.p=""})();var t={};if(e.d(t,{default:()=>w}),"undefined"!==typeof window){var r=window.document.currentScript,s=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(e.p=s[1])}var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("h1",{staticClass:"text-4xl font-medium my-16 text-gray-700 dark:text-neutral-200 text-center"},[r("span",{staticClass:"align-middle"},[e._v(e._s(e.$t("setup")))])]),r("form",{staticClass:"shadow rounded-md bg-white dark:bg-neutral-700 mx-auto w-72 p-5 overflow-hidden mt-10",on:{submit:e.addAdminUser}},[r("div",{staticClass:"h-20 w-20 mb-10 mt-5 mx-auto rounded-full bg-red-800 dark:bg-red-800 relative overflow-hidden"},[r("svg",{staticClass:"w-10 h-10 m-5 text-white dark:text-white",attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"}},[r("path",{attrs:{"fill-rule":"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z","clip-rule":"evenodd"}})])]),r("div",{staticClass:"mb-3"},[r("label",{staticClass:"block mb-2 text-gray-500 dark:text-white",attrs:{for:"username"}},[e._v(e._s(e.$t("setupUsername")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.username,expression:"username"}],staticClass:"px-3 py-2 text-sm dark:bg-neutral-700 text-gray-500 dark:text-gray-500 mb-5 border-2 border-gray-100 dark:border-neutral-800 rounded-lg w-full focus:border-red-800 dark:focus:border-red-800 dark:placeholder:text-neutral-400 outline-none",attrs:{id:"username",name:"username",placeholder:e.$t("setupUsername"),required:"",autocomplete:"username"},domProps:{value:e.username},on:{input:function(t){t.target.composing||(e.username=t.target.value)}}})]),r("div",{staticClass:"mb-3"},[r("label",{staticClass:"block mb-2 text-gray-500 dark:text-white",attrs:{for:"newPassword"}},[e._v(e._s(e.$t("newPassword")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.newPassword,expression:"newPassword"}],staticClass:"px-3 py-2 text-sm dark:bg-neutral-700 text-gray-500 dark:text-gray-500 mb-5 border-2 border-gray-100 dark:border-neutral-800 rounded-lg w-full focus:border-red-800 dark:focus:border-red-800 dark:placeholder:text-neutral-400 outline-none",attrs:{id:"newPassword",type:"password",name:"newPassword",placeholder:e.$t("newPassword"),required:"",autocomplete:"new-password"},domProps:{value:e.newPassword},on:{input:function(t){t.target.composing||(e.newPassword=t.target.value)}}})]),r("div",{staticClass:"mb-3"},[r("label",{staticClass:"block mb-2 text-gray-500 dark:text-white",attrs:{for:"confirmNewPassword"}},[e._v(e._s(e.$t("confirmNewPassword")))]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.confirmNewPassword,expression:"confirmNewPassword"}],staticClass:"px-3 py-2 text-sm dark:bg-neutral-700 text-gray-500 dark:text-gray-500 mb-5 border-2 border-gray-100 dark:border-neutral-800 rounded-lg w-full focus:border-red-800 dark:focus:border-red-800 dark:placeholder:text-neutral-400 outline-none",attrs:{id:"confirmNewPassword",type:"password",name:"confirmNewPassword",placeholder:e.$t("confirmNewPassword"),required:"",autocomplete:"new-password"},domProps:{value:e.confirmNewPassword},on:{input:function(t){t.target.composing||(e.confirmNewPassword=t.target.value)}}})]),r("button",{class:e.newPassword&&e.confirmNewPassword&&e.newPassword==e.confirmNewPassword?"bg-red-800 dark:bg-red-800 w-full rounded shadow py-2 text-sm text-white dark:text-white hover:bg-red-700 dark:hover:bg-red-700 transition cursor-pointer":"bg-gray-200 dark:bg-neutral-800 w-full rounded shadow py-2 text-sm text-white dark:text-white cursor-not-allowed",attrs:{type:"submit",disabled:!e.newPassword||!e.confirmNewPassword||e.newPassword!=e.confirmNewPassword}},[e._v(" "+e._s(e.$t("setupBtnCU"))+" ")]),r("small",{staticClass:"text-yellow-600"},[e._v(e._s(e.$t("setupRequiredPatternPassword")))])])])},o=[];const d={name:"Setup",data(){return{username:"",newPassword:"",confirmNewPassword:""}},methods:{async addAdminUser(e){e.preventDefault(),this.newPassword===this.confirmNewPassword?this.api.addAdminUser({username:this.username,password:this.newPassword}).then((e=>{this.username="",this.newPassword="",this.confirmNewPassword="",alert("User created, please reload your current page"),window.location.reload()})).catch((e=>{alert(e.message||e.toString())})):alert("Password Mismatch")}},mounted(){this.api=new API}},n=d;function i(e,t,r,s,a,o,d,n){var i,l="function"===typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=r,l._compiled=!0),s&&(l.functional=!0),o&&(l._scopeId="data-v-"+o),d?(i=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(d)},l._ssrRegister=i):a&&(i=n?function(){a.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:a),i)if(l.functional){l._injectStyles=i;var u=l.render;l.render=function(e,t){return i.call(t),u(e,t)}}else{var w=l.beforeCreate;l.beforeCreate=w?[].concat(w,i):[i]}return{exports:e,options:l}}var l=i(n,a,o,!1,null,null,null);const u=l.exports,w=u;return t=t["default"],t})()));
|
|
//# sourceMappingURL=vue-setup.umd.min.js.map
|