llonebot-dist 7.8.1 → 7.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"llonebot-dist","version":"7.8.1","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}
1
+ {"name":"llonebot-dist","version":"7.8.3","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}
@@ -450,4 +450,4 @@ Error generating stack: `+i.message+`
450
450
  `,children:s.jsx(gg,{activeTab:f,onTabChange:j,friendCategories:a,groups:c,recentChats:P,unreadCounts:Ce,selectedPeerId:m==null?void 0:m.peerId,onSelectFriend:Z,onSelectGroup:oe,onSelectRecent:ye})}),s.jsx("div",{className:`
451
451
  flex-1 flex flex-col min-w-0
452
452
  ${D?"block":"hidden md:flex"}
453
- `,children:s.jsx(py,{session:m,onShowMembers:()=>x(!k),onNewMessageCallback:b,onEmojiReactionCallback:E,onMessageRecalledCallback:_,appendInputText:T,onAppendInputTextConsumed:V,onBack:K,showBackButton:D})}),k&&(m==null?void 0:m.chatType)===2&&s.jsx("div",{className:"fixed inset-0 z-50 bg-white/85 dark:bg-neutral-900/85 backdrop-blur-xl md:static md:inset-auto md:z-auto md:bg-transparent md:backdrop-blur-none md:w-64 md:border-l md:border-theme-divider md:flex-shrink-0",children:s.jsx(gy,{groupCode:m.peerId,onClose:()=>x(!1),onAtMember:R})})]}),!e&&o&&s.jsx("button",{onClick:()=>window.open("#webqq-fullscreen","_blank"),className:"fixed bottom-6 right-6 z-50 p-3 bg-pink-500/70 hover:bg-pink-500/90 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-200 group backdrop-blur-sm",title:"在新窗口中全屏打开",children:s.jsx(g0,{size:20,className:"group-hover:scale-110 transition-transform"})})]})},vy=()=>s.jsx("div",{className:"h-screen bg-theme p-4 md:p-8",children:s.jsx(df,{isFullscreen:!0})}),wy={enable:!0,connect:[]},ky={enable:!1,host:"127.0.0.1",port:5600,token:""},jy={enable:!1,reportSelfMessage:!1,http:{host:"127.0.0.1",port:3010,prefix:"",accessToken:""},webhook:{urls:[],accessToken:""}},Ny={enable:!0,host:"127.0.0.1",port:3080},by={webui:Ny,milky:jy,satori:ky,ob11:wy,enableLocalFile2Url:!1,log:!0,autoDeleteFile:!1,autoDeleteFileSecond:60,musicSignUrl:"https://ss.xingzhige.com/music_card/card",msgCacheExpire:120,ffmpeg:"",rawMsgPB:!1},$u="7.8.1";function Sy(){const e=()=>{const Q=window.location.hash.slice(1);return["dashboard","onebot","satori","milky","logs","other","webqq","webqq-fullscreen","about"].includes(Q)?Q:"dashboard"},[t,n]=p.useState(e),[r,l]=p.useState(by),[i,o]=p.useState(null),[a,c]=p.useState(!1),[u,d]=p.useState(!1),[m,f]=p.useState(!0),[v,k]=p.useState(null),[w,j]=p.useState(!1),[x,h]=p.useState(""),[g,y]=p.useState(null),[N,S]=p.useState(!1),[P,T]=p.useState(!1),[O,R]=p.useState(!1),[V,C]=p.useState(!1),[b,E]=p.useState(""),[_,U]=p.useState(!1),[D,I]=p.useState(!1),[q,K]=p.useState(!1),{autoHideSidebarInWebQQ:Z}=Ha();p.useEffect(()=>{W0(async Q=>new Promise(M=>{h(Q||""),j(!0),y(()=>M)}))},[]),p.useEffect(()=>{window.location.hash=t},[t]),p.useEffect(()=>{Z&&t==="webqq"&&I(!0)},[t,Z]),p.useEffect(()=>{const Q=()=>{const M=window.location.hash.slice(1);["dashboard","onebot","satori","milky","logs","other","webqq","webqq-fullscreen","about"].includes(M)&&n(M)};return window.addEventListener("hashchange",Q),()=>window.removeEventListener("hashchange",Q)},[]);const oe=p.useCallback(Q=>{Q.trim()?(j(!1),h(""),g&&(g(Q),y(null))):h("密码不能为空")},[g]);p.useEffect(()=>{(async()=>{var M;try{const $=await Ne("/api/config");if($.success&&$.data.selfInfo.online){d(!0),k({nick:$.data.selfInfo.nick||"",uin:$.data.selfInfo.uin}),l($.data.config);try{const W=await Ne("/api/email/config");W.success&&W.data&&o(W.data)}catch(W){console.error("Failed to fetch email config:",W)}try{const W=await Ne("/api/device-info");W.success&&((M=W.data)!=null&&M.buildVer)&&E(W.data.buildVer)}catch(W){console.error("Failed to fetch device info:",W)}}else d(!1)}catch($){console.error("Failed to check login status:",$),d(!1)}finally{f(!1)}})()},[]);const ye=p.useCallback(async(Q,M)=>{try{c(!0);const $=Q||r,W=M!==void 0?M:i,le=await Ne("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:$})});if(!le.success){Y(le.message||"保存失败","error");return}if(W)try{const ae=await Ne("/api/email/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)});if(!ae.success){Y(`主配置已保存,但邮件配置保存失败:${ae.message}`,"warning");return}}catch(ae){Y(`主配置已保存,但邮件配置保存失败:${ae.message}`,"warning");return}Y("配置保存成功","success")}catch($){Y($.message||"保存失败","error")}finally{c(!1)}},[r,i]),Ce=p.useCallback(()=>{window.location.reload()},[]);return m?s.jsxs(s.Fragment,{children:[s.jsx(_s,{}),s.jsx("div",{className:"relative flex items-center justify-center min-h-screen z-10",children:s.jsx(Se,{size:48,className:"animate-spin text-pink-500"})}),s.jsx(Us,{visible:w,onConfirm:oe,error:x})]}):u?t==="webqq-fullscreen"?s.jsxs(s.Fragment,{children:[s.jsx(_s,{}),s.jsx(vy,{}),s.jsx(Us,{visible:w,onConfirm:oe,error:x}),s.jsx(Di,{})]}):s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(_s,{}),s.jsx(B0,{activeTab:t,onTabChange:n,accountInfo:v||void 0,isOpen:_,onClose:()=>U(!1),collapsed:D,onToggleCollapse:()=>I(!D),onOpenSettings:()=>K(!0)}),s.jsxs("main",{className:`flex-1 overflow-auto z-10 transition-all duration-300 ${D?"":"md:ml-64"}`,children:[s.jsxs("div",{className:"md:hidden sticky top-0 z-30 bg-theme-card/95 backdrop-blur-xl border-b border-theme-divider px-4 py-3 flex items-center gap-3",children:[s.jsx("button",{onClick:()=>U(!0),className:"p-2 text-theme-muted hover:text-theme hover:bg-theme-item rounded-lg transition-colors",children:s.jsx(y0,{size:24})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:"/logo.jpg",alt:"Logo",className:"w-8 h-8 rounded-lg"}),s.jsx("span",{className:"font-semibold text-theme",children:"LLBot"})]})]}),s.jsxs("div",{className:"p-4 md:p-8 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"mb-8 hidden md:block",children:[s.jsx("h2",{className:"text-3xl font-bold text-white mb-2",children:t==="dashboard"&&"Dashboard"}),s.jsx("p",{className:"text-white/80",children:t==="dashboard"&&"欢迎使用 Lucky Lillia Bot"})]}),t==="dashboard"&&s.jsx(Y0,{llbotVersion:$u,qqVersion:b}),t==="webqq"&&s.jsx(df,{}),t==="logs"&&s.jsx(X0,{}),t==="onebot"&&s.jsx(J0,{config:r.ob11,onChange:Q=>{const M={...r,ob11:Q};l(M)},onSave:Q=>{if(Q){const M={...r,ob11:Q};ye(M)}else ye()}}),t==="satori"&&s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center",children:s.jsx(Ua,{size:24,className:"text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"Satori 协议"}),s.jsx("p",{className:"text-sm text-theme-secondary",children:"配置 Satori 协议相关设置"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"启用 Satori 协议"}),s.jsx("div",{className:"text-xs text-theme-muted mt-0.5",children:"开启后将支持 Satori 协议连接"})]}),s.jsx("input",{type:"checkbox",checked:r.satori.enable,onChange:Q=>l({...r,satori:{...r.satori,enable:Q.target.checked}}),className:"switch-toggle"})]}),r.satori.enable&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"监听地址"}),s.jsx(ss,{value:r.satori.host,onChange:Q=>l({...r,satori:{...r.satori,host:Q}})}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"选择服务监听的网络地址"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Satori 端口"}),s.jsx("input",{type:"number",value:r.satori.port,onChange:Q=>l({...r,satori:{...r.satori,port:parseInt(Q.target.value)}}),min:"1",max:"65535",placeholder:"5500",className:"input-field"}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"Satori 服务监听端口(1-65535)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Satori Token"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:N?"text":"password",value:r.satori.token,onChange:Q=>l({...r,satori:{...r.satori,token:Q.target.value}}),placeholder:"请输入 Satori Token",className:"input-field pr-12"}),s.jsx("button",{type:"button",onClick:()=>S(!N),className:"absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1",children:N?s.jsx(sn,{size:20}):s.jsx(Ft,{size:20})})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"用于 Satori 连接验证的 Token"})]})]})]}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.jsx("button",{onClick:()=>{var Q;if(r.satori.host===""&&r.satori.enable&&!((Q=r.satori.token)!=null&&Q.trim())){Y("当监听所有地址时,必须设置 Satori Token!","error");return}ye()},disabled:a,className:"btn-primary flex items-center gap-2",children:a?s.jsxs(s.Fragment,{children:[s.jsx(Se,{size:20,className:"animate-spin"}),"保存中..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ui,{size:20}),"保存配置"]})})})]}),t==="milky"&&s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-pink-500 to-rose-600 flex items-center justify-center",children:s.jsx(rh,{size:24,className:"text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"Milky 协议"}),s.jsx("p",{className:"text-sm text-theme-secondary",children:"配置 Milky 协议相关设置"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"启用 Milky 协议"}),s.jsx("div",{className:"text-xs text-theme-muted mt-0.5",children:"开启后将支持 Milky 协议连接"})]}),s.jsx("input",{type:"checkbox",checked:r.milky.enable,onChange:Q=>l({...r,milky:{...r.milky,enable:Q.target.checked}}),className:"switch-toggle"})]}),r.milky.enable&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"上报自己发送的消息"}),s.jsx("div",{className:"text-xs text-theme-muted mt-0.5",children:"启用后将上报自己发送的消息"})]}),s.jsx("input",{type:"checkbox",checked:r.milky.reportSelfMessage,onChange:Q=>l({...r,milky:{...r.milky,reportSelfMessage:Q.target.checked}}),className:"switch-toggle"})]}),s.jsxs("div",{className:"border-t border-theme-divider pt-4 mt-4",children:[s.jsx("h4",{className:"text-md font-semibold text-theme mb-4",children:"HTTP 配置"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"监听地址"}),s.jsx(ss,{value:r.milky.http.host,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,host:Q}}})}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"选择服务监听的网络地址"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"HTTP 端口"}),s.jsx("input",{type:"number",value:r.milky.http.port,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,port:parseInt(Q.target.value)}}}),min:"1",max:"65535",placeholder:"3010",className:"input-field"}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"Milky HTTP 服务监听端口(1-65535)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"路径前缀"}),s.jsx("input",{type:"text",value:r.milky.http.prefix,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,prefix:Q.target.value}}}),placeholder:"/api",className:"input-field"}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"HTTP API 路径前缀(可选)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Access Token"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:P?"text":"password",value:r.milky.http.accessToken,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,accessToken:Q.target.value}}}),placeholder:"请输入 Access Token",className:"input-field pr-12"}),s.jsx("button",{type:"button",onClick:()=>T(!P),className:"absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1",children:P?s.jsx(sn,{size:20}):s.jsx(Ft,{size:20})})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"用于 Milky HTTP 连接验证的 Token"})]})]})]}),s.jsxs("div",{className:"border-t border-theme-divider pt-4 mt-4",children:[s.jsx("h4",{className:"text-md font-semibold text-theme mb-4",children:"Webhook 配置"}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Webhook URLs"}),s.jsxs("div",{className:"space-y-2",children:[r.milky.webhook.urls.map((Q,M)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"text",value:Q,onChange:$=>{const W=[...r.milky.webhook.urls];W[M]=$.target.value,l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:W}}})},placeholder:"http:// 或 https://",className:`input-field flex-1 ${Q&&!Q.match(/^https?:\/\//)?"border-red-300 focus:ring-red-500":""}`}),s.jsx("button",{type:"button",onClick:()=>{const $=r.milky.webhook.urls.filter((W,le)=>le!==M);l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:$}}})},className:"p-2 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30 rounded-lg transition-colors",title:"删除",children:s.jsx(It,{size:18})})]},M)),r.milky.webhook.urls.some(Q=>Q&&!Q.match(/^https?:\/\//))&&s.jsx("p",{className:"text-xs text-red-500",children:"URL 必须以 http:// 或 https:// 开头"}),s.jsxs("button",{type:"button",onClick:()=>{l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:[...r.milky.webhook.urls,""]}}})},className:"flex items-center gap-2 px-4 py-2 text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors text-sm font-medium",children:[s.jsx(ih,{size:18}),"添加 Webhook URL"]})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-2",children:"事件上报的 Webhook 地址"})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Access Token"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:O?"text":"password",value:r.milky.webhook.accessToken,onChange:Q=>l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,accessToken:Q.target.value}}}),placeholder:"请输入 Access Token",className:"input-field pr-12"}),s.jsx("button",{type:"button",onClick:()=>R(!O),className:"absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1",children:O?s.jsx(sn,{size:20}):s.jsx(Ft,{size:20})})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"用于 Webhook 请求验证的 Token"})]})]})]})]}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.jsx("button",{onClick:()=>{var $;if(r.milky.http.host===""&&r.milky.enable&&!(($=r.milky.http.accessToken)!=null&&$.trim())){Y("当监听所有地址时,必须设置 Milky Access Token!","error");return}if(r.milky.webhook.urls.filter(W=>W.trim()&&!W.match(/^https?:\/\//)).length>0){Y("Webhook URL 必须以 http:// 或 https:// 开头","error");return}const M={...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:r.milky.webhook.urls.filter(W=>W.trim())}}};l(M),ye(M)},disabled:a,className:"btn-primary flex items-center gap-2",children:a?s.jsxs(s.Fragment,{children:[s.jsx(Se,{size:20,className:"animate-spin"}),"保存中..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ui,{size:20}),"保存配置"]})})})]}),t==="other"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"pb-24",children:s.jsx(tg,{config:r,emailConfig:i,onChange:l,onEmailChange:o,onOpenChangePassword:()=>C(!0)})}),s.jsx("div",{className:"fixed bottom-8 right-8 z-40",children:s.jsx("button",{onClick:()=>ye(),disabled:a,className:"btn-primary flex items-center gap-2 shadow-2xl hover:shadow-3xl",children:a?s.jsxs(s.Fragment,{children:[s.jsx(Se,{size:20,className:"animate-spin"}),"保存中..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ui,{size:20}),"保存配置"]})})})]}),t==="about"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"card p-8 text-center",children:[s.jsx("div",{className:"w-20 h-20 rounded-3xl overflow-hidden mx-auto mb-6 shadow-lg",children:s.jsx("img",{src:"/logo.jpg",alt:"Logo",className:"w-full h-full object-cover"})}),s.jsx("h1",{className:"text-3xl font-bold text-theme mb-2",children:"Lucky Lillia Bot"}),s.jsx("p",{className:"text-theme-secondary mb-6",children:"使你的 QQNT 支持 OneBot 11 协议、Satori 协议、Milky 协议进行 QQ 机器人开发"}),s.jsxs("div",{className:"flex items-center justify-center gap-4",children:[s.jsxs("a",{href:"https://github.com/LLOneBot/LuckyLilliaBot",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-2.5 bg-gray-800 dark:bg-neutral-700 text-white rounded-xl hover:bg-gray-900 dark:hover:bg-neutral-600 transition-colors flex items-center gap-2",children:[s.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),"GitHub"]}),s.jsxs("a",{href:"https://luckylillia.com",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-2.5 gradient-primary text-white rounded-xl hover:shadow-lg transition-all flex items-center gap-2",children:[s.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),"文档"]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z"})})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"Telegram 群"}),s.jsx("p",{className:"text-sm text-theme-secondary"})]})]}),s.jsx("a",{href:"https://t.me/+nLZEnpne-pQ1OWFl",target:"_blank",rel:"noopener noreferrer",className:"text-pink-500 hover:text-pink-600 hover:underline text-sm break-all",children:"https://t.me/+nLZEnpne-pQ1OWFl"})]}),s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-green-500 to-emerald-600 flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z"})})}),s.jsx("div",{children:s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"QQ 群"})})]}),s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("a",{href:"https://qm.qq.com/q/EZndy3xntQ",target:"_blank",rel:"noopener noreferrer",className:" text-pink-500 hover:text-pink-600 hover:underline",children:"545402644"})})]})]}),s.jsx("div",{className:"card p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl gradient-primary-br flex items-center justify-center",children:s.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"版本信息"}),s.jsxs("div",{className:"text-xs text-theme-muted",children:["Lucky Lillia Bot ",$u]}),b&&s.jsxs("div",{className:"text-xs text-theme-muted",children:["QQ ",b]})]})]}),s.jsxs("div",{className:"text-sm text-theme-secondary",children:["WebUI Powered by ",s.jsx("span",{className:"font-semibold text-pink-500",children:"React + Tailwind"})]})]})})]})]})]}),a&&s.jsx("div",{className:"fixed inset-0 bg-black/20 dark:bg-black/40 flex items-center justify-center",style:{zIndex:9e3},children:s.jsxs("div",{className:"bg-theme-card backdrop-blur-xl rounded-2xl p-6 shadow-2xl",children:[s.jsx(Se,{size:48,className:"animate-spin text-pink-500 mx-auto"}),s.jsx("p",{className:"mt-4 text-theme",children:"加载中..."})]})}),s.jsx(Us,{visible:w,onConfirm:oe,error:x}),s.jsx(ng,{visible:V,onClose:()=>C(!1),onSuccess:()=>{window.location.reload()}}),s.jsx(Di,{}),s.jsx($0,{visible:q,onClose:()=>K(!1)})]}):s.jsxs(s.Fragment,{children:[s.jsx(_s,{}),s.jsx(rg,{onLoginSuccess:Ce}),s.jsx(Us,{visible:w,onConfirm:oe,error:x}),s.jsx(Di,{})]})}const Uu=localStorage.getItem("llbot-theme");if(Uu)try{const{state:e}=JSON.parse(Uu);e!=null&&e.isDark&&document.documentElement.classList.add("dark")}catch{}Hi.createRoot(document.getElementById("root")).render(s.jsx(ce.StrictMode,{children:s.jsx(Sy,{})}));
453
+ `,children:s.jsx(py,{session:m,onShowMembers:()=>x(!k),onNewMessageCallback:b,onEmojiReactionCallback:E,onMessageRecalledCallback:_,appendInputText:T,onAppendInputTextConsumed:V,onBack:K,showBackButton:D})}),k&&(m==null?void 0:m.chatType)===2&&s.jsx("div",{className:"fixed inset-0 z-50 bg-white/85 dark:bg-neutral-900/85 backdrop-blur-xl md:static md:inset-auto md:z-auto md:bg-transparent md:backdrop-blur-none md:w-64 md:border-l md:border-theme-divider md:flex-shrink-0",children:s.jsx(gy,{groupCode:m.peerId,onClose:()=>x(!1),onAtMember:R})})]}),!e&&o&&s.jsx("button",{onClick:()=>window.open("#webqq-fullscreen","_blank"),className:"fixed bottom-6 right-6 z-50 p-3 bg-pink-500/70 hover:bg-pink-500/90 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-200 group backdrop-blur-sm",title:"在新窗口中全屏打开",children:s.jsx(g0,{size:20,className:"group-hover:scale-110 transition-transform"})})]})},vy=()=>s.jsx("div",{className:"h-screen bg-theme p-4 md:p-8",children:s.jsx(df,{isFullscreen:!0})}),wy={enable:!0,connect:[]},ky={enable:!1,host:"127.0.0.1",port:5600,token:""},jy={enable:!1,reportSelfMessage:!1,http:{host:"127.0.0.1",port:3010,prefix:"",accessToken:""},webhook:{urls:[],accessToken:""}},Ny={enable:!0,host:"127.0.0.1",port:3080},by={webui:Ny,milky:jy,satori:ky,ob11:wy,enableLocalFile2Url:!1,log:!0,autoDeleteFile:!1,autoDeleteFileSecond:60,musicSignUrl:"https://ss.xingzhige.com/music_card/card",msgCacheExpire:120,ffmpeg:"",rawMsgPB:!1},$u="7.8.3";function Sy(){const e=()=>{const Q=window.location.hash.slice(1);return["dashboard","onebot","satori","milky","logs","other","webqq","webqq-fullscreen","about"].includes(Q)?Q:"dashboard"},[t,n]=p.useState(e),[r,l]=p.useState(by),[i,o]=p.useState(null),[a,c]=p.useState(!1),[u,d]=p.useState(!1),[m,f]=p.useState(!0),[v,k]=p.useState(null),[w,j]=p.useState(!1),[x,h]=p.useState(""),[g,y]=p.useState(null),[N,S]=p.useState(!1),[P,T]=p.useState(!1),[O,R]=p.useState(!1),[V,C]=p.useState(!1),[b,E]=p.useState(""),[_,U]=p.useState(!1),[D,I]=p.useState(!1),[q,K]=p.useState(!1),{autoHideSidebarInWebQQ:Z}=Ha();p.useEffect(()=>{W0(async Q=>new Promise(M=>{h(Q||""),j(!0),y(()=>M)}))},[]),p.useEffect(()=>{window.location.hash=t},[t]),p.useEffect(()=>{Z&&t==="webqq"&&I(!0)},[t,Z]),p.useEffect(()=>{const Q=()=>{const M=window.location.hash.slice(1);["dashboard","onebot","satori","milky","logs","other","webqq","webqq-fullscreen","about"].includes(M)&&n(M)};return window.addEventListener("hashchange",Q),()=>window.removeEventListener("hashchange",Q)},[]);const oe=p.useCallback(Q=>{Q.trim()?(j(!1),h(""),g&&(g(Q),y(null))):h("密码不能为空")},[g]);p.useEffect(()=>{(async()=>{var M;try{const $=await Ne("/api/config");if($.success&&$.data.selfInfo.online){d(!0),k({nick:$.data.selfInfo.nick||"",uin:$.data.selfInfo.uin}),l($.data.config);try{const W=await Ne("/api/email/config");W.success&&W.data&&o(W.data)}catch(W){console.error("Failed to fetch email config:",W)}try{const W=await Ne("/api/device-info");W.success&&((M=W.data)!=null&&M.buildVer)&&E(W.data.buildVer)}catch(W){console.error("Failed to fetch device info:",W)}}else d(!1)}catch($){console.error("Failed to check login status:",$),d(!1)}finally{f(!1)}})()},[]);const ye=p.useCallback(async(Q,M)=>{try{c(!0);const $=Q||r,W=M!==void 0?M:i,le=await Ne("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:$})});if(!le.success){Y(le.message||"保存失败","error");return}if(W)try{const ae=await Ne("/api/email/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)});if(!ae.success){Y(`主配置已保存,但邮件配置保存失败:${ae.message}`,"warning");return}}catch(ae){Y(`主配置已保存,但邮件配置保存失败:${ae.message}`,"warning");return}Y("配置保存成功","success")}catch($){Y($.message||"保存失败","error")}finally{c(!1)}},[r,i]),Ce=p.useCallback(()=>{window.location.reload()},[]);return m?s.jsxs(s.Fragment,{children:[s.jsx(_s,{}),s.jsx("div",{className:"relative flex items-center justify-center min-h-screen z-10",children:s.jsx(Se,{size:48,className:"animate-spin text-pink-500"})}),s.jsx(Us,{visible:w,onConfirm:oe,error:x})]}):u?t==="webqq-fullscreen"?s.jsxs(s.Fragment,{children:[s.jsx(_s,{}),s.jsx(vy,{}),s.jsx(Us,{visible:w,onConfirm:oe,error:x}),s.jsx(Di,{})]}):s.jsxs("div",{className:"flex min-h-screen",children:[s.jsx(_s,{}),s.jsx(B0,{activeTab:t,onTabChange:n,accountInfo:v||void 0,isOpen:_,onClose:()=>U(!1),collapsed:D,onToggleCollapse:()=>I(!D),onOpenSettings:()=>K(!0)}),s.jsxs("main",{className:`flex-1 overflow-auto z-10 transition-all duration-300 ${D?"":"md:ml-64"}`,children:[s.jsxs("div",{className:"md:hidden sticky top-0 z-30 bg-theme-card/95 backdrop-blur-xl border-b border-theme-divider px-4 py-3 flex items-center gap-3",children:[s.jsx("button",{onClick:()=>U(!0),className:"p-2 text-theme-muted hover:text-theme hover:bg-theme-item rounded-lg transition-colors",children:s.jsx(y0,{size:24})}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:"/logo.jpg",alt:"Logo",className:"w-8 h-8 rounded-lg"}),s.jsx("span",{className:"font-semibold text-theme",children:"LLBot"})]})]}),s.jsxs("div",{className:"p-4 md:p-8 max-w-6xl mx-auto",children:[s.jsxs("div",{className:"mb-8 hidden md:block",children:[s.jsx("h2",{className:"text-3xl font-bold text-white mb-2",children:t==="dashboard"&&"Dashboard"}),s.jsx("p",{className:"text-white/80",children:t==="dashboard"&&"欢迎使用 Lucky Lillia Bot"})]}),t==="dashboard"&&s.jsx(Y0,{llbotVersion:$u,qqVersion:b}),t==="webqq"&&s.jsx(df,{}),t==="logs"&&s.jsx(X0,{}),t==="onebot"&&s.jsx(J0,{config:r.ob11,onChange:Q=>{const M={...r,ob11:Q};l(M)},onSave:Q=>{if(Q){const M={...r,ob11:Q};ye(M)}else ye()}}),t==="satori"&&s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center",children:s.jsx(Ua,{size:24,className:"text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"Satori 协议"}),s.jsx("p",{className:"text-sm text-theme-secondary",children:"配置 Satori 协议相关设置"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"启用 Satori 协议"}),s.jsx("div",{className:"text-xs text-theme-muted mt-0.5",children:"开启后将支持 Satori 协议连接"})]}),s.jsx("input",{type:"checkbox",checked:r.satori.enable,onChange:Q=>l({...r,satori:{...r.satori,enable:Q.target.checked}}),className:"switch-toggle"})]}),r.satori.enable&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"监听地址"}),s.jsx(ss,{value:r.satori.host,onChange:Q=>l({...r,satori:{...r.satori,host:Q}})}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"选择服务监听的网络地址"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Satori 端口"}),s.jsx("input",{type:"number",value:r.satori.port,onChange:Q=>l({...r,satori:{...r.satori,port:parseInt(Q.target.value)}}),min:"1",max:"65535",placeholder:"5500",className:"input-field"}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"Satori 服务监听端口(1-65535)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Satori Token"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:N?"text":"password",value:r.satori.token,onChange:Q=>l({...r,satori:{...r.satori,token:Q.target.value}}),placeholder:"请输入 Satori Token",className:"input-field pr-12"}),s.jsx("button",{type:"button",onClick:()=>S(!N),className:"absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1",children:N?s.jsx(sn,{size:20}):s.jsx(Ft,{size:20})})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"用于 Satori 连接验证的 Token"})]})]})]}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.jsx("button",{onClick:()=>{var Q;if(r.satori.host===""&&r.satori.enable&&!((Q=r.satori.token)!=null&&Q.trim())){Y("当监听所有地址时,必须设置 Satori Token!","error");return}ye()},disabled:a,className:"btn-primary flex items-center gap-2",children:a?s.jsxs(s.Fragment,{children:[s.jsx(Se,{size:20,className:"animate-spin"}),"保存中..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ui,{size:20}),"保存配置"]})})})]}),t==="milky"&&s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-pink-500 to-rose-600 flex items-center justify-center",children:s.jsx(rh,{size:24,className:"text-white"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"Milky 协议"}),s.jsx("p",{className:"text-sm text-theme-secondary",children:"配置 Milky 协议相关设置"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"启用 Milky 协议"}),s.jsx("div",{className:"text-xs text-theme-muted mt-0.5",children:"开启后将支持 Milky 协议连接"})]}),s.jsx("input",{type:"checkbox",checked:r.milky.enable,onChange:Q=>l({...r,milky:{...r.milky,enable:Q.target.checked}}),className:"switch-toggle"})]}),r.milky.enable&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between p-4 bg-theme-item rounded-xl hover:bg-theme-item-hover transition-colors",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"上报自己发送的消息"}),s.jsx("div",{className:"text-xs text-theme-muted mt-0.5",children:"启用后将上报自己发送的消息"})]}),s.jsx("input",{type:"checkbox",checked:r.milky.reportSelfMessage,onChange:Q=>l({...r,milky:{...r.milky,reportSelfMessage:Q.target.checked}}),className:"switch-toggle"})]}),s.jsxs("div",{className:"border-t border-theme-divider pt-4 mt-4",children:[s.jsx("h4",{className:"text-md font-semibold text-theme mb-4",children:"HTTP 配置"}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"监听地址"}),s.jsx(ss,{value:r.milky.http.host,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,host:Q}}})}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"选择服务监听的网络地址"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"HTTP 端口"}),s.jsx("input",{type:"number",value:r.milky.http.port,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,port:parseInt(Q.target.value)}}}),min:"1",max:"65535",placeholder:"3010",className:"input-field"}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"Milky HTTP 服务监听端口(1-65535)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"路径前缀"}),s.jsx("input",{type:"text",value:r.milky.http.prefix,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,prefix:Q.target.value}}}),placeholder:"/api",className:"input-field"}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"HTTP API 路径前缀(可选)"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Access Token"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:P?"text":"password",value:r.milky.http.accessToken,onChange:Q=>l({...r,milky:{...r.milky,http:{...r.milky.http,accessToken:Q.target.value}}}),placeholder:"请输入 Access Token",className:"input-field pr-12"}),s.jsx("button",{type:"button",onClick:()=>T(!P),className:"absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1",children:P?s.jsx(sn,{size:20}):s.jsx(Ft,{size:20})})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"用于 Milky HTTP 连接验证的 Token"})]})]})]}),s.jsxs("div",{className:"border-t border-theme-divider pt-4 mt-4",children:[s.jsx("h4",{className:"text-md font-semibold text-theme mb-4",children:"Webhook 配置"}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Webhook URLs"}),s.jsxs("div",{className:"space-y-2",children:[r.milky.webhook.urls.map((Q,M)=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"text",value:Q,onChange:$=>{const W=[...r.milky.webhook.urls];W[M]=$.target.value,l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:W}}})},placeholder:"http:// 或 https://",className:`input-field flex-1 ${Q&&!Q.match(/^https?:\/\//)?"border-red-300 focus:ring-red-500":""}`}),s.jsx("button",{type:"button",onClick:()=>{const $=r.milky.webhook.urls.filter((W,le)=>le!==M);l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:$}}})},className:"p-2 text-red-500 hover:bg-red-50 dark:hover:bg-red-900/30 rounded-lg transition-colors",title:"删除",children:s.jsx(It,{size:18})})]},M)),r.milky.webhook.urls.some(Q=>Q&&!Q.match(/^https?:\/\//))&&s.jsx("p",{className:"text-xs text-red-500",children:"URL 必须以 http:// 或 https:// 开头"}),s.jsxs("button",{type:"button",onClick:()=>{l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:[...r.milky.webhook.urls,""]}}})},className:"flex items-center gap-2 px-4 py-2 text-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/30 rounded-lg transition-colors text-sm font-medium",children:[s.jsx(ih,{size:18}),"添加 Webhook URL"]})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-2",children:"事件上报的 Webhook 地址"})]}),s.jsxs("div",{className:"mt-4",children:[s.jsx("label",{className:"block text-sm font-medium text-theme-secondary mb-2",children:"Access Token"}),s.jsxs("div",{className:"relative",children:[s.jsx("input",{type:O?"text":"password",value:r.milky.webhook.accessToken,onChange:Q=>l({...r,milky:{...r.milky,webhook:{...r.milky.webhook,accessToken:Q.target.value}}}),placeholder:"请输入 Access Token",className:"input-field pr-12"}),s.jsx("button",{type:"button",onClick:()=>R(!O),className:"absolute right-3 top-1/2 -translate-y-1/2 text-theme-hint hover:text-theme transition-colors p-1",children:O?s.jsx(sn,{size:20}):s.jsx(Ft,{size:20})})]}),s.jsx("p",{className:"text-xs text-theme-muted mt-1",children:"用于 Webhook 请求验证的 Token"})]})]})]})]}),s.jsx("div",{className:"mt-6 flex justify-end",children:s.jsx("button",{onClick:()=>{var $;if(r.milky.http.host===""&&r.milky.enable&&!(($=r.milky.http.accessToken)!=null&&$.trim())){Y("当监听所有地址时,必须设置 Milky Access Token!","error");return}if(r.milky.webhook.urls.filter(W=>W.trim()&&!W.match(/^https?:\/\//)).length>0){Y("Webhook URL 必须以 http:// 或 https:// 开头","error");return}const M={...r,milky:{...r.milky,webhook:{...r.milky.webhook,urls:r.milky.webhook.urls.filter(W=>W.trim())}}};l(M),ye(M)},disabled:a,className:"btn-primary flex items-center gap-2",children:a?s.jsxs(s.Fragment,{children:[s.jsx(Se,{size:20,className:"animate-spin"}),"保存中..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ui,{size:20}),"保存配置"]})})})]}),t==="other"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"pb-24",children:s.jsx(tg,{config:r,emailConfig:i,onChange:l,onEmailChange:o,onOpenChangePassword:()=>C(!0)})}),s.jsx("div",{className:"fixed bottom-8 right-8 z-40",children:s.jsx("button",{onClick:()=>ye(),disabled:a,className:"btn-primary flex items-center gap-2 shadow-2xl hover:shadow-3xl",children:a?s.jsxs(s.Fragment,{children:[s.jsx(Se,{size:20,className:"animate-spin"}),"保存中..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Ui,{size:20}),"保存配置"]})})})]}),t==="about"&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"card p-8 text-center",children:[s.jsx("div",{className:"w-20 h-20 rounded-3xl overflow-hidden mx-auto mb-6 shadow-lg",children:s.jsx("img",{src:"/logo.jpg",alt:"Logo",className:"w-full h-full object-cover"})}),s.jsx("h1",{className:"text-3xl font-bold text-theme mb-2",children:"Lucky Lillia Bot"}),s.jsx("p",{className:"text-theme-secondary mb-6",children:"使你的 QQNT 支持 OneBot 11 协议、Satori 协议、Milky 协议进行 QQ 机器人开发"}),s.jsxs("div",{className:"flex items-center justify-center gap-4",children:[s.jsxs("a",{href:"https://github.com/LLOneBot/LuckyLilliaBot",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-2.5 bg-gray-800 dark:bg-neutral-700 text-white rounded-xl hover:bg-gray-900 dark:hover:bg-neutral-600 transition-colors flex items-center gap-2",children:[s.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),"GitHub"]}),s.jsxs("a",{href:"https://luckylillia.com",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-2.5 gradient-primary text-white rounded-xl hover:shadow-lg transition-all flex items-center gap-2",children:[s.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),"文档"]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl gradient-primary-br flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z"})})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"Telegram 群"}),s.jsx("p",{className:"text-sm text-theme-secondary"})]})]}),s.jsx("a",{href:"https://t.me/+nLZEnpne-pQ1OWFl",target:"_blank",rel:"noopener noreferrer",className:"text-pink-500 hover:text-pink-600 hover:underline text-sm break-all",children:"https://t.me/+nLZEnpne-pQ1OWFl"})]}),s.jsxs("div",{className:"card p-6",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-xl bg-gradient-to-br from-green-500 to-emerald-600 flex items-center justify-center",children:s.jsx("svg",{className:"w-6 h-6 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 4.171 4.912 8.213 6.281 9.49a2.94 2.94 0 0 0 2.438.94 2.94 2.94 0 0 0 2.438-.94C14.588 16.713 19.5 12.671 19.5 8.5 19.5 5.462 17.038 3 16.5 3z"})})}),s.jsx("div",{children:s.jsx("h3",{className:"text-lg font-semibold text-theme",children:"QQ 群"})})]}),s.jsx("div",{className:"flex items-center gap-3",children:s.jsx("a",{href:"https://qm.qq.com/q/EZndy3xntQ",target:"_blank",rel:"noopener noreferrer",className:" text-pink-500 hover:text-pink-600 hover:underline",children:"545402644"})})]})]}),s.jsx("div",{className:"card p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-xl gradient-primary-br flex items-center justify-center",children:s.jsx("svg",{className:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-theme",children:"版本信息"}),s.jsxs("div",{className:"text-xs text-theme-muted",children:["Lucky Lillia Bot ",$u]}),b&&s.jsxs("div",{className:"text-xs text-theme-muted",children:["QQ ",b]})]})]}),s.jsxs("div",{className:"text-sm text-theme-secondary",children:["WebUI Powered by ",s.jsx("span",{className:"font-semibold text-pink-500",children:"React + Tailwind"})]})]})})]})]})]}),a&&s.jsx("div",{className:"fixed inset-0 bg-black/20 dark:bg-black/40 flex items-center justify-center",style:{zIndex:9e3},children:s.jsxs("div",{className:"bg-theme-card backdrop-blur-xl rounded-2xl p-6 shadow-2xl",children:[s.jsx(Se,{size:48,className:"animate-spin text-pink-500 mx-auto"}),s.jsx("p",{className:"mt-4 text-theme",children:"加载中..."})]})}),s.jsx(Us,{visible:w,onConfirm:oe,error:x}),s.jsx(ng,{visible:V,onClose:()=>C(!1),onSuccess:()=>{window.location.reload()}}),s.jsx(Di,{}),s.jsx($0,{visible:q,onClose:()=>K(!1)})]}):s.jsxs(s.Fragment,{children:[s.jsx(_s,{}),s.jsx(rg,{onLoginSuccess:Ce}),s.jsx(Us,{visible:w,onConfirm:oe,error:x}),s.jsx(Di,{})]})}const Uu=localStorage.getItem("llbot-theme");if(Uu)try{const{state:e}=JSON.parse(Uu);e!=null&&e.isDark&&document.documentElement.classList.add("dark")}catch{}Hi.createRoot(document.getElementById("root")).render(s.jsx(ce.StrictMode,{children:s.jsx(Sy,{})}));
package/webui/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>WebUI</title>
7
- <script type="module" crossorigin src="/assets/index-CIODLA3Q.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-BQ4Xt-Lz.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-CM1j26Ke.css">
9
9
  </head>
10
10
  <body>
@@ -1,38 +1,28 @@
1
- V7.8.1
1
+ V7.8.3
2
+ 更新时间 2026-02-10
2
3
 
3
- * 修复消息不上报
4
- =================
4
+ * 新增 macOS cli 版本
5
+ * 修复 Desktop 版本无法更新
6
+ * 支持 45758
7
+ * `get_group_list` 返回字段增加 `avatar_url`, `owner_id`, `is_top`, `shut_up_all_timestamp`, `shut_up_me_timestamp`
5
8
 
6
- V7.8.0
9
+ **破坏性改动**
10
+ * `get_group_info` 的 `active_member_num` 字段更改为 `active_member_count`
7
11
 
12
+ =================
13
+ V7.8.2
8
14
  更新时间 2026-02-09
9
15
 
10
- * Milky 修复合并转发无法发图
11
- * OneBot 修复发送的嵌套合并转发无法查看
12
- * OneBot 修复发送的嵌套合并转发缺失外显
13
- * 修复引用消息可能无法获取
14
- * 修复 CLI 版本关掉终端窗口后没有结束相关进程
15
- * 修复 Desktop 版本停止或者关闭后可能没有结束相关进程
16
- * 修复无头模式不生效
17
- * OneBot 支持合并转发 node 指定 time
18
- * OneBot 支持 get_group_info 接口返回的 group_create_time 字段在未加群时获取
19
- * OneBot 支持 get_stranger_info 接口返回标签字段 labels
20
- * Milky 支持 get_friend_info, get_group_member_list, get_group_member_info 接口使用 no_cache 参数
21
- * 优化 Desktop 一键对接框架使用体验
22
- * 优化 WebQQ 上传文件自动清理
23
- * 优化保存 Email 相关配置时,不再往 config_<qq>.json 写入,而是只保存在 email_config.json
24
- * WebQQ 置顶群聊现在和 PC / 手机端同步
25
- * WebQQ 群聊列表支持置顶群
26
- * WebQQ 群聊支持设置消息接收方式,支持收进群助手
27
- * 修复 Windows 上 ffmpeg 转换 amr 语音长度不对,如果是用的是 LLBot Desktop,需要先删除 bin/llbot/ffmpeg.exe 和 bin/llbot/ffprobe.exe
28
- * 优化 WebUI 在手机端上的适配
29
-
30
- ** 破坏性改动 **
31
- * OneBot `get_group_info` 去掉了 `groupAll` 字段,添加了 `is_top`, `owner_id`, `shut_up_all_timestamp`, `shut_up_me_timestamp`, `active_member_num`, `is_freeze`
32
- * OneBot `_send_group_notice` 请求参数 `pinned` 和 `confirm_required` 的类型由 integer 变为 boolean
16
+ * 修复禁言等事件不上报
33
17
 
34
18
  =================
19
+ V7.8.1
20
+ 更新时间 2026-02-09
21
+
22
+ * Milky 支持发送嵌套合并转发
23
+ * 修复消息不上报
35
24
 
25
+ =================
36
26
  V7.8.0
37
27
 
38
28
  更新时间 2026-02-09