koishi-plugin-bilibili-notify 3.6.0-alpha.0 → 3.6.0-alpha.1
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/dist/index.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +5 -3
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as N,inject as I,ref as u,computed as V,resolveComponent as x,createElementBlock as g,openBlock as a,Fragment as F,createBlock as d,createCommentVNode as c,withCtx as o,createElementVNode as e,toDisplayString as i,createVNode as f,createTextVNode as y}from"vue";import{store as b,send as m}from"@koishijs/client";const E={class:"comment"},M={class:"comment"},O=["src"],R={class:"comment"},$={class:"comment"},j={key:5,class:"logged-in"},D={class:"user-bg-wrapper"},G=["src"],T={class:"user-info"},z=["src"],A={class:"name-sign"},H={class:"udesc"},J={class:"uname"},K=["src"],L={class:"usign"},P={class:"user-status"},Q=N({__name:"settings",setup(k){const S=I("manager.settings.local"),w=u(""),h=u(""),C=u(""),q=u(""),s=u({}),r=V(()=>{if(S.value.name==="koishi-plugin-bilibili-notify")switch(s.value=b["bilibili-notify"],console.log(s.value),b["bilibili-notify"].status){case 1:return"loading";case 0:return"not_login";case 5:{const n=b["bilibili-notify"].data;return(async()=>{await m("bilibili-notify/request-cors",n.card.face).then(async l=>{w.value=l}),await m("bilibili-notify/request-cors",n.space.l_img).then(async l=>{h.value=l}),await m("bilibili-notify/request-cors",n.card.vip.label.img_label_uri_hans_static).then(async l=>{C.value=l})})(),"logged_in"}case 2:return q.value=s.value.data,"logging_qr";case 3:return"logging_qr";case 4:return"logging_in";case 7:return"login_failed";case 6:return"login_success"}}),v=()=>{m("bilibili-notify/start-login")},B=()=>{m("bilibili-notify/restart-plugin")},_=n=>n>=1e8?(n/1e8).toFixed(1).replace(/\.0$/,"")+"亿":n>=1e4?(n/1e4).toFixed(1).replace(/\.0$/,"")+"万":n.toString();return(n,t)=>{const l=x("k-comment"),p=x("k-button");return a(),g(F,null,[r.value==="loading"?(a(),d(l,{key:0,type:"warning"},{default:o(()=>[e("p",null,i(s.value.msg),1)]),_:1})):c("v-if",true),r.value==="not_login"?(a(),d(l,{key:1,type:"error"},{default:o(()=>[e("div",E,[e("p",null,i(s.value.msg),1),f(p,{onClick:v},{default:o(()=>[...t[0]||(t[0]=[y("登录",-1)])]),_:1})])]),_:1})):c("v-if",true),r.value==="logging_qr"?(a(),d(l,{key:2,type:"warning"},{default:o(()=>[e("div",M,[e("img",{class:"qrcode",src:q.value,alt:"qrcode"},null,8,O),e("p",null,i(s.value.msg),1)])]),_:1})):c("v-if",true),r.value==="login_failed"?(a(),d(l,{key:3,type:"error"},{default:o(()=>[e("div",R,[e("p",null,i(s.value.msg),1),f(p,{onClick:v},{default:o(()=>[...t[1]||(t[1]=[y("重新登录",-1)])]),_:1})])]),_:1})):c("v-if",true),r.value==="login_success"?(a(),d(l,{key:4,type:"success"},{default:o(()=>[e("div",$,[e("p",null,i(s.value.msg),1),f(p,{onClick:B},{default:o(()=>[...t[2]||(t[2]=[y("重启插件",-1)])]),_:1})])]),_:1})):c("v-if",true),r.value==="logged_in"?(a(),g("div",j,[e("div",D,[e("img",{class:"user-bg",src:h.value,alt:"user-bg"},null,8,G)]),e("div",T,[e("img",{class:"avatar",src:w.value,alt:"avatar"},null,8,z),e("div",A,[e("div",H,[e("span",J,i(s.value.data.card.name),1),s.value.data.card.vip.vipStatus===1?(a(),g("img",{key:0,class:"uvip",src:C.value,alt:"vip"},null,8,K)):c("v-if",true)]),e("span",L,i(s.value.data.card.sign),1)])]),e("div",P,[e("div",null,[t[3]||(t[3]=e("span",null,"关注数",-1)),e("span",null,i(_(s.value.data.card.attention)),1)]),e("div",null,[t[4]||(t[4]=e("span",null,"粉丝数",-1)),e("span",null,i(_(s.value.data.card.fans)),1)]),e("div",null,[t[5]||(t[5]=e("span",null,"获赞数",-1)),e("span",null,i(_(s.value.data.like_num)),1)])]),(a(),g("svg",{onClick:v,class:"logo",t:"1645466458357",viewBox:"0 0 2299 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2663",width:"180",style:{fill:"var(--bew-theme-color)"}},[...t[6]||(t[6]=[e("path",{d:"M1775.840814 322.588002c6.0164 1.002733 53.144869-9.525967 55.150336-6.016401 3.0082 4.5123 24.065601 155.92504 18.550567 156.927774s-44.621635 10.027334-44.621635 10.027334c-3.0082-20.556034-28.577901-147.903173-29.079268-160.938707m75.205003-14.539634l20.556034 162.944174c10.5287-0.501367 53.144869-3.509567 57.155803-4.010934-6.0164-61.668103-16.545101-158.933241-16.545101-158.93324-20.054668-4.010934-41.112069-4.010934-61.166736 0m-40.610702 226.116376s92.752838-23.564234 126.344406-12.0328c17.046467 61.668103 48.131202 407.611118 51.139402 421.649386-21.057401 2.506833-90.246004 8.523234-95.761037 10.027333-4.5123-26.071068-81.72277-403.098818-81.722771-419.643919m343.436183-207.565809c5.515034 1.5041 54.648969-5.013667 55.150335-1.5041 1.002733 12.032801 6.0164 157.42914 0.501367 157.930507s-44.621635 4.010934-44.621635 4.010934c-1.002733-20.054668-12.032801-146.90044-11.030067-160.437341m75.70637-4.010933l4.010933 160.938707c10.5287 0 52.643502 2.506833 57.155803 2.005467-1.002733-61.668103 0-158.933241 0-158.933241-20.054668-3.509567-40.610702-5.013667-61.166736-4.010933m-64.676303 216.089043s94.758304-12.534167 126.845772 2.506833c7.019134 72.196803 6.0164 408.613852 7.019134 422.652119-21.558768 0-90.246004 1.002733-95.761038 2.005467-1.002733-26.071068-39.607968-410.619319-38.103868-427.164419m-220.099977-413.627519c54.648969 278.759879 96.262404 755.058234 97.766504 785.641602 0 0 43.117535 1.002733 91.750105 4.010934C2105.740095 614.383415 2070.644427 134.575493 2071.145794 119.033126c-12.032801-13.536901-126.344406 6.0164-126.344406 6.0164m-120.328005 659.297196c-10.5287-78.213204-290.291313-166.955108-447.720454-138.377206 0 0-19.553301-172.470141-27.073801-339.425248-6.517767-143.390873-1.002733-282.770813 0.501366-305.833681-10.5287-7.5205-123.837572 46.627102-185.004308 69.188603 0 0 73.199537 309.844614 126.344406 952.59671 0 0 84.730971 9.0246 230.12731-19.051934s317.365114-115.815705 302.825481-219.097244m-341.932083 140.88404l-24.566967-176.982441c6.0164-3.0082 156.927774 53.144869 172.971507 63.172203-2.506833 11.030067-148.40454 113.810238-148.40454 113.810238M610.664628 322.588002c6.0164 1.002733 53.144869-9.525967 55.150335-6.016401 3.0082 4.5123 24.065601 155.92504 18.550568 156.927774s-44.621635 10.027334-44.621635 10.027334c-3.0082-20.556034-28.577901-147.903173-29.079268-160.938707m75.205003-14.539634l20.556034 162.944174c10.5287-0.501367 53.144869-3.509567 57.155803-4.010934-6.517767-61.668103-16.545101-158.933241-16.545101-158.93324-20.054668-4.010934-41.112069-4.010934-61.166736 0m-40.610702 226.116376s92.752838-23.564234 126.344406-12.0328c17.046467 61.668103 48.131202 407.611118 51.139402 421.649386-21.057401 2.506833-90.246004 8.523234-95.761037 10.027333-4.5123-26.071068-81.72277-403.098818-81.722771-419.643919m343.436182-207.565809c5.515034 1.5041 54.648969-5.013667 55.150336-1.5041 1.002733 12.032801 6.0164 157.42914 0.501367 157.930507s-44.621635 4.010934-44.621635 4.010934c-1.002733-20.054668-11.531434-146.90044-11.030068-160.437341m75.706371-4.010933l4.010933 160.938707c10.5287 0 52.643502 2.506833 57.155803 2.005467-1.002733-61.668103 0-158.933241 0-158.933241-20.054668-3.509567-40.610702-4.5123-61.166736-4.010933m-64.676303 216.089043s94.758304-12.534167 126.845772 2.506833c7.019134 72.196803 6.0164 408.613852 7.019134 422.652119-21.558768 0-90.246004 1.002733-95.761038 2.005467-0.501367-26.071068-39.607968-410.619319-38.103868-427.164419m-220.099977-413.627519c54.648969 278.759879 96.262404 755.058234 97.766504 785.641602 0 0 43.117535 1.002733 91.750105 4.010934-28.577901-300.318647-63.67357-780.126569-63.172203-796.170303-12.032801-13.035534-126.344406 6.517767-126.344406 6.517767m-120.328005 659.297196c-10.5287-78.213204-290.291313-166.955108-447.720454-138.377206 0 0-19.553301-172.470141-27.073801-339.425248-6.517767-143.390873-1.002733-282.770813 0.501366-305.833681C174.475608-6.308547 61.166736 47.337689 0 69.89919c0 0 73.199537 309.844614 126.344406 952.59671 0 0 84.730971 9.0246 230.12731-19.051934s317.365114-115.815705 302.825481-219.097244m-341.932083 140.88404l-24.566967-176.982441c6.0164-3.0082 156.927774 53.144869 172.971507 63.172203-2.506833 11.030067-148.40454 113.810238-148.40454 113.810238","p-id":"2664"},null,-1)])]))])):c("v-if",true)],64)}}}),X=k=>{k.slot({type:"plugin-details",component:Q,order:0})};export{X as default};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--bew-theme-color: #FB7299}.comment{margin-bottom:1rem}.qrcode{width:10rem;height:10rem}.logged-in{position:relative;display:flex;flex-direction:column;justify-content:space-between;width:30rem;height:8rem;border-radius:1rem;padding:1rem;margin-top:1rem;margin-bottom:1rem;overflow:hidden;box-shadow:0 4px 8px #00000026;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.logged-in .user-bg-wrapper{position:absolute;left:0;top:0;width:100%;height:10rem;overflow:hidden;z-index:-1}.logged-in .user-bg{width:100%;height:100%;object-fit:cover}.logged-in .user-bg-wrapper:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to bottom,#0003,#0000);pointer-events:none}.logged-in .user-bg:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(to top,#00000080,#0000);pointer-events:none;z-index:1}.logged-in .user-info{display:flex;gap:1rem}.logged-in .user-info .avatar{width:5rem;height:5rem;border-radius:50%;border:2px solid white}.logged-in .user-info .name-sign{display:flex;flex-direction:column;margin-top:.3rem;gap:.2rem;color:#fff;text-shadow:3px 3px 5px rgba(0,0,0,.7)}.logged-in .user-info .name-sign .udesc{display:flex;align-items:center;gap:.5rem}.logged-in .user-info .name-sign .udesc .uname{font-weight:700;font-size:1.7rem}.logged-in .user-info .name-sign .udesc .uvip{width:90px}.logged-in .user-info .name-sign .usign{font-weight:700;font-size:.7rem}.logged-in .user-status{display:flex;gap:1rem;margin-top:1rem;color:#fff;font-size:12px;font-weight:700;text-shadow:3px 3px 5px rgba(0,0,0,.7)}.logged-in .user-status div{display:flex;flex-direction:column;align-items:center;gap:2px}.logged-in .logo{position:absolute;right:1rem;bottom:.7rem;width:5rem;box-shadow:0 4px 8px #00000026}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-bilibili-notify",
|
|
3
3
|
"description": "Koishi bilibili notify plugin",
|
|
4
|
-
"version": "3.6.0-alpha.
|
|
4
|
+
"version": "3.6.0-alpha.1",
|
|
5
5
|
"main": "./lib/index.cjs",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"bilibili-notify"
|
|
26
26
|
],
|
|
27
27
|
"scripts": {
|
|
28
|
-
"build": "tsdown"
|
|
28
|
+
"build": "tsdown",
|
|
29
|
+
"client": "yakumo build"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"@node-rs/jieba": "^2.0.1",
|
|
@@ -50,7 +51,8 @@
|
|
|
50
51
|
"@types/qrcode": "^1.5.6",
|
|
51
52
|
"@types/tough-cookie": "^4.0.5",
|
|
52
53
|
"koishi-plugin-puppeteer": "^3.9.0",
|
|
53
|
-
"tsdown": "^0.16.
|
|
54
|
+
"tsdown": "^0.16.8",
|
|
55
|
+
"yakumo": "^1.0.0-beta.21"
|
|
54
56
|
},
|
|
55
57
|
"peerDependencies": {
|
|
56
58
|
"@koishijs/plugin-console": "^5.30.11",
|