1 line
8.9 KiB
Plaintext
1 line
8.9 KiB
Plaintext
{"version":3,"sources":["webpack:///./src/views/login/index.vue?0d8a","webpack:///./src/views/login/index.vue?e3fc","webpack:///src/views/login/index.vue","webpack:///./src/views/login/index.vue?a2f2","webpack:///./src/views/login/index.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","attrs","loading","model","value","callback","$$v","username","expression","on","signIn","password","_m","canContinue","staticRenderFns","name","data","remember","computed","mapGetters","beforeCreate","$store","dispatch","show","message","mounted","$route","query","logout","$nextTick","tokenExists","console","methods","component"],"mappings":"+HAAA,W,2CCAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACF,EAAG,MAAM,CAACE,YAAY,YAAY,CAACF,EAAG,MAAM,CAACE,YAAY,SAAS,CAACN,EAAIO,GAAG,aAAaH,EAAG,MAAM,CAACE,YAAY,aAAa,CAACF,EAAG,UAAU,CAACI,MAAM,CAAC,KAAO,QAAQ,KAAO,QAAQ,YAAc,WAAW,QAAUR,EAAIS,SAASC,MAAM,CAACC,MAAOX,EAAY,SAAEY,SAAS,SAAUC,GAAMb,EAAIc,SAASD,GAAKE,WAAW,cAAcX,EAAG,UAAU,CAACI,MAAM,CAAC,KAAO,WAAW,KAAO,WAAW,YAAc,WAAW,QAAUR,EAAIS,SAASO,GAAG,CAAC,MAAQhB,EAAIiB,QAAQP,MAAM,CAACC,MAAOX,EAAY,SAAEY,SAAS,SAAUC,GAAMb,EAAIkB,SAASL,GAAKE,WAAW,cAAcf,EAAImB,GAAG,GAAGf,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,QAAQ,CAACI,MAAM,CAAC,MAAQ,UAAU,SAAWR,EAAIoB,aAAaJ,GAAG,CAAC,MAAQhB,EAAIiB,WAAW,IAAI,QACtyBI,EAAkB,CAAC,WAAa,IAAIrB,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,cAAc,CAACN,EAAIO,GAAG,iCAAiCH,EAAG,MAAM,CAACJ,EAAIO,GAAG,6C,wBCsCzL,GACbe,KAAMA,QACNC,KAFF,WAGI,MAAO,CACLT,SAAUA,GACVI,SAAUA,GACVM,UAAUA,IAGdC,SAAUA,iCACZC,gBACIjB,QAAJA,yBAFA,IAIIW,YAJJ,WAKM,OAAOnB,KAAKa,UAAYb,KAAKiB,WAAajB,KAAKQ,WAGnDkB,aAjBF,WAkBI1B,KAAK2B,OAAOC,SAAS,qBAAsB,CAA/CC,QAAAC,+CAEEC,QApBF,WAoBA,WAKS/B,KAAKgC,OAAOC,MAAMC,OAY3B,2CAAAL,UAXM7B,KAAKmC,WAAU,WACb,IAEE,IAAV,qBACcC,EAAa,EAA3B,4CACA,wCAAAP,UACA,SACUQ,QAAQA,MAAMA,0FACd,EAAV,sCAAAR,eAKES,QAASA,CACPtB,OADJ,WAEUhB,KAAKa,UAAYb,KAAKiB,UACxBjB,KAAK2B,OAAOC,SAAS,8BAA+B,CAClDf,SAAUA,KAAKA,SACfI,SAAUA,KAAKA,SACfM,SAAUA,KAAKA,cCpFqU,I,wBCQ1VgB,EAAY,eACd,EACAzC,EACAsB,GACA,EACA,KACA,WACA,MAIa,aAAAmB,E","file":"js/auth.688202d0.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--12-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--12-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--12-oneOf-1-2!../../../node_modules/stylus-loader/index.js??ref--12-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=51d897ea&lang=stylus&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"main\"},[_c('div',{staticClass:\"loginBox\"},[_c('div',{staticClass:\"title\"},[_vm._v(\" Login \")]),_c('div',{staticClass:\"container\"},[_c('w-input',{attrs:{\"type\":\"email\",\"name\":\"email\",\"placeholder\":\"Username\",\"disable\":_vm.loading},model:{value:(_vm.username),callback:function ($$v) {_vm.username=$$v},expression:\"username\"}}),_c('w-input',{attrs:{\"type\":\"password\",\"name\":\"password\",\"placeholder\":\"Password\",\"disable\":_vm.loading},on:{\"enter\":_vm.signIn},model:{value:(_vm.password),callback:function ($$v) {_vm.password=$$v},expression:\"password\"}}),_vm._m(0),_c('div',{staticClass:\"actions\"},[_c('w-btn',{attrs:{\"label\":\"Sign in\",\"disable\":!_vm.canContinue},on:{\"click\":_vm.signIn}})],1)],1)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"signupText\"},[_vm._v(\" To create an account, go to \"),_c('pre',[_vm._v(\"https://forum.plutonium.pw/register\")])])}]\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"main\">\r\n <div class=\"loginBox\">\r\n <div class=\"title\">\r\n Login\r\n </div>\r\n <div class=\"container\">\r\n <w-input\r\n v-model=\"username\"\r\n type=\"email\"\r\n name=\"email\"\r\n placeholder=\"Username\"\r\n :disable=\"loading\"\r\n />\r\n <w-input\r\n v-model=\"password\"\r\n type=\"password\"\r\n name=\"password\"\r\n placeholder=\"Password\"\r\n :disable=\"loading\"\r\n @enter=\"signIn\"\r\n />\r\n <div class=\"signupText\">\r\n To create an account, go to\r\n <pre>https://forum.plutonium.pw/register</pre>\r\n </div>\r\n <div class=\"actions\">\r\n <w-btn\r\n label=\"Sign in\"\r\n :disable=\"!canContinue\"\r\n @click=\"signIn\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport { mapGetters } from 'vuex'\r\nexport default {\r\n name: 'Login',\r\n data () {\r\n return {\r\n username: '',\r\n password: '',\r\n remember: true\r\n }\r\n },\r\n computed: {\r\n ...mapGetters({\r\n loading: 'ui/showLoadingModal'\r\n }),\r\n canContinue () {\r\n return this.username && this.password && !this.loading\r\n }\r\n },\r\n beforeCreate () {\r\n this.$store.dispatch('ui/setLoadingState', { show: true, message: 'Checking for saved credentials...' })\r\n },\r\n mounted () {\r\n if (process.env.VUE_APP_ENV === 'development') {\r\n this.username = process.env.VUE_APP_DEV_USER\r\n this.password = process.env.VUE_APP_DEV_PASS\r\n }\r\n if (!this.$route.query.logout) {\r\n this.$nextTick(() => {\r\n try {\r\n // eslint-disable-next-line no-undef\r\n const tokenExists = isTokenAvailable()\r\n if (tokenExists) this.$store.dispatch('authentication/preAuthed')\r\n else this.$store.dispatch('ui/setLoadingState', { show: false })\r\n } catch (error) {\r\n console.error('error while trying to check if nix is logged in. Probably because nix isn\\'t ready yet.')\r\n this.$store.dispatch('ui/setLoadingState', { show: false })\r\n }\r\n })\r\n } else this.$store.dispatch('ui/setLoadingState', { show: false })\r\n },\r\n methods: {\r\n signIn () {\r\n if (this.username && this.password) {\r\n this.$store.dispatch('authentication/authenticate', {\r\n username: this.username,\r\n password: this.password,\r\n remember: this.remember\r\n })\r\n }\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"stylus\" scoped>\r\n.main {\r\n width: 100vw;\r\n height: 100vh;\r\n position: relative;\r\n}\r\n\r\n.loginBox {\r\n background-color: $primary-2;\r\n min-width: 500px;\r\n width: 750px;\r\n max-width: 50%;\r\n max-height: 50%;\r\n box-shadow: 2px 2px 2px 0px alpha(black, 0.1);\r\n border-radius: 5px;\r\n margin: 0 auto;\r\n position: absolute;\r\n top: 50%;\r\n transform: translateY(-50%) translateX(-50%);\r\n left: 50%;\r\n\r\n .title {\r\n text-transform: uppercase;\r\n background-color: $primary-3;\r\n padding: 12px 16px 12px 16px;\r\n font-family: politica-expanded, sans-serif;\r\n font-weight: 700;\r\n box-shadow: 0 2px 2px 0px alpha(black, 0.1);\r\n }\r\n\r\n .container {\r\n margin: 4px;\r\n }\r\n\r\n .actions {\r\n float: right;\r\n }\r\n}\r\n\r\n.signupText {\r\n display: inline-block;\r\n position: absolute;\r\n left: 0;\r\n bottom: -25px;\r\n margin-left: 8px;\r\n font-size: 15px;\r\n color: alpha(white, 0.3);\r\n\r\n pre {\r\n display: inline;\r\n padding: 0;\r\n margin: 0;\r\n }\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=51d897ea&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=51d897ea&lang=stylus&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"51d897ea\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} |