ray-template/js/index-By2MYI7e.js

2 lines
8.7 KiB
JavaScript

import{A as O}from"./index-BQlPRast.js";import{y as r,m as C,u as L,R as F,f as P,z as A,p as $,B as j,k as f,C as z,h as G}from"./hooks-MEhk8snd.js";import{f as V}from"./@vueuse_core@13.1.0_vue@3.5.25_typescript@5.9.3_-D95kAPXK.js";import"./currency.js@2.0.4-BSkspdt3.js";import"./crypto-js@4.2.0-Bv3pmx0c.js";import"./dayjs@1.11.13-DqFijdaO.js";import"./print-js@1.6.0-jNcZ-gME.js";import"./vue-hooks-plus@2.4.1_vue@3.5.25_typescript@5.9.3_-CTUohtp4.js";import"./js-cookie@3.0.5-W_rRtFe1.js";import"./screenfull@5.2.0-wmrknyQD.js";import"./jsbarcode@3.11.6-DMXogPYv.js";import"./@logicflow_core@2.0.10-BJ3yfRtr.js";import"./mobx-preact@3.0.0_mobx@5.15.7_preact@10.25.4-CY9_LSXq.js";import"./preact@10.25.4-HyjdtmFg.js";import{m as s,d as e,t as c,J as u,F as D}from"./@vue_runtime-core@3.5.25-CyFcdXRD.js";import{e as l,E as I,T as q,K as E,C as w,D as S,B as Q,o as U,F as y,k as B,a as H,b,N as K,s as W,Y as d,P as v}from"./naive-ui@2.43.2_vue@3.5.25_typescript@5.9.3_-CuzQtRgy.js";import{k as m,h as k,y as R}from"./@vue_reactivity@3.5.25-CWykDyL9.js";import{L as Y}from"./ray-dCjhX_JK.js";import{Q as J}from"./vue3-next-qrcode@3.0.2_vue@3.5.25_typescript@5.9.3_-BLwb1SCN.js";import{s as _}from"./utils-DJW6-rvp.js";import{u as X}from"./vue-router@4.6.3_vue@3.5.25_typescript@5.9.3_-kLD3n5ZM.js";import"./lodash-es@4.17.21-CFdI1ypR.js";import"./pinia-plugin-persistedstate@4.4.1_pinia@3.0.3_typescript@5.9.3_vue@3.5.25_typescript@5.9.3__-BC_H5euo.js";import"./destr@2.0.5-Ctyiwlcu.js";import"./deep-pick-omit@1.2.1-CegYQlcN.js";import"./pinia@3.0.3_typescript@5.9.3_vue@3.5.25_typescript@5.9.3_-Bshsd_Oe.js";import"./html-to-image@1.11.13-DOj4Zvaj.js";import"./@vue_runtime-dom@3.5.25-qbdLeVMc.js";import"./@vue_shared@3.5.25-ClSOc5xY.js";import"./vue-i18n@11.1.3_vue@3.5.25_typescript@5.9.3_-DnWoR0oZ.js";import"./@intlify_core-base@11.1.3-Cez6J5Vx.js";import"./@intlify_shared@11.1.3-Byx4ULsF.js";import"./@intlify_message-compiler@11.1.3-DphV8pYf.js";import"./echarts@6.0.0-DFotDgc6.js";import"./tslib@2.3.0-Cg4x8ZAA.js";import"./zrender@6.0.0-Co73lGCa.js";import"./@vueuse_shared@13.1.0_vue@3.5.25_typescript@5.9.3_-eMpvzBVj.js";import"./interactjs@1.10.27-C3ZPOoID.js";import"./classnames@2.5.1-CU_BXU7G.js";import"./mobx@5.15.7-iy9XXgsZ.js";import"./uuid@9.0.1-CtRu48qb.js";import"./mousetrap@1.6.5-B3zpTV0k.js";import"./mobx-utils@5.6.2_mobx@5.15.7-BeM5AP8N.js";import"./date-fns@4.1.0-D7sOP3Nv.js";import"./seemly@0.3.10-8_5gPa5q.js";import"./vueuc@0.4.65_vue@3.5.25_typescript@5.9.3_-BiVDcjr0.js";import"./evtd@0.2.4-w6UMCrcr.js";import"./@css-render_vue3-ssr@0.15.14_vue@3.5.25_typescript@5.9.3_-DbFiQpGI.js";import"./vooks@0.2.12_vue@3.5.25_typescript@5.9.3_-CkUeikoP.js";import"./vdirs@0.1.8_vue@3.5.25_typescript@5.9.3_-D2i3_uv1.js";import"./@juggle_resize-observer@3.4.0-DB6f1vmu.js";import"./css-render@0.15.14-DTtBB2Mk.js";import"./@emotion_hash@0.8.0-WldOFDRm.js";import"./treemate@0.3.11-fnkdj-jo.js";import"./date-fns-tz@3.2.0_date-fns@4.1.0-D_9zH1c_.js";import"./async-validator@4.2.5-B7g11KvB.js";import"./@css-render_plugin-bem@0.15.14_css-render@0.15.14-DQkPmH6r.js";const M=s({name:"ThemeSwitch",setup(){const{darkTheme:t,lightTheme:i}=L(),{getAppTheme:n}=C(),a=m(n.value);return{darkTheme:t,lightTheme:i,getAppTheme:n,railStyle:({checked:g})=>g?{backgroundColor:"#000000"}:{color:"#000000"},modelAppThemeRef:a}},render(){const{$t:t,darkTheme:i,lightTheme:n,railStyle:a}=this;return e(l,{justify:"center"},{default:()=>[e(I,null,{trigger:()=>e(q,{value:this.modelAppThemeRef,"onUpdate:value":o=>this.modelAppThemeRef=o,railStyle:a.bind(this),onUpdateValue:o=>o?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")})]})}}),Z=s({name:"QRCodeSigning",setup(){const t=k({qrcodeValue:"https://github.com/XiaoDaiGua-Ray/xiaodaigua-ray.github.io"});return{...R(t)}},render(){return e("div",{class:"qrcode-signing"},[e(J,{text:"ray template yes",size:200,logoImage:Y},null)])}}),ee=s({name:"RRegister",render(){return e(E,{status:"info",title:"提示",description:"我实在是不想写了..."},null)}});function te(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const ie=s({name:"RSigning",setup(){const[t,{validate:i}]=P(),{t:n}=A(),{signing:a}=$(),{getRootPath:o}=j(),g=m(!1),T=()=>({name:"Ray Admin",pwd:"123456"}),x=X(),p=m(T()),N={name:{required:!0,message:n("views.login.index.NamePlaceholder"),trigger:["blur","input"]},pwd:{required:!0,message:n("views.login.index.PasswordPlaceholder"),trigger:["blur","input"]}};return{signingForm:p,register:t,handleLogin:()=>{i().then(()=>{g.value=!0,a(p.value).then(h=>{h.code===0&&setTimeout(()=>{window.$message.success(`欢迎${p.value.name}登陆~`),_(f.token,"tokenValue","localStorage"),_(f.signing,h.data,"localStorage"),x.push(o.value),g.value=!1},2*1e3)}).catch(()=>{window.$message.error("不可以这样哟, 不可以哟")})})},rules:N,loading:g}},render(){let t;const{$t:i,loading:n,register:a}=this;return e(F,{model:this.signingForm,onRegister:a,rules:this.rules},{default:()=>[e(w,{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(w,{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(Q,{style:["width: 100%","margin-to: 18px"],type:"primary",onClick:this.handleLogin.bind(this),loading:n},te(t=i("views.login.index.Login"))?t:{default:()=>[t]})]})}});function ne(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const oe=s({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"},ne(t=this.ssoSigningOptions.map(i=>e(U,{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]})}});var ae={layout:{copyright:"Copyright © 2022-present Ray"}};function le(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const ut=s({name:"RLogin",setup(){const{layout:{copyright:t}}=ae,i=k({tabsValue:"signing"}),{height:n,width:a}=V(),{updateLocale:o}=G();return{...R(i),windowHeight:n,updateLocale:o,copyright:t,windowWidth:a}},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(y,{class:"login-title",type:"info",size:28},{default:()=>[u("Ray Template")]})]}),e(l,{align:"center",class:"login-action__wrapper"},{default:()=>[e(M,null,null),e(B,{options:z,onSelect:n=>this.updateLocale(n),trigger:"click"},{default:()=>[e(r,{customClassName:"login-icon",name:"language",size:"18",cursor:"pointer"},null)]})]}),e(H,{cols:"s:1 m:1 l:2 xl:2 2xl:2",itemResponsive:!1,responsive:"screen"},{default:()=>[e(b,{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(y,{class:"login-title",type:"info",size:36},le(t=i("views.login.index.RayTemplate"))?t:{default:()=>[t]})]})]}),e(b,{span:1,class:"login__right-wrapper"},{default:()=>[e(K,{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(D,null,[e(d,{tab:i("views.login.index.Signing"),name:"signing"},{default:()=>[e(ie,null,null)]}),e(d,{tab:i("views.login.index.Register"),name:"register"},{default:()=>[e(ee,null,null)]}),e(d,{tab:i("views.login.index.QRCodeSigning"),name:"qrcodeSigning"},{default:()=>[e(Z,null,null)]})])}),e(v,null,{default:()=>[u("其他登陆方式")]}),e(oe,null,null),e(v,null,{default:()=>[u("友情链接")]}),e(O,null,null)]})]})]}),e(l,{align:"center",justify:"center",class:"login-copyright__wrapper"},{default:()=>[this.copyright]})])])])}});export{ut as default};