mirror of
https://gitee.com/mirrors/AllinSSL.git
synced 2026-03-08 15:51:11 +08:00
2 lines
1.4 KiB
JavaScript
2 lines
1.4 KiB
JavaScript
import{e,s as a,r as t,k as o,$ as s}from"./main-DorqzikP.js";import{a as l,b as n}from"./index-BE-9yLfX.js";import{u as r}from"./index-DvYuWcNS.js";import{b as i}from"./setting-3CYC2mSf.js";import{j as u}from"./access-DUH5sOPN.js";const m=e("layout-store",()=>{const{handleError:e}=r(),a=l("layout-collapsed",!1),m=t([]),c=t([]),v=n("menu-active","home"),d=o(()=>"home"!==v.value?"var(--n-content-padding)":"0"),p=l("locales-active","zhCN"),h=t({mail:{name:s("t_68_1745289354676")},dingtalk:{name:s("t_32_1746773348993")},wecom:{name:s("t_33_1746773350932")},feishu:{name:s("t_34_1746773350153")},webhook:{name:"WebHook"}});return{isCollapsed:a,notifyProvider:m,dnsProvider:c,menuActive:v,layoutPadding:d,locales:p,pushSourceType:h,toggleCollapse:()=>{a.value=!a.value},handleCollapse:()=>{a.value=!0},handleExpand:()=>{a.value=!1},updateMenuActive:e=>{"logout"!==e&&(v.value=e)},resetDataInfo:()=>{v.value="home",sessionStorage.removeItem("menu-active")},fetchNotifyProvider:async()=>{try{m.value=[];const{data:e}=await i({p:1,search:"",limit:1e3}).fetch();m.value=(null==e?void 0:e.map(e=>({label:e.name,value:e.id.toString(),type:e.type})))||[]}catch(a){e(a)}},fetchDnsProvider:async(a="")=>{try{c.value=[];const{data:e}=await u({type:a}).fetch();c.value=(null==e?void 0:e.map(e=>({label:e.name,value:e.id.toString(),type:e.type,data:e})))||[]}catch(t){c.value=[],e(t)}},resetDnsProvider:()=>{c.value=[]}}}),c=()=>{const e=m();return{...e,...a(e)}};export{c as u};
|