mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-06-18 15:49:16 +08:00
2 lines
8.7 KiB
JavaScript
2 lines
8.7 KiB
JavaScript
import{R as O,j as L,x as C,p as A,y as F,f,z as r,e as P,u as j,B as $,k as z}from"./hooks-ClCg6qvp.js";import{s as w}from"./utils-BjslFNLa.js";import"./currency.js@2.0.4-9OAR_aOO.js";import"./crypto-js@4.2.0-Dv3RD6s_.js";import"./dayjs@1.11.13-BPpqO9Hf.js";import"./print-js@1.6.0-CNuQ_Icd.js";import{u as G}from"./vue-router@4.4.0_vue@3.5.13_typescript@5.6.3_-v7NbgajR.js";import"./vue-hooks-plus@2.2.3_vue@3.5.13_typescript@5.6.3_-BF2NczCu.js";import"./lodash@4.17.21-MV68C9EV.js";import"./js-cookie@3.0.5-Z_8Sd105.js";import"./screenfull@5.2.0-D-G20XJY.js";import"./jsbarcode@3.11.6-Dw2l8iJP.js";import"./@logicflow_core@2.0.10-DN_57zVH.js";import"./mobx-preact@3.0.0_mobx@5.15.7_preact@10.25.4-SwmSNyX5.js";import"./preact@10.25.4-CrjB-ZC0.js";import{I as S,M as y,P as V,W as I,p as q,e as l,y as D,J as E,A as b,k as Q,a as U,b as v,N as H,s as W,T as u,F as _}from"./naive-ui@2.41.0_vue@3.5.13_typescript@5.6.3_-bZwGa67N.js";import{m as s,d as e,q as c,J as d,F as B}from"./@vue_runtime-core@3.5.13-Moo8VrGQ.js";import{k as m,h as k,x as R}from"./@vue_reactivity@3.5.13-Bs-wdPxR.js";import{Q as J}from"./vue3-next-qrcode@2.0.10_typescript@5.6.3-BQRO6XvJ.js";import{L as K}from"./ray-dCjhX_JK.js";import{f as M}from"./@vueuse_core@12.4.0_typescript@5.6.3-CNo6ayCV.js";import{A as X}from"./index-CsPPGzAk.js";import"./lodash-es@4.17.21-UVJw7vmf.js";import"./pinia-plugin-persistedstate@4.2.0_pinia@2.3.0_typescript@5.6.3_vue@3.5.13_typescript@5.6.3___rollup@4.40.0-_Zka_ujQ.js";import"./destr@2.0.3-CVtkxrq9.js";import"./deep-pick-omit@1.2.1-CegYQlcN.js";import"./pinia@2.3.0_typescript@5.6.3_vue@3.5.13_typescript@5.6.3_-BvAxE_q5.js";import"./html-to-image@1.11.11-3dFXpKWR.js";import"./@vue_runtime-dom@3.5.13-DAnkqHDQ.js";import"./@vue_shared@3.5.13-CBbo5MAb.js";import"./interactjs@1.10.27-BhZFX4Iq.js";import"./call-bind-apply-helpers@1.0.1-D6-XlEtG.js";import"./vue-i18n@9.13.1_vue@3.5.13_typescript@5.6.3_-kfcArAjL.js";import"./@intlify_shared@9.13.1-CM6R_CZ5.js";import"./@intlify_core-base@9.13.1-BNWv53cz.js";import"./@intlify_message-compiler@9.13.1-4K4Nd_mc.js";import"./echarts@5.6.0-BRu9FGIM.js";import"./zrender@5.6.1-MHdZqf99.js";import"./tslib@2.3.0-BDyQ-Jie.js";import"./@vueuse_shared@12.4.0_typescript@5.6.3-AIvkuZ7s.js";import"./date-fns@3.6.0-DkXg27G5.js";import"./seemly@0.3.9-BPHzmlAk.js";import"./mobx@5.15.7-DLDjekon.js";import"./uuid@9.0.1-CtRu48qb.js";import"./classnames@2.5.1-8E8W9FZl.js";import"./mousetrap@1.6.5-CGKHClW8.js";import"./mobx-utils@5.6.2_mobx@5.15.7-CmgHUCcI.js";import"./vueuc@0.4.64_vue@3.5.13_typescript@5.6.3_-BhYeX318.js";import"./evtd@0.2.4-CI_DDEu_.js";import"./@css-render_vue3-ssr@0.15.14_vue@3.5.13_typescript@5.6.3_-BATNlskH.js";import"./vooks@0.2.12_vue@3.5.13_typescript@5.6.3_-CUP4Zvk0.js";import"./vdirs@0.1.8_vue@3.5.13_typescript@5.6.3_-BAjskub0.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.2.0_date-fns@3.6.0-CVEnaXEw.js";import"./async-validator@4.2.5-9PlIezaS.js";import"./@css-render_plugin-bem@0.15.14_css-render@0.15.14-Be8eOoM-.js";function Y(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const Z=s({name:"RSigning",setup(){const[t,{validate:i}]=L(),{t:n}=C(),{signing:a}=A(),{getRootPath:o}=F(),p=m(!1),x=()=>({name:"Ray Admin",pwd:"123456"}),T=G(),g=m(x()),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:g,register:t,handleLogin:()=>{i().then(()=>{p.value=!0,a(g.value).then(h=>{h.code===0&&setTimeout(()=>{window.$message.success(`欢迎${g.value.name}登陆~`),w(f.token,"tokenValue","localStorage"),w(f.signing,h.data,"localStorage"),T.push(o.value),p.value=!1},2*1e3)}).catch(()=>{window.$message.error("不可以这样哟, 不可以哟")})})},rules:N,loading:p}},render(){let t;const{$t:i,loading:n,register:a}=this;return e(O,{model:this.signingForm,onRegister:a,rules:this.rules},{default:()=>[e(S,{label:i("views.login.index.Name"),path:"name"},{default:()=>[e(y,{value:this.signingForm.name,"onUpdate:value":o=>this.signingForm.name=o,placeholder:i("views.login.index.NamePlaceholder")},null)]}),e(S,{label:i("views.login.index.Password"),path:"pwd"},{default:()=>[e(y,{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},Y(t=i("views.login.index.Login"))?t:{default:()=>[t]})]})}}),ee=s({name:"RRegister",render(){return e(I,{status:"info",title:"提示",description:"我实在是不想写了..."},null)}}),te=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:K},null)])}});function ie(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!c(t)}const ne=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"},ie(t=this.ssoSigningOptions.map(i=>e(q,{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=s({name:"ThemeSwitch",setup(){const{darkTheme:t,lightTheme:i}=j(),{getAppTheme:n}=P(),a=m(n.value);return{darkTheme:t,lightTheme:i,getAppTheme:n,railStyle:({checked:p})=>p?{backgroundColor:"#000000"}:{color:"#000000"},modelAppThemeRef:a}},render(){const{$t:t,darkTheme:i,lightTheme:n,railStyle:a}=this;return e(l,{justify:"center"},{default:()=>[e(D,null,{trigger:()=>e(E,{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")})]})}});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 mt=s({name:"RLogin",setup(){const{layout:{copyright:t}}=ae,i=k({tabsValue:"signing"}),{height:n,width:a}=M(),{updateLocale:o}=z();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(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(Q,{options:$,onSelect:n=>this.updateLocale(n),trigger:"click"},{default:()=>[e(r,{customClassName:"login-icon",name:"language",size:"18",cursor:"pointer"},null)]})]}),e(U,{cols:"s:1 m:1 l:2 xl:2 2xl:2",itemResponsive:!1,responsive:"screen"},{default:()=>[e(v,{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(v,{span:1,class:"login__right-wrapper"},{default:()=>[e(H,{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(u,{tab:i("views.login.index.Signing"),name:"signing"},{default:()=>[e(Z,null,null)]}),e(u,{tab:i("views.login.index.Register"),name:"register"},{default:()=>[e(ee,null,null)]}),e(u,{tab:i("views.login.index.QRCodeSigning"),name:"qrcodeSigning"},{default:()=>[e(te,null,null)]})])}),e(_,null,{default:()=>[d("其他登陆方式")]}),e(ne,null,null),e(_,null,{default:()=>[d("友情链接")]}),e(X,null,null)]})]})]}),e(l,{align:"center",justify:"center",class:"login-copyright__wrapper"},{default:()=>[this.copyright]})])])])}});export{mt as default};
|