import{u as e,r as a,b as l,c as t,d as s,e as o,j as n,k as i,h as m,Y as c,Q as d,l as u,ae as g,ag as f}from"./index.1702580971041.js";const h={class:"theme-control space-y-2"},r={class:"labelItem"},p=["src"],b={class:"labelItem"},k={class:"labelItem h-11"},C=o("span",{class:"flex-shrink-0"},"背景模糊",-1),V={class:"labelItem h-11"},v=o("span",{class:"flex-shrink-0"},"开启底部快捷方式",-1),I={class:"labelItem h-11"},x=o("span",{class:"flex-shrink-0"},"时钟字体颜色",-1),w={class:"ml-auto"},y={class:"labelItem h-11"},_=o("span",{class:"flex-shrink-0"},"图标大小",-1),U={class:"labelItem h-11"},W=o("span",{class:"flex-shrink-0"},"图标背景",-1),z={__name:"theme",setup(z){const j=e(),B=()=>{window.open(j.state.config.theme.backgroundImage)},Q=a(""),Y=e=>{1===e.code&&(j.state.config.theme.backgroundImage=e.data.url,j.commit("updateConfig"))},q=e=>{g("--iconWidth",j.state.config.theme.iconWidth+"px"),j.commit("updateConfig")},A=e=>{j.commit("updateConfig")},D=()=>{j.state.config.theme.backgroundImage=f.theme.backgroundImage,j.commit("updateConfig")};return(e,a)=>{var g,f;const z=l("el-button"),E=l("el-upload"),F=l("el-slider"),G=l("el-switch"),H=l("el-color-picker");return t(),s("div",h,[o("div",r,[o("img",{class:"rounded-lg w-full",style:{"aspect-ratio":"10 / 5.625"},ref_key:"image",ref:Q,src:null==(f=null==(g=n(j).state.config)?void 0:g.theme)?void 0:f.backgroundImage,alt:"壁纸"},null,8,p)]),o("div",b,[i(E,{class:"upload-demo","show-file-list":!1,"on-success":Y,action:n(d)+n(j).state.site.upload},{default:m((()=>[i(z,{size:"small",class:"bg-blue-400 mr-2.5",type:"primary"},{default:m((()=>[c("上传")])),_:1})])),_:1},8,["action"]),i(z,{size:"small",type:"danger",class:"bg-pink-400",onClick:u(B,["stop"])},{default:m((()=>[c(" 下载 ")])),_:1},8,["onClick"]),i(z,{size:"small",type:"info",class:"bg-slate-600",onClick:u(D,["stop"])},{default:m((()=>[c(" 默认 ")])),_:1},8,["onClick"])]),o("div",k,[C,i(F,{class:"w-full ml-3",onChange:a[0]||(a[0]=e=>n(j).commit("updateConfig")),max:20,modelValue:n(j).state.config.theme.blur,"onUpdate:modelValue":a[1]||(a[1]=e=>n(j).state.config.theme.blur=e)},null,8,["modelValue"])]),o("div",V,[v,i(G,{onChange:a[2]||(a[2]=e=>n(j).commit("updateConfig")),modelValue:n(j).state.config.theme.tabbar,"onUpdate:modelValue":a[3]||(a[3]=e=>n(j).state.config.theme.tabbar=e),class:"ml-auto"},null,8,["modelValue"])]),o("div",I,[x,o("div",w,[i(H,{modelValue:n(j).state.config.theme.timeColor,"onUpdate:modelValue":a[4]||(a[4]=e=>n(j).state.config.theme.timeColor=e),onChange:A},null,8,["modelValue"])])]),o("div",y,[_,i(F,{class:"w-full ml-3",onChange:q,max:80,min:60,modelValue:n(j).state.config.theme.iconWidth,"onUpdate:modelValue":a[5]||(a[5]=e=>n(j).state.config.theme.iconWidth=e)},null,8,["modelValue"])]),o("div",U,[W,i(G,{onChange:a[6]||(a[6]=e=>n(j).commit("updateConfig")),modelValue:n(j).state.config.theme.iconBg,"onUpdate:modelValue":a[7]||(a[7]=e=>n(j).state.config.theme.iconBg=e),class:"ml-auto"},null,8,["modelValue"])])])}}};export{z as default};
