Files
vue-pure-admin/static/js/index-CCN3Phxc.js

2 lines
4.6 KiB
JavaScript

var b=(f,n,t)=>new Promise((g,u)=>{var _=e=>{try{a(t.next(e))}catch(d){u(d)}},p=e=>{try{a(t.throw(e))}catch(d){u(d)}},a=e=>e.done?g(e.value):Promise.resolve(e.value).then(_,p);a((t=t.apply(f,n)).next())});import{a1 as w,k as x,f as m,h as o,d as T,ah as L,a as k,X as v,et as N,Y as R,m as D,eV as O,b as r,e as h,w as i,i as z,g as l,u as c,j as C,t as y,F as S,l as F,V as j,v as E,_ as K}from"./index-DRjphMgD.js";import{R as H}from"./index-BmF5B0kP.js";import{_ as X}from"./Profile.vue_vue_type_script_setup_true_lang-B2bxWzOz.js";import Y from"./Preferences-yYCHMJqb.js";import{_ as q}from"./SecurityLog.vue_vue_type_script_setup_true_lang-D5d1MR9O.js";import G from"./AccountManagement-B-1bOe7U.js";import{u as J}from"./useDataThemeChange-xy1BNM10.js";import{l as Q,P as U,_ as W}from"./SidebarTopCollapse.vue_vue_type_script_setup_true_lang-C1GuIarH.js";import"./mock-p937vLw_.js";import"./index-DQ41vvJu.js";import"./index-Da4SdtRd.js";import"./upload-line-DJtY7s-S.js";import"./app-Bsx1oNqM.js";import"./epTheme-tJ_Ki4Lo.js";const Z={viewBox:"0 0 24 24",width:"1em",height:"1em"};function ee(f,n){return m(),x("svg",Z,[...n[0]||(n[0]=[o("path",{fill:"currentColor",d:"M20 22h-2v-2a3 3 0 0 0-3-3H9a3 3 0 0 0-3 3v2H4v-2a5 5 0 0 1 5-5h6a5 5 0 0 1 5 5zm-8-9a6 6 0 1 1 0-12a6 6 0 0 1 0 12m0-2a4 4 0 1 0 0-8a4 4 0 0 0 0 8"},null,-1)])])}const ne=w({name:"ri-user-3-line",render:ee}),te={viewBox:"0 0 24 24",width:"1em",height:"1em"};function oe(f,n){return m(),x("svg",te,[...n[0]||(n[0]=[o("path",{fill:"currentColor",d:"M21 3a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm-1 8H4v8h16zm0-6H4v4h16zm-9 1v2H9V6zM7 6v2H5V6z"},null,-1)])])}const ae=w({name:"ri-window-line",render:oe}),se={viewBox:"0 0 24 24",width:"1em",height:"1em"};function le(f,n){return m(),x("svg",se,[...n[0]||(n[0]=[o("path",{fill:"currentColor",d:"M21.008 3c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3zM20 5H4v14h16zm-2 10v2H6v-2zm-6-8v6H6V7zm6 4v2h-4v-2zm-8-2H8v2h2zm8-2v2h-4V7z"},null,-1)])])}const re=w({name:"ri-profile-line",render:le}),ie={class:"h-full flex items-center px-[var(--el-menu-base-level-padding)]"},ce={class:"flex items-center ml-8 mt-4 mb-4"},me={class:"ml-4 flex flex-col max-w-[130px]"},ue={class:"flex items-center z-10"},de=T({name:"AccountSettings",__name:"index",setup(f){const n=L(),t=k(!v()),{$storage:g}=N();R(()=>{var a;J().dataThemeChange((a=g.layout)==null?void 0:a.themeMode)});const u=k({avatar:"",username:"",nickname:""}),_=[{key:"profile",label:"个人信息",icon:ne,component:X},{key:"preferences",label:"偏好设置",icon:U,component:Y},{key:"securityLog",label:"安全日志",icon:ae,component:q},{key:"accountManagement",label:"账户管理",icon:re,component:G}],p=k("profile");return D(()=>b(null,null,function*(){const{code:a,data:e}=yield O();a===0&&(u.value=e)})),(a,e)=>{const d=r("IconifyIconOffline"),M=r("el-avatar"),V=r("el-icon"),$=r("el-menu-item"),I=r("el-menu"),B=r("el-aside"),A=r("el-main"),P=r("el-container");return m(),h(P,{class:"h-full"},{default:i(()=>[t.value?(m(),h(B,{key:0,class:"pure-account-settings overflow-hidden px-2 dark:bg-(--el-bg-color)! border-r-[1px] border-[var(--pure-border-color)]",width:c(v)()?"180px":"240px"},{default:i(()=>[l(I,{"default-active":p.value,class:"pure-account-settings-menu"},{default:i(()=>[o("div",{class:"h-[50px]! text-[var(--pure-theme-menu-text)] cursor-pointer text-sm transition-all duration-300 ease-in-out hover:scale-105 will-change-transform transform-gpu origin-center hover:text-base! hover:text-[var(--pure-theme-menu-title-hover)]!",onClick:e[0]||(e[0]=s=>c(n).go(-1))},[o("div",ie,[l(d,{icon:c(Q)},null,8,["icon"]),e[2]||(e[2]=o("span",{class:"ml-2"},"返回",-1))])]),o("div",ce,[l(M,{size:48,src:u.value.avatar},null,8,["src"]),o("div",me,[l(c(H),{class:"font-bold self-baseline!"},{default:i(()=>[C(y(u.value.nickname),1)]),_:1}),l(c(H),{class:"self-baseline!",type:"info"},{default:i(()=>[C(y(u.value.username),1)]),_:1})])]),(m(),x(S,null,F(_,s=>l($,{key:s.key,index:s.key,onClick:()=>{p.value=s.key,c(v)()&&(t.value=!t.value)}},{default:i(()=>[o("div",ue,[l(V,null,{default:i(()=>[l(d,{icon:s.icon},null,8,["icon"])]),_:2},1024),o("span",null,y(s.label),1)])]),_:2},1032,["index","onClick"])),64))]),_:1},8,["default-active"])]),_:1},8,["width"])):z("",!0),l(A,null,{default:i(()=>[c(v)()?(m(),h(W,{key:0,class:"px-0","is-active":t.value,onToggleClick:e[1]||(e[1]=s=>t.value=!t.value)},null,8,["is-active"])):z("",!0),(m(),h(j(_.find(s=>s.key===p.value).component),{class:E([!c(v)()&&"ml-[120px]"])},null,8,["class"]))]),_:1})]),_:1})}}}),Ve=K(de,[["__scopeId","data-v-557a1747"]]);export{Ve as default};