(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[3],{ /***/ "./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Welcome.vue?vue&type=script&lang=js&": /*!***********************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Welcome.vue?vue&type=script&lang=js& ***! \***********************************************************************************************************************************************************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var vee_validate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vee-validate */ \"./node_modules/vee-validate/dist/vee-validate.esm.js\");\n/* harmony import */ var _plugins_vee_validate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/plugins/vee-validate */ \"./src/plugins/vee-validate.js\");\n/* harmony import */ var lottie_web_vue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lottie-web-vue */ \"./node_modules/lottie-web-vue/dist/lottie-web-vue.esm.js\");\n/* harmony import */ var vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! vue-smooth-reflow */ \"./node_modules/vue-smooth-reflow/dist/vue-smooth-reflow.min.js\");\n/* harmony import */ var vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_3__);\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"Welcome\",\n mixins: [vue_smooth_reflow__WEBPACK_IMPORTED_MODULE_3___default.a],\n data: function data() {\n return {\n step: 1,\n username: '',\n password: '',\n confirmation: \"\",\n isLoading: true,\n message: \"\",\n notificationShow: false,\n isInit: false,\n initAni: {\n classes: 'zoomIn',\n delay: 1000,\n duration: 700\n },\n s1Ani: {\n classes: 'fadeInUp',\n delay: 1300,\n duration: 700\n },\n s2Ani: {\n classes: 'fadeInUp',\n delay: 1700,\n duration: 700\n },\n s3Ani: {\n classes: 'fadeInUp',\n delay: 1900,\n duration: 700\n },\n s4Ani: {\n classes: 'fadeIn',\n delay: 2500,\n duration: 700\n }\n };\n },\n components: {\n ValidationObserver: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationObserver\"],\n ValidationProvider: vee_validate__WEBPACK_IMPORTED_MODULE_0__[\"ValidationProvider\"],\n LottieAnimation: lottie_web_vue__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n created: function created() {\n // var lang = navigator.language || navigator.userLanguage;\n this.isInit = !this.$store.state.needInitialization;\n\n if (this.isInit) {\n this.$router.push(\"/login\");\n }\n },\n mounted: function mounted() {\n this.$smoothReflow({\n el: '.login-panel',\n property: ['height', 'width']\n });\n this.isLoading = false;\n },\n watch: {\n // Watch System Initialization\n '$store.state.needInitialization': {\n handler: function handler(data) {\n this.isInit = !data;\n\n if (this.isInit) {\n this.$router.push(\"/login\");\n }\n },\n deep: true\n }\n },\n methods: {\n reg: function reg() {\n var _this = this;\n\n this.$api.user.createUsernameAndPaword({\n username: this.username,\n pwd: this.password\n }).then(function (res) {\n if (res.data.success == 200) {\n _this.goToStep(3);\n }\n });\n },\n login: function login() {\n var _this2 = this;\n\n this.$api.user.login({\n username: this.username,\n pwd: this.password\n }).then(function (res) {\n if (res.data.success == 200) {\n localStorage.setItem(\"user_token\", res.data.data.token);\n localStorage.setItem(\"version\", res.data.data.version);\n\n _this2.$store.commit('setToken', res.data.data.token);\n\n _this2.$api.user.getUserInfo().then(function (res) {\n if (res.data.success == 200) {\n _this2.$store.commit('changeUserInfo', res.data.data);\n\n _this2.$router.push('/');\n }\n });\n } else {\n _this2.notificationShow = true;\n _this2.message = _this2.$t(\"Username or Password error!\");\n }\n });\n },\n goToStep: function goToStep(step) {\n this.step = step;\n },\n complete: function complete() {\n this.login();\n }\n }\n});\n\n//# sourceURL=webpack:///./src/views/Welcome.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), /***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"445a19f9-vue-loader-template\"}!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Welcome.vue?vue&type=template&id=e4731dd0&": /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"445a19f9-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Welcome.vue?vue&type=template&id=e4731dd0& ***! \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! exports provided: render, staticRenderFns */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass: \"is-flex is-justify-content-center is-align-items-center\",\n attrs: { id: \"login-page\" }\n },\n [\n !_vm.isLoading\n ? _c(\n \"div\",\n {\n directives: [\n {\n name: \"animate-css\",\n rawName: \"v-animate-css\",\n value: _vm.initAni,\n expression: \"initAni\"\n }\n ],\n staticClass: \"login-panel is-shadow\",\n class: \"step\" + _vm.step\n },\n [\n _vm.step == 1\n ? _c(\n \"div\",\n { staticClass: \"has-text-centered\" },\n [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"animate-css\",\n rawName: \"v-animate-css\",\n value: _vm.s1Ani,\n expression: \"s1Ani\"\n }\n ],\n staticClass: \" is-flex is-justify-content-center\"\n },\n [\n _c(\"b-image\", {\n staticClass: \"is-128x128 mb-4\",\n attrs: { src: __webpack_require__(/*! @/assets/img/wuji.svg */ \"./src/assets/img/wuji.svg\") }\n })\n ],\n 1\n ),\n _c(\n \"h2\",\n {\n directives: [\n {\n name: \"animate-css\",\n rawName: \"v-animate-css\",\n value: _vm.s2Ani,\n expression: \"s2Ani\"\n }\n ],\n staticClass: \"title is-2 mb-5 has-text-centered\"\n },\n [_vm._v(_vm._s(_vm.$t(\"Welcome to CasaOS\")))]\n ),\n _c(\n \"h2\",\n {\n directives: [\n {\n name: \"animate-css\",\n rawName: \"v-animate-css\",\n value: _vm.s3Ani,\n expression: \"s3Ani\"\n }\n ],\n staticClass: \"subtitle has-text-centered\"\n },\n [\n _vm._v(\n _vm._s(_vm.$t(\"Let's create your initial account\"))\n )\n ]\n ),\n _c(\n \"b-button\",\n {\n directives: [\n {\n name: \"animate-css\",\n rawName: \"v-animate-css\",\n value: _vm.s4Ani,\n expression: \"s4Ani\"\n }\n ],\n staticClass: \"mt-2\",\n attrs: { type: \"is-primary\", rounded: \"\" },\n on: {\n click: function($event) {\n return _vm.goToStep(2)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"Go →\")))]\n )\n ],\n 1\n )\n : _vm._e(),\n _vm.step == 2\n ? _c(\n \"div\",\n [\n _c(\n \"h2\",\n { staticClass: \"title is-3 has-text-centered\" },\n [_vm._v(_vm._s(_vm.$t(\"Create Account\")))]\n ),\n _c(\n \"div\",\n { staticClass: \"is-flex is-justify-content-center \" },\n [\n _c(\n \"div\",\n { staticClass: \"has-text-centered\" },\n [\n _c(\"b-image\", {\n staticClass: \"is-128x128\",\n attrs: {\n src: __webpack_require__(/*! @/assets/img/Account.png */ \"./src/assets/img/Account.png\"),\n rounded: \"\"\n }\n })\n ],\n 1\n )\n ]\n ),\n _c(\"ValidationObserver\", {\n ref: \"observer\",\n scopedSlots: _vm._u(\n [\n {\n key: \"default\",\n fn: function(ref) {\n var handleSubmit = ref.handleSubmit\n return [\n _c(\"ValidationProvider\", {\n attrs: { rules: \"required\", name: \"User\" },\n scopedSlots: _vm._u(\n [\n {\n key: \"default\",\n fn: function(ref) {\n var errors = ref.errors\n var valid = ref.valid\n return [\n _c(\n \"b-field\",\n {\n attrs: {\n label: _vm.$t(\"Username\"),\n type: {\n \"is-danger\": errors[0],\n \"is-success\": valid\n },\n message: _vm.$t(errors)\n }\n },\n [\n _c(\"b-input\", {\n attrs: { type: \"text\" },\n nativeOn: {\n keyup: function($event) {\n if (\n !$event.type.indexOf(\n \"key\"\n ) &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return handleSubmit(\n _vm.reg\n )\n }\n },\n model: {\n value: _vm.username,\n callback: function($$v) {\n _vm.username = $$v\n },\n expression: \"username\"\n }\n })\n ],\n 1\n )\n ]\n }\n }\n ],\n null,\n true\n )\n }),\n _c(\"ValidationProvider\", {\n attrs: {\n rules: \"required|min:5\",\n vid: \"password\",\n name: \"Password\"\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"default\",\n fn: function(ref) {\n var errors = ref.errors\n var valid = ref.valid\n return [\n _c(\n \"b-field\",\n {\n staticClass: \"mt-4\",\n attrs: {\n label: _vm.$t(\"Password\"),\n type: {\n \"is-danger\": errors[0],\n \"is-success\": valid\n },\n message: _vm.$t(errors)\n }\n },\n [\n _c(\"b-input\", {\n attrs: {\n type: \"password\",\n \"password-reveal\": \"\"\n },\n nativeOn: {\n keyup: function($event) {\n if (\n !$event.type.indexOf(\n \"key\"\n ) &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return handleSubmit(\n _vm.reg\n )\n }\n },\n model: {\n value: _vm.password,\n callback: function($$v) {\n _vm.password = $$v\n },\n expression: \"password\"\n }\n })\n ],\n 1\n )\n ]\n }\n }\n ],\n null,\n true\n )\n }),\n _c(\"ValidationProvider\", {\n attrs: {\n rules: \"required|confirmed:password\",\n name: \"Password Confirmation\"\n },\n scopedSlots: _vm._u(\n [\n {\n key: \"default\",\n fn: function(ref) {\n var errors = ref.errors\n var valid = ref.valid\n return [\n _c(\n \"b-field\",\n {\n staticClass: \"mt-4\",\n attrs: {\n label: _vm.$t(\n \"Confirm Password\"\n ),\n type: {\n \"is-danger\": errors[0],\n \"is-success\": valid\n },\n message: _vm.$t(errors)\n }\n },\n [\n _c(\"b-input\", {\n attrs: {\n type: \"password\",\n \"password-reveal\": \"\"\n },\n nativeOn: {\n keyup: function($event) {\n if (\n !$event.type.indexOf(\n \"key\"\n ) &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return handleSubmit(\n _vm.reg\n )\n }\n },\n model: {\n value: _vm.confirmation,\n callback: function($$v) {\n _vm.confirmation = $$v\n },\n expression: \"confirmation\"\n }\n })\n ],\n 1\n )\n ]\n }\n }\n ],\n null,\n true\n )\n }),\n _c(\n \"b-button\",\n {\n staticClass: \"mt-5\",\n attrs: {\n type: \"is-primary\",\n rounded: \"\",\n expanded: \"\"\n },\n on: {\n click: function($event) {\n return handleSubmit(_vm.reg)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"Create\")))]\n )\n ]\n }\n }\n ],\n null,\n false,\n 3231920384\n )\n })\n ],\n 1\n )\n : _vm._e(),\n _vm.step == 3\n ? _c(\"div\", { staticClass: \"has-text-centered \" }, [\n _c(\"h2\", { staticClass: \"title is-3 has-text-centered\" }, [\n _vm._v(_vm._s(_vm.$t(\"All things done!\")))\n ]),\n _c(\n \"div\",\n {\n staticClass:\n \"is-flex is-align-items-center is-justify-content-center\"\n },\n [\n _c(\"lottie-animation\", {\n staticClass: \"animation\",\n attrs: {\n animationData: __webpack_require__(/*! @/assets/ani/done.json */ \"./src/assets/ani/done.json\"),\n autoPlay: true,\n loop: false\n },\n on: { complete: _vm.complete }\n })\n ],\n 1\n )\n ])\n : _vm._e()\n ]\n )\n : _vm._e()\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack:///./src/views/Welcome.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%22445a19f9-vue-loader-template%22%7D!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Welcome.vue?vue&type=style&index=0&lang=css&": /*!*****************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Welcome.vue?vue&type=style&index=0&lang=css& ***! \*****************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("// Imports\nvar ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.i, \"\\n.animation {\\n width: 120px;\\n height: 120px;\\n}\\n\", \"\"]);\n// Exports\nmodule.exports = exports;\n\n\n//# sourceURL=webpack:///./src/views/Welcome.vue?./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"); /***/ }), /***/ "./node_modules/vue-style-loader/index.js?!./node_modules/css-loader/dist/cjs.js?!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/views/Welcome.vue?vue&type=style&index=0&lang=css&": /*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/vue-style-loader??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Welcome.vue?vue&type=style&index=0&lang=css& ***! \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("// style-loader: Adds some css to the DOM by adding a