ray-template/js/index-CCykVugW.js

2 lines
11 KiB
JavaScript

import{m as T,q as C,t as L,f as v,v as r,e as F,u as P,i as A,w as $}from"./hooks-yKQIzKXx.js";import"./dayjs@1.11.10-C8LoRVP6.js";import"./print-js@1.6.0-BdoEj60G.js";import"./vue-hooks-plus@2.2.1_vue@3.5.12_typescript@5.6.3_--wFVw10U.js";import"./lodash@4.17.21-Cw59kuJw.js";import"./js-cookie@3.0.5-Z_8Sd105.js";import"./screenfull@5.2.0-DmMZCkhi.js";import"./jsbarcode@3.11.6-DGNGFp02.js";import"./@logicflow_core@2.0.6-CHqfytjt.js";import"./mobx-preact@3.0.0_mobx@5.15.7_preact@10.22.0-q-IhwcFu.js";import"./preact@10.22.0-D1_UwAj3.js";import{u as z}from"./vue-router@4.3.2_vue@3.5.12_typescript@5.6.3_-Brd4YmBy.js";import{s as w}from"./utils-DJWgFDlo.js";import"./currency.js@2.0.4-9OAR_aOO.js";import{H as y,L as S,O as V,q,V as G,n as I,c as l,x as D,I as E,y as b,j as H,a as Q,b as k,N as U,s as W,R as c,E as x}from"./naive-ui@2.40.1_vue@3.5.12_typescript@5.6.3_-D3cUk1tG.js";import{l as a,b as e,p as m,I as d,F as B}from"./@vue_runtime-core@3.5.12-rIgKm_Vg.js";import{k as p,e as _,x as R}from"./@vue_reactivity@3.5.12-Bs6EYLxJ.js";import{Q as K}from"./vue3-next-qrcode@2.0.10_typescript@5.6.3-et2AKeWS.js";import{L as X}from"./ray-dCjhX_JK.js";import{f as Y}from"./@vueuse_core@11.1.0_vue@3.5.12_typescript@5.6.3_-ZDBD96r1.js";import{A as J}from"./index-CPnIe1iT.js";import"./lodash-es@4.17.21-B-5kLwAl.js";import"./pinia-plugin-persistedstate@4.1.1_pinia@2.2.4_typescript@5.6.3_vue@3.5.12_typescript@5.6.3____dh65odvamx6uymfx32yexjadga-_Zka_ujQ.js";import"./destr@2.0.3-CVtkxrq9.js";import"./deep-pick-omit@1.2.1-CegYQlcN.js";import"./pinia@2.2.4_typescript@5.6.3_vue@3.5.12_typescript@5.6.3_-BdVsFNKX.js";import"./vue-demi@0.14.10_vue@3.5.12_typescript@5.6.3_-Dq6ymT-8.js";import"./html-to-image@1.11.11-BOFdlgi9.js";import"./vue-i18n@9.13.1_vue@3.5.12_typescript@5.6.3_-DVUVmCuN.js";import"./@intlify_shared@9.13.1-BxU0OzX2.js";import"./@intlify_core-base@9.13.1-C6DqbPB6.js";import"./@intlify_message-compiler@9.13.1-GrLDMuy_.js";import"./echarts@5.5.0-CezqL3m-.js";import"./zrender@5.5.0-DW8ownf1.js";import"./tslib@2.3.0-BDyQ-Jie.js";import"./@vueuse_shared@11.1.0_vue@3.5.12_typescript@5.6.3_-DnrABUGp.js";import"./@vue_runtime-dom@3.5.12-BKraWVUW.js";import"./@vue_shared@3.5.12--5_uv9t5.js";import"./interactjs@1.10.26-DZL_TZzP.js";import"./call-bind@1.0.7-Cpj98o6Y.js";import"./mobx@5.15.7-CEMJDQot.js";import"./uuid@9.0.1-CQkTLCs1.js";import"./classnames@2.5.1-nUTIn1-D.js";import"./mousetrap@1.6.5-BTGDluHR.js";import"./mobx-utils@5.6.2_mobx@5.15.7-C1xBETkd.js";import"./date-fns@3.6.0-q9PkOyxq.js";import"./seemly@0.3.8-DjGKl9dV.js";import"./vueuc@0.4.64_vue@3.5.12_typescript@5.6.3_-BcAtcaHt.js";import"./evtd@0.2.4-CI_DDEu_.js";import"./@css-render_vue3-ssr@0.15.14_vue@3.5.12_typescript@5.6.3_-BZYDXyJG.js";import"./vooks@0.2.12_vue@3.5.12_typescript@5.6.3_--iLh4DJ5.js";import"./vdirs@0.1.8_vue@3.5.12_typescript@5.6.3_-C0KV5pCE.js";import"./@juggle_resize-observer@3.4.0-C8OzoCMD.js";import"./css-render@0.15.14-C5toWlUr.js";import"./@emotion_hash@0.8.0-WldOFDRm.js";import"./treemate@0.3.11-DKekKYbv.js";import"./date-fns-tz@3.1.3_date-fns@3.6.0-ztskLDQQ.js";import"./async-validator@4.2.5-DKvM95Vc.js";import"./@css-render_plugin-bem@0.15.14_css-render@0.15.14-Be8eOoM-.js";function M(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!m(t)}const Z=a({name:"RSigning",setup(){const t=p(),{t:i}=L(),{signing:n}=T(),{getRootPath:o}=C(),s=p(!1),u=()=>({name:"Ray Admin",pwd:"123456"}),j=z(),g=p(u()),N={name:{required:!0,message:i("views.login.index.NamePlaceholder"),trigger:["blur","input"]},pwd:{required:!0,message:i("views.login.index.PasswordPlaceholder"),trigger:["blur","input"]}};return{signingForm:g,loginFormRef:t,handleLogin:()=>{var h;(h=t.value)==null||h.validate(O=>{O||(s.value=!0,n(g.value).then(f=>{f.code===0&&setTimeout(()=>{window.$message.success(`欢迎${g.value.name}登陆~`),w(v.token,"tokenValue","localStorage"),w(v.signing,f.data,"localStorage"),j.push(o.value),s.value=!1},2*1e3)}).catch(()=>{window.$message.error("不可以这样哟, 不可以哟")}))})},rules:N,loading:s}},render(){let t;const{$t:i,loading:n}=this;return e(q,{model:this.signingForm,ref:"loginFormRef",rules:this.rules},{default:()=>[e(y,{label:i("views.login.index.Name"),path:"name"},{default:()=>[e(S,{value:this.signingForm.name,"onUpdate:value":o=>this.signingForm.name=o,placeholder:i("views.login.index.NamePlaceholder")},null)]}),e(y,{label:i("views.login.index.Password"),path:"pwd"},{default:()=>[e(S,{value:this.signingForm.pwd,"onUpdate:value":o=>this.signingForm.pwd=o,type:"password",showPasswordOn:"click",placeholder:i("views.login.index.PasswordPlaceholder"),onKeydown:o=>o.key==="Enter"&&this.handleLogin()},null)]}),e(V,{style:["width: 100%","margin-to: 18px"],type:"primary",onClick:this.handleLogin.bind(this),loading:n},M(t=i("views.login.index.Login"))?t:{default:()=>[t]})]})}}),ee=a({name:"RRegister",render(){return e(G,{status:"info",title:"提示",description:"我实在是不想写了..."},null)}}),te=a({name:"QRCodeSigning",setup(){const t=_({qrcodeValue:"https://github.com/XiaoDaiGua-Ray/xiaodaigua-ray.github.io"});return{...R(t)}},render(){return e("div",{class:"qrcode-signing"},[e(K,{text:"ray template yes",size:200,logoImage:X},null)])}});function ie(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!m(t)}const ne=a({name:"SSOSigning",setup(){return{ssoSigningOptions:[{icon:"github",key:"github",tooltipLabel:"Github登陆"},{icon:"google",key:"google",tooltipLabel:"Google登陆"},{icon:"twitter",key:"twitter",tooltipLabel:"Twitter登陆"}],handleSSOSigningClick:n=>{window.$message.info(`调用${n.tooltipLabel}`)}}},render(){let t;return e(l,{class:"sso-signing",align:"center"},ie(t=this.ssoSigningOptions.map(i=>e(I,{key:i.key},{trigger:()=>e(r,{name:i.icon,size:"24",cursor:"pointer",onClick:this.handleSSOSigningClick.bind(this,i)},null),default:()=>i.tooltipLabel})))?t:{default:()=>[t]})}}),oe=a({name:"ThemeSwitch",setup(){const{darkTheme:t,lightTheme:i}=P(),{getAppTheme:n}=F(),o=p(n.value);return{darkTheme:t,lightTheme:i,getAppTheme:n,railStyle:({checked:u})=>u?{backgroundColor:"#000000"}:{color:"#000000"},modelAppThemeRef:o}},render(){const{$t:t,darkTheme:i,lightTheme:n,railStyle:o}=this;return e(l,{justify:"center"},{default:()=>[e(D,null,{trigger:()=>e(E,{value:this.modelAppThemeRef,"onUpdate:value":s=>this.modelAppThemeRef=s,railStyle:o.bind(this),onUpdateValue:s=>s?i():n()},{"checked-icon":()=>e(r,{name:"dark"},null),"unchecked-icon":()=>e(r,{name:"light"},null),checked:()=>"亮",unchecked:()=>"暗"}),default:()=>this.getAppTheme?t("headerSettingOptions.ThemeOptions.Dark"):t("headerSettingOptions.ThemeOptions.Light")})]})}});var se={pkg:{dependencies:{"@logicflow/core":"2.0.6","@logicflow/extension":"2.0.10","@vueuse/core":"^11.1.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10",echarts:"^5.5.0","html-to-image":"1.11.11",interactjs:"1.10.26",jsbarcode:"3.11.6","lodash-es":"^4.17.21",mockjs:"1.1.0","naive-ui":"^2.40.1",pinia:"^2.2.4","pinia-plugin-persistedstate":"^4.1.1","print-js":"^1.6.0",vue:"^3.5.12","vue-demi":"0.14.6","vue-hooks-plus":"2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.3.2","vue3-next-qrcode":"2.0.10"},devDependencies:{"@commitlint/cli":"^17.8.1","@commitlint/config-conventional":"^17.8.1","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.2.2","@types/jsbarcode":"3.11.4","@types/lodash-es":"^4.17.12","@types/mockjs":"1.0.7","@typescript-eslint/eslint-plugin":"^8.13.0","@typescript-eslint/parser":"^8.13.0","@vitejs/plugin-vue":"^5.1.0","@vitejs/plugin-vue-jsx":"^4.0.1","@vitest/ui":"1.4.0","@vue/eslint-config-prettier":"^9.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/test-utils":"2.4.3",autoprefixer:"^10.4.16",depcheck:"^1.4.7",eslint:"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-config-standard-with-typescript":"^43.0.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-promise":"^6.1.1","eslint-plugin-vue":"^9.25.0","happy-dom":"14.3.1",husky:"8.0.3","lint-staged":"^15.2.0",postcss:"^8.4.38","postcss-px-to-viewport-8-with-include":"1.2.2",prettier:"^3.2.5","rollup-plugin-gzip":"4.0.1",sass:"1.71.1","svg-sprite-loader":"^6.0.11",typescript:"^5.6.3","unplugin-auto-import":"^0.18.2","unplugin-vue-components":"^0.27.4",vite:"^5.4.3","vite-bundle-analyzer":"0.9.4","vite-plugin-cdn2":"1.1.0","vite-plugin-ejs":"^1.7.0","vite-plugin-eslint":"1.8.1","vite-plugin-inspect":"^0.8.3","vite-plugin-mock-dev-server":"1.4.7","vite-plugin-svg-icons":"^2.0.1","vite-svg-loader":"^4.0.0","vite-tsconfig-paths":"4.3.2",vitest:"1.5.2","vue-tsc":"^2.1.10"},name:"ray-template",version:"5.0.5"},layout:{copyright:"Copyright © 2022-present Ray"},appPrimaryColor:{primaryColor:"#2d8cf0",primaryFadeColor:"rgba(45, 140, 240, 0.3)"}};function le(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!m(t)}const dt=a({name:"RLogin",setup(){const{layout:{copyright:t}}=se,i=_({tabsValue:"signing"}),{height:n,width:o}=Y(),{updateLocale:s}=A();return{...R(i),windowHeight:n,updateLocale:s,copyright:t,windowWidth:o}},render(){let t;const{$t:i}=this;return e("div",{class:["login"],style:[`height: ${this.windowHeight}px`,`--login-height: ${this.windowHeight}px`]},[e("div",{class:["login-wrapper",this.windowWidth>=1440?"login-wrapper--divider":""]},[e("div",{class:["login-wrapper__content"]},[e(l,{align:"center",class:"login-title__wrapper"},{default:()=>[e(r,{name:"ray",size:"48"},null),e(b,{class:"login-title",type:"info",size:28},{default:()=>[d("Ray Template")]})]}),e(l,{align:"center",class:"login-action__wrapper"},{default:()=>[e(oe,null,null),e(H,{options:$,onSelect:n=>this.updateLocale(n),trigger:"click"},{default:()=>[e(r,{customClassName:"login-icon",name:"language",size:"18",cursor:"pointer"},null)]})]}),e(Q,{cols:"s:1 m:1 l:2 xl:2 2xl:2",itemResponsive:!1,responsive:"screen"},{default:()=>[e(k,{span:"s:0 m:0 l:1 xl:1 2xl:1",class:"login__left-wrapper"},{default:()=>[e(l,{align:"center",vertical:!0},{default:()=>[e(r,{name:"login_bg",width:"368",height:"368"},null),e(b,{class:"login-title",type:"info",size:36},le(t=i("views.login.index.RayTemplate"))?t:{default:()=>[t]})]})]}),e(k,{span:1,class:"login__right-wrapper"},{default:()=>[e(U,{class:"login__right-wrapper__content",embedded:!0,bordered:!1},{default:()=>[e(W,{value:this.tabsValue,"onUpdate:value":n=>this.tabsValue=n,type:"line",animated:!0,size:"large"},{default:()=>e(B,null,[e(c,{tab:i("views.login.index.Signing"),name:"signing"},{default:()=>[e(Z,null,null)]}),e(c,{tab:i("views.login.index.Register"),name:"register"},{default:()=>[e(ee,null,null)]}),e(c,{tab:i("views.login.index.QRCodeSigning"),name:"qrcodeSigning"},{default:()=>[e(te,null,null)]})])}),e(x,null,{default:()=>[d("其他登陆方式")]}),e(ne,null,null),e(x,null,{default:()=>[d("友情链接")]}),e(J,null,null)]})]})]}),e(l,{align:"center",justify:"center",class:"login-copyright__wrapper"},{default:()=>[this.copyright]})])])])}});export{dt as default};