yunzai-micro-plugin
Version:
Yunzai开发管理面板
2 lines (1 loc) • 2.34 kB
JavaScript
import{r as o}from"./index-499662cc.js";import{ad as r,q as n,d as a}from"./index-6f2f2fc7.js";const f=e=>r.get("/fs/listdir/?path="+e),p=(e,s)=>r.get("/fs/filesize?path="+e+"&type="+s),h=e=>r.get("/fs/mkdir/?path="+e),g=e=>r.get("/fs/open/?path="+e),_=e=>r.get("/fs/media?path="+e,{responseType:"blob"}),q=e=>r.delete("/fs/rmfile/?path="+e),b=e=>r.delete("/fs/rmdir/?path="+e),w=(e,s)=>r.post("/fs/savefile/?path="+e,{content:s}),S=(e,s)=>r.get("/fs/movefile/?path="+e+"&newPath="+s),v=(e,s)=>r.get("/fs/copyfile/?path="+e+"&newPath="+s),y=(e,s)=>r.get("/fs/copydir/?path="+e+"&newPath="+s),P=(e,s)=>r.get("/fs/renamefile/?path="+e+"&newPath="+s),k=(e,s)=>r.get("/fs/search/?path="+e+"&keyWord="+s),I=e=>r.get("/fs/download?path="+e,{responseType:"blob"}),i=e=>r.get("/fs/openssh?host="+e.host+"&port="+e.port+"&username="+e.username+"&password="+e.password),u=[{group_id:397798018,group_name:"沙箱测试群",max_member_count:200,member_count:3,msg_queue:[],member_list:[{group_id:397798018,user_id:2854196310,nickname:"Q群管家",card:"Q群管家",sex:"unknown",age:18,area:"",join_time:0,last_sent_time:0,level:"Lv1",role:"bot",unfriendly:!1,title:"机器人",title_expire_time:987654321,card_changeable:!0,thumbs:0}]}],l=[{nickname:"小冰",remark:"",user_id:2854196306,msg_queue:[],thumbs:0}],t=n();let c=a("Dev",{state:()=>({curPath:"0",isPluginEdited:!1,curPluginId:"",scene:0,curEditedMode:"add",sshInfo:{host:"",port:22,username:"root",password:""},botsInfo:[],qqScene:0,isPortrait:!1,curAdapter:"onebot11",onebot11:{group_list:u,friend_list:l,guild_list:[],cur_message_type:"group",cur_group_id:397798018,cur_private_id:0,cur_bot_id:2854196306,cur_self_info:{user_id:Number(t.masterQQ)||2330660495,nickname:t.username,sex:"female",age:18,area:"",thumbs:0},settings:{ws_forward_address:"",heart_beat:!1,local_storage:!1}}}),actions:{async getBotsInfo(){let e=await o();return e.code==200?(this.botsInfo=e.data,Promise.resolve("ok")):Promise.reject(new Error(e.message))},fillSSHInfo(){let e=new URL(t.originAddress);this.sshInfo.host=e.hostname,this.sshInfo.port=22},async connectSSH(){let e=await i(this.sshInfo);return e.code==200?Promise.resolve("ok"):Promise.reject(new Error(e.message))}},getters:{}});const F=c;export{p as a,k as b,_ as c,g as d,w as e,h as f,P as g,S as h,v as i,y as j,I as k,q as l,b as m,f as r,F as u};