yz-yuki-plugin 2.0.8-9 → 2.0.9-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/CHANGELOG.md +3 -0
- package/README.md +0 -3
- package/defaultConfig/bilibili/config.yaml +1 -0
- package/defaultConfig/help/help.yaml +0 -9
- package/defaultConfig/weibo/config.yaml +1 -0
- package/lib/apps/bilibili.js +36 -50
- package/lib/apps/weibo.js +19 -105
- package/lib/components/dynamic/Account.js +4 -4
- package/lib/components/dynamic/Content.js +4 -4
- package/lib/components/dynamic/Footer.js +4 -4
- package/lib/components/dynamic/ForwardContent.js +2 -2
- package/lib/components/dynamic/LogoText.js +2 -2
- package/lib/components/dynamic/MainPage.js +2 -2
- package/lib/components/help/Help.js +3 -3
- package/lib/components/loginQrcode/Page.js +2 -2
- package/lib/components/version/Version.js +2 -2
- package/lib/models/bilibili/bilibili.main.get.web.data.js +130 -59
- package/lib/models/bilibili/bilibili.main.query.js +16 -8
- package/lib/models/bilibili/bilibili.main.task.js +24 -7
- package/lib/models/bilibili/bilibili.risk.cookie.js +799 -0
- package/lib/models/weibo/weibo.main.api.js +7 -10
- package/lib/models/weibo/weibo.main.get.web.data.js +127 -69
- package/lib/models/weibo/weibo.risk.cookie.js +940 -0
- package/package.json +5 -2
- package/resources/css/dynamic/MainPage.css +1 -1
- package/lib/models/bilibili/bilibili.main.models.js +0 -493
- package/lib/models/weibo/weibo.main.models.js +0 -347
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -203,9 +203,6 @@ https://m.weibo.cn/u/7643376782 # 7643376782 为崩坏星穹铁道博主uid
|
|
|
203
203
|
| 扫码微博登录(待完成) | app扫码获取登录ck | `#扫码微博登录` |
|
|
204
204
|
| 取消微博登录 | 删除扫码获取的微博CK | `#取消微博登陆` |
|
|
205
205
|
| 查看微博登录信息 | 查看app扫码登录的信息和状态 | `#我的微博登录` |
|
|
206
|
-
| 绑定微博ck | 配置手动本地获取的微博CK,仅限私聊/私信,权限:Master | `#绑定微博本地ck: xxx` |
|
|
207
|
-
| 删除微博ck | 删除手动获取的微博cookie,权限:Master | `#删除微博本地ck` |
|
|
208
|
-
| 查看微博ck | 查看当前启用的微博ck,仅限私聊 | `#我的微博ck` |
|
|
209
206
|
||||
|
|
210
207
|
| **其他指令** | | |
|
|
211
208
|
| 查看版本信息 | 查看版本信息 | `#优纪版本` |
|
|
@@ -85,15 +85,6 @@
|
|
|
85
85
|
- icon: condessence_crystal
|
|
86
86
|
title: '#我的微博登录'
|
|
87
87
|
desc: '查看app扫码登录的信息和状态'
|
|
88
|
-
- icon: romaritime_flower
|
|
89
|
-
title: '#绑定微博本地ck: ***'
|
|
90
|
-
desc: '配置本地获取的微博CK'
|
|
91
|
-
- icon: unfading_silky_grace
|
|
92
|
-
title: '#删除微博本地ck'
|
|
93
|
-
desc: '删除手动获取的微博ck'
|
|
94
|
-
- icon: delightful_encounter
|
|
95
|
-
title: '#我的微博ck'
|
|
96
|
-
desc: '查看当前启用的微博ck,仅限私聊'
|
|
97
88
|
- group: 其他指令
|
|
98
89
|
list:
|
|
99
90
|
- icon: 风车
|
package/lib/apps/bilibili.js
CHANGED
|
@@ -6,7 +6,8 @@ import { BiliQuery } from '../models/bilibili/bilibili.main.query.js';
|
|
|
6
6
|
import { BiliTask } from '../models/bilibili/bilibili.main.task.js';
|
|
7
7
|
import Config from '../utils/config.js';
|
|
8
8
|
import { BilibiliWebDataFetcher } from '../models/bilibili/bilibili.main.get.web.data.js';
|
|
9
|
-
import
|
|
9
|
+
import BiliCookieManager from '../models/bilibili/bilibili.risk.cookie.js';
|
|
10
|
+
import * as tough from 'tough-cookie';
|
|
10
11
|
|
|
11
12
|
const message = new Messages('message');
|
|
12
13
|
let biliPushData = Config.getConfigData('config', 'bilibili', 'push');
|
|
@@ -173,46 +174,13 @@ message.use(async (e) => {
|
|
|
173
174
|
e.reply('未取得bot主人身份,无权限配置B站登录ck');
|
|
174
175
|
}
|
|
175
176
|
else {
|
|
176
|
-
|
|
177
|
-
if (LoginCk) {
|
|
178
|
-
e.reply(`当前已有B站登录ck,请勿重复扫码!\n如需更换,请先删除当前登录再扫码:\n#yuki删除B站登录`);
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
try {
|
|
182
|
-
const token = await applyLoginQRCode(e);
|
|
183
|
-
if (token) {
|
|
184
|
-
let biliLoginCk = await pollLoginQRCode(e, token);
|
|
185
|
-
if (biliLoginCk) {
|
|
186
|
-
if (lodash.trim(biliLoginCk).length != 0) {
|
|
187
|
-
await saveLoginCookie(e, biliLoginCk);
|
|
188
|
-
e.reply(`get bilibili LoginCk:成功!`);
|
|
189
|
-
const result = await postGateway(biliLoginCk); //激活ck
|
|
190
|
-
const { code, data } = await result.data; // 解析校验结果
|
|
191
|
-
switch (code) {
|
|
192
|
-
case 0:
|
|
193
|
-
global?.logger?.mark(`优纪插件:获取biliLoginCK,Gateway校验成功:${JSON.stringify(data)}`);
|
|
194
|
-
break;
|
|
195
|
-
default:
|
|
196
|
-
global?.logger?.mark(`优纪插件:获取biliLoginCK,Gateway校验失败:${JSON.stringify(data)}`);
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
else {
|
|
201
|
-
e.reply(`get bilibili LoginCk:失败X﹏X`);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
catch (Error) {
|
|
207
|
-
global?.logger?.info(`yuki-plugin Login bilibili Failed:${Error}`);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
177
|
+
await BiliCookieManager.biliLogin(e);
|
|
210
178
|
}
|
|
211
179
|
}, [/^(#|\/)(yuki|优纪)?(扫码|添加|ADD|add)(b站|B站|bili|bilibili|哔哩|哔哩哔哩)登录$/]);
|
|
212
180
|
/** 删除登陆的B站ck */
|
|
213
181
|
message.use(async (e) => {
|
|
214
182
|
if (e.isMaster) {
|
|
215
|
-
await exitBiliLogin(e);
|
|
183
|
+
await BiliCookieManager.exitBiliLogin(e);
|
|
216
184
|
await Redis.set('Yz:yuki:bili:loginCookie', '', { EX: 3600 * 24 * 180 });
|
|
217
185
|
e.reply(`扫码登陆的B站cookie已删除~`);
|
|
218
186
|
}
|
|
@@ -223,7 +191,7 @@ message.use(async (e) => {
|
|
|
223
191
|
/** 显示我的B站登录信息 */
|
|
224
192
|
message.use(async (e) => {
|
|
225
193
|
if (e.isMaster) {
|
|
226
|
-
await checkBiliLogin(e);
|
|
194
|
+
await BiliCookieManager.checkBiliLogin(e);
|
|
227
195
|
}
|
|
228
196
|
else {
|
|
229
197
|
e.reply('未取得bot主人身份,无权限查看B站登录状态');
|
|
@@ -266,12 +234,12 @@ message.use(async (e) => {
|
|
|
266
234
|
return;
|
|
267
235
|
}
|
|
268
236
|
//筛选ck
|
|
269
|
-
localBiliCookie = await readSavedCookieItems(localBiliCookie, ['buvid3', 'buvid4', '_uuid', 'SESSDATA', 'DedeUserID', 'DedeUserID__ckMd5', 'bili_jct', 'b_nut', 'b_lsid', 'buvid_fp', 'sid'], false);
|
|
270
|
-
await saveLocalBiliCk(localBiliCookie);
|
|
237
|
+
localBiliCookie = await BiliCookieManager.readSavedCookieItems(localBiliCookie, ['buvid3', 'buvid4', '_uuid', 'SESSDATA', 'DedeUserID', 'DedeUserID__ckMd5', 'bili_jct', 'b_nut', 'b_lsid', 'buvid_fp', 'sid'], false);
|
|
238
|
+
await BiliCookieManager.saveLocalBiliCk(localBiliCookie);
|
|
271
239
|
logger.mark(`${e.logFnc} 保存B站cookie成功 [UID:${param.DedeUserID}]`);
|
|
272
240
|
let uidMsg = [`好耶~绑定B站cookie成功:\n${param.DedeUserID}`];
|
|
273
241
|
await e.reply(uidMsg);
|
|
274
|
-
const result = await postGateway(localBiliCookie); //激活ck
|
|
242
|
+
const result = await BiliCookieManager.postGateway(localBiliCookie); //激活ck
|
|
275
243
|
const { code, data } = await result.data; // 解析校验结果
|
|
276
244
|
switch (code) {
|
|
277
245
|
case 0:
|
|
@@ -290,7 +258,7 @@ message.use(async (e) => {
|
|
|
290
258
|
/** 删除绑定的本地B站ck */
|
|
291
259
|
message.use(async (e) => {
|
|
292
260
|
if (e.isMaster) {
|
|
293
|
-
await saveLocalBiliCk('');
|
|
261
|
+
await BiliCookieManager.saveLocalBiliCk('');
|
|
294
262
|
await e.reply(`手动绑定的B站ck已删除~`);
|
|
295
263
|
}
|
|
296
264
|
else {
|
|
@@ -304,21 +272,40 @@ message.use(async (e) => {
|
|
|
304
272
|
}
|
|
305
273
|
else {
|
|
306
274
|
if (e.isMaster) {
|
|
307
|
-
let { cookie, mark } = await readSyncCookie();
|
|
275
|
+
let { cookie, mark } = await BiliCookieManager.readSyncCookie();
|
|
308
276
|
if (mark === 'localCk') {
|
|
309
277
|
e.reply(`当前使用本地获取的B站cookie:`);
|
|
310
278
|
e.reply(`${cookie}`);
|
|
311
279
|
}
|
|
312
280
|
else if (mark === 'loginCk') {
|
|
281
|
+
let ck = '';
|
|
282
|
+
if (cookie instanceof tough.CookieJar) {
|
|
283
|
+
ck = await new Promise((resolve, reject) => {
|
|
284
|
+
cookie.getCookieString('.bilibili.com', (err, cookieString) => {
|
|
285
|
+
if (err)
|
|
286
|
+
reject(err);
|
|
287
|
+
else
|
|
288
|
+
resolve(cookieString || '');
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
}
|
|
313
292
|
e.reply(`当前使用扫码登录的B站cookie:`);
|
|
314
|
-
e.reply(`${
|
|
293
|
+
e.reply(`${ck}`);
|
|
315
294
|
}
|
|
316
295
|
else if (mark === 'tempCk') {
|
|
296
|
+
let ck = '';
|
|
297
|
+
if (cookie instanceof tough.CookieJar) {
|
|
298
|
+
ck = await new Promise((resolve, reject) => {
|
|
299
|
+
cookie.getCookieString('.bilibili.com', (err, cookieString) => {
|
|
300
|
+
if (err)
|
|
301
|
+
reject(err);
|
|
302
|
+
else
|
|
303
|
+
resolve(cookieString || '');
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
}
|
|
317
307
|
e.reply(`当前使用自动获取的临时B站cookie:`);
|
|
318
|
-
e.reply(`${
|
|
319
|
-
}
|
|
320
|
-
else if (mark == 'ckIsEmpty') {
|
|
321
|
-
e.reply(`当前无可使用的B站cookie。`);
|
|
308
|
+
e.reply(`${ck}`);
|
|
322
309
|
}
|
|
323
310
|
}
|
|
324
311
|
else {
|
|
@@ -329,10 +316,9 @@ message.use(async (e) => {
|
|
|
329
316
|
/** 删除并刷新redis缓存的临时B站ck */
|
|
330
317
|
message.use(async (e) => {
|
|
331
318
|
try {
|
|
332
|
-
const newTempCk = await getNewTempCk();
|
|
319
|
+
const newTempCk = await BiliCookieManager.getNewTempCk();
|
|
333
320
|
if (newTempCk) {
|
|
334
|
-
await
|
|
335
|
-
const result = await postGateway(newTempCk);
|
|
321
|
+
const result = await BiliCookieManager.postGateway(newTempCk);
|
|
336
322
|
const data = await result.data; // 解析校验结果
|
|
337
323
|
if (data?.code !== 0) {
|
|
338
324
|
logger?.error(`优纪插件:tempCK,Gateway校验失败:${JSON.stringify(data)}`);
|
package/lib/apps/weibo.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { WeiboWebDataFetcher } from '../models/weibo/weibo.main.get.web.data.js';
|
|
2
|
-
import { WeiboMainModels } from '../models/weibo/weibo.main.models.js';
|
|
3
2
|
import { WeiboQuery } from '../models/weibo/weibo.main.query.js';
|
|
4
3
|
import { WeiboTask } from '../models/weibo/weibo.main.task.js';
|
|
4
|
+
import WeiboCookieManager from '../models/weibo/weibo.risk.cookie.js';
|
|
5
5
|
import Config from '../utils/config.js';
|
|
6
|
-
import
|
|
7
|
-
import { Messages, Redis } from 'yunzaijs';
|
|
6
|
+
import { Messages } from 'yunzaijs';
|
|
8
7
|
|
|
9
8
|
const message = new Messages('message');
|
|
10
9
|
let weiboPushData = Config.getConfigData('config', 'weibo', 'push');
|
|
@@ -132,36 +131,13 @@ message.use(async (e) => {
|
|
|
132
131
|
e.reply('未取得bot主人身份,无权限配置微博登录ck');
|
|
133
132
|
}
|
|
134
133
|
else {
|
|
135
|
-
|
|
136
|
-
if (LoginCk) {
|
|
137
|
-
e.reply(`当前已有微博登录ck,请勿重复扫码!\n如需更换,请先删除当前登录再扫码:\n#yuki删除微博登录`);
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
try {
|
|
141
|
-
const tokenKey = await WeiboMainModels.applyLoginQRCode(e);
|
|
142
|
-
if (tokenKey && tokenKey.rid) {
|
|
143
|
-
let weiboLoginCk = await WeiboMainModels.pollLoginQRCode(e, tokenKey.qrid, tokenKey.rid, tokenKey.X_CSRF_TOKEN);
|
|
144
|
-
if (weiboLoginCk) {
|
|
145
|
-
if (lodash.trim(weiboLoginCk).length != 0) {
|
|
146
|
-
await WeiboMainModels.saveLoginCookie(e, weiboLoginCk);
|
|
147
|
-
e.reply(`get weibo LoginCk:成功!`);
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
e.reply(`get weibo LoginCk:失败X﹏X`);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
catch (Error) {
|
|
156
|
-
global?.logger?.info(`yuki-plugin Login weibo Failed:${Error}`);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
134
|
+
await WeiboCookieManager.weiboLogin(e);
|
|
159
135
|
}
|
|
160
136
|
}, [/^(#|\/)(yuki|优纪)?(扫码|添加|ADD|add)(微博|weibo|WEIBO)登录$/]);
|
|
161
137
|
/** 删除登陆的微博ck */
|
|
162
138
|
message.use(async (e) => {
|
|
163
139
|
if (e.isMaster) {
|
|
164
|
-
await
|
|
140
|
+
await WeiboCookieManager.resetCookiesAndRedis();
|
|
165
141
|
e.reply(`扫码登陆的微博cookie已删除~`);
|
|
166
142
|
}
|
|
167
143
|
else {
|
|
@@ -171,74 +147,12 @@ message.use(async (e) => {
|
|
|
171
147
|
/** 显示我的微博登录信息 */
|
|
172
148
|
message.use(async (e) => {
|
|
173
149
|
if (e.isMaster) {
|
|
174
|
-
await
|
|
150
|
+
await WeiboCookieManager.checkWeiboLogin(e);
|
|
175
151
|
}
|
|
176
152
|
else {
|
|
177
153
|
e.reply('未取得bot主人身份,无权限查看微博登录状态');
|
|
178
154
|
}
|
|
179
155
|
}, [/^(#|\/)(yuki|优纪)?我的(微博|weibo|WEIBO)登录$/]);
|
|
180
|
-
/** 手动绑定本地获取的微博cookie */
|
|
181
|
-
message.use(async (e) => {
|
|
182
|
-
if (e.isMaster) {
|
|
183
|
-
if (e.isPrivate) {
|
|
184
|
-
await e.reply('请注意账号安全,请手动撤回发送的cookie,并私聊进行添加绑定!');
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
let localWeiboCookie = e.msg.replace(/^(#|\/)(yuki|优纪)?(绑定|添加|ADD|add)(微博|weibo|WEIBO)(ck|CK|cookie|COOKIE)(:|:)?/g, '').trim();
|
|
188
|
-
const XSRF_TOKEN = await WeiboMainModels.readSavedCookieItems(localWeiboCookie, ['XSRF-TOKEN'], false);
|
|
189
|
-
if (XSRF_TOKEN) {
|
|
190
|
-
//筛选ck
|
|
191
|
-
localWeiboCookie = await WeiboMainModels.readSavedCookieItems(localWeiboCookie, ['XSRF-TOKEN', 'SUB', 'SUBP', 'SRF', 'SCF', 'SRT', ' _T_WM', 'M_WEIBOCN_PARAMS', 'SSOLoginState', 'ALF'], false);
|
|
192
|
-
await WeiboMainModels.saveLocalBiliCk(localWeiboCookie);
|
|
193
|
-
logger.mark(`${e.logFnc} 保存微博cookie成功 [XSRF_TOKEN: ${XSRF_TOKEN}]`);
|
|
194
|
-
let uidMsg = [`好耶~绑定微博cookie成功:\nXSRF_TOKEN: ${XSRF_TOKEN}`];
|
|
195
|
-
await e.reply(uidMsg);
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
e.reply('绑定的微博cookie无效,请检查后重新添加!');
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else {
|
|
204
|
-
e.reply('未取得bot主人身份,无权限配置B站登录ck');
|
|
205
|
-
}
|
|
206
|
-
}, [/^^(#|\/)(yuki|优纪)?(绑定|添加|ADD|add)(微博|weibo|WEIBO)本地(ck|CK|cookie|COOKIE)(:|:)?.*$/]);
|
|
207
|
-
/** 删除绑定的本地微博ck */
|
|
208
|
-
message.use(async (e) => {
|
|
209
|
-
if (e.isMaster) {
|
|
210
|
-
await WeiboMainModels.saveLocalBiliCk('');
|
|
211
|
-
await e.reply(`手动绑定的微博ck已删除~`);
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
e.reply('未取得bot主人身份,无权限删除B站登录ck');
|
|
215
|
-
}
|
|
216
|
-
}, [/^(#|\/)(yuki|优纪)?(取消|删除|del|DEL)(微博|weibo|WEIBO)本地(ck|CK|cookie|COOKIE)$/]);
|
|
217
|
-
/** 查看当前正在使用的本地微博ck */
|
|
218
|
-
message.use(async (e) => {
|
|
219
|
-
if (e.isGroup) {
|
|
220
|
-
await e.reply('注意账号安全,请私聊查看叭');
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
if (e.isMaster) {
|
|
224
|
-
let { cookie, mark } = await WeiboMainModels.readSyncCookie();
|
|
225
|
-
if (mark === 'localCk') {
|
|
226
|
-
e.reply(`当前使用本地获取的微博cookie:`);
|
|
227
|
-
e.reply(`${cookie}`);
|
|
228
|
-
}
|
|
229
|
-
else if (mark === 'loginCk') {
|
|
230
|
-
e.reply(`当前使用扫码登录的微博cookie:`);
|
|
231
|
-
e.reply(`${cookie}`);
|
|
232
|
-
}
|
|
233
|
-
else if (mark == 'ckIsEmpty') {
|
|
234
|
-
e.reply(`当前无可使用的微博cookie。`);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
e.reply('未取得bot主人身份,无权限查看当前使用的B站cookie');
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}, [/^(#|\/)(yuki|优纪)?我的(微博|weibo|WEIBO)(ck|CK|cookie|COOKIE)$/]);
|
|
242
156
|
/** 订阅的全部微博推送列表 */
|
|
243
157
|
message.use(async (e) => {
|
|
244
158
|
if (!e.isMaster) {
|
|
@@ -393,23 +307,23 @@ message.use(async (e) => {
|
|
|
393
307
|
return;
|
|
394
308
|
}
|
|
395
309
|
const { ok, data } = res.data || {};
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
let screen_name = infos?.screen_name;
|
|
403
|
-
let followers_count_str = infos?.followers_count_str;
|
|
404
|
-
if (ok !== 1 && !info && !infos) {
|
|
405
|
-
e.reply('惹~没有搜索到该用户捏,\n请换个关键词试试吧~ \nPS:该方法只能搜索到大V');
|
|
310
|
+
const result = data?.cards
|
|
311
|
+
?.filter(card => card?.card_type === 11) // 筛选 card_type = 11
|
|
312
|
+
?.flatMap(card => (Array.isArray(card.card_group) ? card.card_group : [])) // 提取 card_group
|
|
313
|
+
?.filter(item => item?.card_type === 10) || []; // 筛选 card_type = 10
|
|
314
|
+
if (!result) {
|
|
315
|
+
e.reply('惹~没有搜索到相关用户捏,\n请换个关键词试试吧~ \nPS:该方法只能搜索到大V');
|
|
406
316
|
return;
|
|
407
317
|
}
|
|
408
318
|
const messages = [];
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
319
|
+
// 只取前5个结果
|
|
320
|
+
for (const item of result.slice(0, 5)) {
|
|
321
|
+
const userInfo = item?.user || {};
|
|
322
|
+
const id = userInfo.id;
|
|
323
|
+
const screen_name = userInfo.screen_name;
|
|
324
|
+
const followers_count = userInfo.followers_count;
|
|
325
|
+
messages.push(`\n------------------\n博主昵称:${screen_name}\nUID:${id}\n粉丝人数:${followers_count || ''}`);
|
|
326
|
+
}
|
|
413
327
|
e.reply(messages.join('\n'));
|
|
414
328
|
}, [/^(#|\/)(yuki|优纪)?搜索(微博|weibo|WEIBO)(博|bo|BO)主.*$/]);
|
|
415
329
|
const YukiWeibo = message.ok;
|
|
@@ -4,10 +4,10 @@ import { createRequire } from '../../utils/paths.js';
|
|
|
4
4
|
|
|
5
5
|
// Account
|
|
6
6
|
// up账户组件
|
|
7
|
-
const require = createRequire(import.meta.url);
|
|
8
|
-
const Bilibililogo = require('./../../../resources/img/icon/dynamic/bilibili.svg');
|
|
9
|
-
const Weibilogo = require('./../../../resources/img/icon/dynamic/weibo.svg');
|
|
10
|
-
const AccountCss = require('./../../../resources/css/dynamic/Account.css');
|
|
7
|
+
const require$1 = createRequire(import.meta.url);
|
|
8
|
+
const Bilibililogo = require$1('./../../../resources/img/icon/dynamic/bilibili.svg');
|
|
9
|
+
const Weibilogo = require$1('./../../../resources/img/icon/dynamic/weibo.svg');
|
|
10
|
+
const AccountCss = require$1('./../../../resources/css/dynamic/Account.css');
|
|
11
11
|
const Account = ({ data }) => {
|
|
12
12
|
const renderLogo = (logoSrc, className) => React.createElement("img", { src: logoSrc, className: className, alt: "logo" });
|
|
13
13
|
return (React.createElement(React.Fragment, null,
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { createRequire } from '../../utils/paths.js';
|
|
3
3
|
|
|
4
4
|
// DynamicContent.tsx
|
|
5
|
-
const require = createRequire(import.meta.url);
|
|
6
|
-
const ContentBoxGrid4Css = require('./../../../resources/css/dynamic/Content.box.grid.4.css');
|
|
7
|
-
const ContentBoxGrid9Css = require('./../../../resources/css/dynamic/Content.box.grid.9.css');
|
|
8
|
-
const ContentCss = require('./../../../resources/css/dynamic/Content.css');
|
|
5
|
+
const require$1 = createRequire(import.meta.url);
|
|
6
|
+
const ContentBoxGrid4Css = require$1('./../../../resources/css/dynamic/Content.box.grid.4.css');
|
|
7
|
+
const ContentBoxGrid9Css = require$1('./../../../resources/css/dynamic/Content.box.grid.9.css');
|
|
8
|
+
const ContentCss = require$1('./../../../resources/css/dynamic/Content.css');
|
|
9
9
|
const Content = ({ data }) => {
|
|
10
10
|
const picItems = data.pics && (React.createElement("div", { className: "pic-content" }, data.pics.map((item, index) => {
|
|
11
11
|
if (item) {
|
|
@@ -5,12 +5,12 @@ import path from 'path';
|
|
|
5
5
|
import { _paths, createRequire } from '../../utils/paths.js';
|
|
6
6
|
|
|
7
7
|
// Footer.tsx
|
|
8
|
-
const require = createRequire(import.meta.url);
|
|
8
|
+
const require$1 = createRequire(import.meta.url);
|
|
9
9
|
const botVersion = ConfigController.package?.version;
|
|
10
10
|
const yukiPluginVersion = Config.getPackageJsonKey('version', path.join(_paths.pluginPath, 'package.json'));
|
|
11
|
-
const bilibililogo = require('./../../../resources/img/icon/dynamic/bilibili.svg');
|
|
12
|
-
const weibilogo = require('./../../../resources/img/icon/dynamic/weibo.svg');
|
|
13
|
-
const FooterCss = require('./../../../resources/css/dynamic/Footer.css');
|
|
11
|
+
const bilibililogo = require$1('./../../../resources/img/icon/dynamic/bilibili.svg');
|
|
12
|
+
const weibilogo = require$1('./../../../resources/img/icon/dynamic/weibo.svg');
|
|
13
|
+
const FooterCss = require$1('./../../../resources/css/dynamic/Footer.css');
|
|
14
14
|
const Footer = ({ data }) => {
|
|
15
15
|
return (React.createElement(React.Fragment, null,
|
|
16
16
|
React.createElement("link", { rel: "stylesheet", href: FooterCss }),
|
|
@@ -5,8 +5,8 @@ import { createRequire } from '../../utils/paths.js';
|
|
|
5
5
|
|
|
6
6
|
// ForwardContent
|
|
7
7
|
// 转发动态内容组件
|
|
8
|
-
const require = createRequire(import.meta.url);
|
|
9
|
-
const ForwardContentCss = require('./../../../resources/css/dynamic/ForwardContent.css');
|
|
8
|
+
const require$1 = createRequire(import.meta.url);
|
|
9
|
+
const ForwardContentCss = require$1('./../../../resources/css/dynamic/ForwardContent.css');
|
|
10
10
|
const ForwardContent = ({ data }) => (React.createElement(React.Fragment, null,
|
|
11
11
|
React.createElement("link", { rel: "stylesheet", href: ForwardContentCss }),
|
|
12
12
|
React.createElement("div", { className: "orig" },
|
|
@@ -3,8 +3,8 @@ import { createRequire } from '../../utils/paths.js';
|
|
|
3
3
|
|
|
4
4
|
// LogoText
|
|
5
5
|
// Logo 文本组件
|
|
6
|
-
const require = createRequire(import.meta.url);
|
|
7
|
-
const LogoTextCss = require('./../../../resources/css/dynamic/LogoText.css');
|
|
6
|
+
const require$1 = createRequire(import.meta.url);
|
|
7
|
+
const LogoTextCss = require$1('./../../../resources/css/dynamic/LogoText.css');
|
|
8
8
|
const LogoText = ({ data }) => (React.createElement(React.Fragment, null,
|
|
9
9
|
React.createElement("link", { rel: "stylesheet", href: LogoTextCss }),
|
|
10
10
|
data.appName === 'bilibili' && React.createElement("div", { className: "bilibili-logo-text" }, data.category),
|
|
@@ -6,8 +6,8 @@ import Footer from './Footer.js';
|
|
|
6
6
|
import { createRequire } from '../../utils/paths.js';
|
|
7
7
|
|
|
8
8
|
// MainPage.tsx
|
|
9
|
-
const require = createRequire(import.meta.url);
|
|
10
|
-
const MainPageCss = require('./../../../resources/css/dynamic/MainPage.css');
|
|
9
|
+
const require$1 = createRequire(import.meta.url);
|
|
10
|
+
const MainPageCss = require$1('./../../../resources/css/dynamic/MainPage.css');
|
|
11
11
|
function App({ data }) {
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement("link", { rel: "stylesheet", href: MainPageCss }),
|
|
@@ -5,11 +5,11 @@ import path from 'path';
|
|
|
5
5
|
import { _paths, createRequire } from '../../utils/paths.js';
|
|
6
6
|
|
|
7
7
|
//help.tsx
|
|
8
|
-
const require = createRequire(import.meta.url);
|
|
8
|
+
const require$1 = createRequire(import.meta.url);
|
|
9
9
|
const botVersion = ConfigController.package?.version;
|
|
10
10
|
const yukiPluginVersion = Config.getPackageJsonKey('version', path.join(_paths.pluginPath, 'package.json'));
|
|
11
|
-
const HelpCss = require('./../../../resources/css/help/help.css');
|
|
12
|
-
const iconPath = (iconName) => require(`./../../../resources/img/icon/puplic/${iconName}.png`);
|
|
11
|
+
const HelpCss = require$1('./../../../resources/css/help/help.css');
|
|
12
|
+
const iconPath = (iconName) => require$1(`./../../../resources/img/icon/puplic/${iconName}.png`);
|
|
13
13
|
function App({ data }) {
|
|
14
14
|
return (React.createElement(React.Fragment, null,
|
|
15
15
|
React.createElement("link", { rel: "stylesheet", href: HelpCss }),
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { createRequire } from '../../utils/paths.js';
|
|
3
3
|
|
|
4
4
|
// QrcodeLoginPage.tsx
|
|
5
|
-
const require = createRequire(import.meta.url);
|
|
6
|
-
const LoginQrcodeCss = require('./../../../resources/css/loginQrcode/Page.css');
|
|
5
|
+
const require$1 = createRequire(import.meta.url);
|
|
6
|
+
const LoginQrcodeCss = require$1('./../../../resources/css/loginQrcode/Page.css');
|
|
7
7
|
function App({ data }) {
|
|
8
8
|
return (React.createElement(React.Fragment, null,
|
|
9
9
|
React.createElement("link", { rel: "stylesheet", href: LoginQrcodeCss }),
|
|
@@ -4,10 +4,10 @@ import Config from '../../utils/config.js';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { _paths, createRequire } from '../../utils/paths.js';
|
|
6
6
|
|
|
7
|
-
const require = createRequire(import.meta.url);
|
|
7
|
+
const require$1 = createRequire(import.meta.url);
|
|
8
8
|
const botVersion = ConfigController.package?.version;
|
|
9
9
|
const yukiPluginVersion = Config.getPackageJsonKey('version', path.join(_paths.pluginPath, 'package.json'));
|
|
10
|
-
const VersionCss = require('./../../../resources/css/version/version.css');
|
|
10
|
+
const VersionCss = require$1('./../../../resources/css/version/version.css');
|
|
11
11
|
function App({ data }) {
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement("link", { rel: "stylesheet", href: VersionCss }),
|