Files
chat/backend/public/assets/settings-R2Yjxl-Z.js
T
2026-08-03 10:00:05 +08:00

7 lines
2.0 KiB
JavaScript

import{p as f,_ as k,l as b,c as h,b as u,d as s,y as g,P as y,m as T,r as t,n as c}from"./index-sdqi2xzF.js";/**
* @license @tabler/icons-vue v3.45.0 - MIT
*
* This source code is licensed under the MIT license.
* See the LICENSE file in the root directory of this source tree.
*/var A=f("outline","sparkles","Sparkles",[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6",key:"svg-0"}]]);const w={class:"theme-toggle",role:"group","aria-label":"界面主题"},C=["aria-pressed"],I=["aria-pressed"],S={__name:"ThemeToggle",setup(d){const{theme:a,setTheme:o}=y();return(n,e)=>(b(),h("div",w,[u("button",{type:"button",class:g({active:s(a)==="light"}),"aria-pressed":s(a)==="light","aria-label":"使用浅色主题",title:"浅色主题",onClick:e[0]||(e[0]=r=>s(o)("light"))},[...e[2]||(e[2]=[u("span",null,"浅色",-1)])],10,C),u("button",{type:"button",class:g({active:s(a)==="dark"}),"aria-pressed":s(a)==="dark","aria-label":"使用深色主题",title:"深色主题",onClick:e[1]||(e[1]=r=>s(o)("dark"))},[...e[3]||(e[3]=[u("span",null,"深色",-1)])],10,I)]))}},B=k(S,[["__scopeId","data-v-6644b9d7"]]),P=T("settings",()=>{const d=t({markdown:!0,image:!0,video:!0,voice:!0,document:!0,emoji:!0,upload_image:!0,upload_video:!0,upload_file:!0,paste_image:!0}),a=t("AI Chat"),o=t(!0),n=t({name:"AI 客服",greeting:"您好,请问有什么可以帮您?"}),e=t([]),r=t([]),p=t(!1);async function m(){const i=(await c.get("/settings/public")).data.data;d.value=i.features,a.value=i.site_name,o.value=i.allow_register,n.value=i.voice_persona||n.value,p.value=!0}async function v(){const l=await c.get("/models");e.value=l.data.data}async function _(){const l=await c.get("/agents");r.value=l.data.data||[]}return{features:d,siteName:a,allowRegister:o,voicePersona:n,models:e,agents:r,loaded:p,loadPublic:m,loadModels:v,loadAgents:_}});export{A as I,B as T,P as u};