1 line
6.6 KiB
JavaScript
1 line
6.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["generator"],{2728:function(t,e,a){},"390f":function(t,e,a){"use strict";var s=a("2728"),n=a.n(s);n.a},"3bad":function(t,e,a){var s=a("91fe"),n=a("9817").values;s({target:"Object",stat:!0},{values:function(t){return n(t)}})},"5eac":function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"account"},[a("md-app",{attrs:{"md-waterfall":"","md-mode":"fixed"}},[a("md-app-toolbar",{staticClass:"md-primary toolbar"},[a("div",{staticClass:"md-toolbar-section-start"},[a("md-button",{staticClass:"md-icon-button",on:{click:function(e){return t.back()}}},[a("md-icon",[t._v("arrow_back")])],1),a("h3",{staticClass:"md-title",staticStyle:{flex:"1"}},[t._v(t._s(t.lang.title))])],1)]),a("md-app-content",[a("v-touch",{attrs:{"swipe-options":{direction:"horizontal"}},on:{swiperight:function(e){return t.back()}}},[a("div",{ref:"list_placeholder",staticStyle:{height:"54px"}}),a("md-list",[a("md-subheader",{staticClass:"md-primary"},[t._v(t._s(t.lang.subheader[0]))]),a("md-list-item",[a("p",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.code_res,expression:"code_res",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopyCode,expression:"onCopyCode",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:t.onErrorCode,expression:"onErrorCode",arg:"error"}]},[t._v(t._s(t.code_res?t.code_res:t.lang.code_res_empty))])]),a("md-subheader",{staticClass:"md-primary"},[t._v(t._s(t.lang.subheader[1]))]),a("md-list-item",[a("md-field",[a("label",{attrs:{for:"expired_time"}},[t._v(t._s(t.lang.length_setter.label))]),a("md-select",{attrs:{name:"code_length",id:"code_length"},model:{value:t.code_length,callback:function(e){t.code_length=e},expression:"code_length"}},[a("md-option",{attrs:{value:"6"}},[t._v(t._s(t.lang.length_setter.options[0]))]),a("md-option",{attrs:{value:"12"}},[t._v(t._s(t.lang.length_setter.options[1]))]),a("md-option",{attrs:{value:"18"}},[t._v(t._s(t.lang.length_setter.options[2]))]),a("md-option",{attrs:{value:"24"}},[t._v(t._s(t.lang.length_setter.options[3]))]),a("md-option",{attrs:{value:"32"}},[t._v(t._s(t.lang.length_setter.options[4]))])],1)],1)],1),a("md-list-item",[a("span",{staticClass:"md-list-item-text"},[t._v(t._s(t.lang.settings[0]))]),a("md-switch",{staticClass:"md-primary",model:{value:t.have_upper,callback:function(e){t.have_upper=e},expression:"have_upper"}})],1),a("md-list-item",[a("span",{staticClass:"md-list-item-text"},[t._v(t._s(t.lang.settings[1]))]),a("md-switch",{staticClass:"md-primary",model:{value:t.have_lower,callback:function(e){t.have_lower=e},expression:"have_lower"}})],1),a("md-list-item",[a("span",{staticClass:"md-list-item-text"},[t._v(t._s(t.lang.settings[2]))]),a("md-switch",{staticClass:"md-primary",model:{value:t.have_num,callback:function(e){t.have_num=e},expression:"have_num"}})],1),a("md-list-item",[a("span",{staticClass:"md-list-item-text"},[t._v(t._s(t.lang.settings[3]))]),a("md-switch",{staticClass:"md-primary",model:{value:t.have_symbol,callback:function(e){t.have_symbol=e},expression:"have_symbol"}})],1),a("md-button",{staticClass:"md-raised md-primary expand",on:{click:function(e){return t.generateStart()}}},[t._v(t._s(t.lang.submit))])],1),a("md-snackbar",{attrs:{"md-position":"center","md-active":t.show_snackbar,"md-persistent":""},on:{"update:mdActive":function(e){t.show_snackbar=e},"update:md-active":function(e){t.show_snackbar=e}}},[a("span",[t._v(t._s(t.snakebar_msg))])])],1)],1)],1)],1)},n=[],i=(a("79dd"),a("b3f9"),a("d780"),a("b54b")),o=a("08c1"),r=a("36f0"),c=a("c0b7"),l=a("e6a3"),d=a("bfd3"),m={name:"Add",data:function(){return{show_snackbar:!1,snakebar_msg:"",lang:"",clientHeight:"",have_upper:!0,have_lower:!0,have_num:!0,have_symbol:!1,code_length:12,code_res:""}},computed:Object(i["a"])({},Object(o["c"])(["user_infos","row_data","row_pwd","settings"])),methods:Object(i["a"])({},Object(o["b"])(["setUserInfo","setRowData","setRowPwd","setSettings"]),{changeFixed:function(t){this.$refs.list_placeholder.parentNode.parentNode.style.maxHeight=t+"px",this.$refs.list_placeholder.parentNode.style.minHeight=t-32+"px",window.document.documentElement.setAttribute("data-theme",this.settings.is_dark_mode?"dark":"light")},init:function(){if(d["a"].call(this),0!=Object.keys(this.row_pwd).length){var t=(new Date).getTime();t-this.row_pwd.create_time<this.settings.expired_time?this.initLanguage():this.turnToHome("密码超时")}else this.turnToHome("无密码")},initLanguage:function(){this.settings.is_chinese?this.lang=Object(r["a"])().generator.CHS:this.lang=Object(r["a"])().generator.EN,console.log("语言配置完成")},back:function(){this.$router.go(-1)},turnToHome:function(t){console.log(t),this.$router.replace("/")},generateStart:function(){this.code_res=Object(c["a"])(this.code_length,this.have_lower,this.have_upper,this.have_num,this.have_symbol),this.snakebar_msg=this.lang.generate_successful,this.show_snackbar=!0},onCopyCode:function(){this.snakebar_msg=this.lang.copy_successful,this.show_snackbar=!0},onErrorCode:function(){this.snakebar_msg=this.lang.copy_failed,this.show_snackbar=!0}}),created:function(){this.lang=Object(r["a"])().generator.CHS,console.log("临时语言系统加载完成"),this.init()},mounted:function(){this.clientHeight="".concat(document.documentElement.clientHeight),window.onresize=function(){this.clientHeight="".concat(document.documentElement.clientHeight),Object(l["a"])()}.bind(this)},watch:{clientHeight:function(){this.changeFixed(this.clientHeight)}},beforeDestroy:function(){},components:{}},u=m,h=(a("390f"),a("623f")),_=Object(h["a"])(u,s,n,!1,null,"42d98e28",null);e["default"]=_.exports},9817:function(t,e,a){var s=a("7a23"),n=a("16e5"),i=a("8c47"),o=a("354c").f,r=function(t){return function(e){var a,r=i(e),c=n(r),l=c.length,d=0,m=[];while(l>d)a=c[d++],s&&!o.call(r,a)||m.push(t?[a,r[a]]:r[a]);return m}};t.exports={entries:r(!0),values:r(!1)}},c0b7:function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));a("86dd"),a("af82"),a("c1f4"),a("79dd"),a("3bad"),a("9a14");var s={lower:n,upper:i,number:o,symbol:r};function n(){return String.fromCharCode(Math.floor(26*Math.random())+97)}function i(){return String.fromCharCode(Math.floor(26*Math.random())+65)}function o(){return String.fromCharCode(Math.floor(10*Math.random())+48)}function r(){var t='~!@#$%^&*()_+{}":?><;.,';return t[Math.floor(Math.random()*t.length)]}function c(t,e,a,n,i){var o="",r=e+a+n+i,c=[{lower:e},{upper:a},{number:n},{symbol:i}].filter((function(t){return Object.values(t)[0]}));if(0===r)return"";for(var l=0;l<t;l++)c.forEach((function(t){var e=Object.keys(t)[0];o+=s[e]()}));return o.slice(0,t)}}}]); |