podflow 20250401__py3-none-any.whl → 20250401.2__py3-none-any.whl
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.
- podflow/templates/index.html +54 -30
- {podflow-20250401.dist-info → podflow-20250401.2.dist-info}/METADATA +1 -1
- {podflow-20250401.dist-info → podflow-20250401.2.dist-info}/RECORD +6 -6
- {podflow-20250401.dist-info → podflow-20250401.2.dist-info}/WHEEL +0 -0
- {podflow-20250401.dist-info → podflow-20250401.2.dist-info}/entry_points.txt +0 -0
- {podflow-20250401.dist-info → podflow-20250401.2.dist-info}/top_level.txt +0 -0
podflow/templates/index.html
CHANGED
@@ -151,7 +151,7 @@
|
|
151
151
|
font-size: 16px;
|
152
152
|
}
|
153
153
|
#messageArea {
|
154
|
-
height:
|
154
|
+
height: 350px;
|
155
155
|
font-size: 12px;
|
156
156
|
}
|
157
157
|
#messageHttp {
|
@@ -219,6 +219,7 @@
|
|
219
219
|
}
|
220
220
|
.message {
|
221
221
|
padding: 0px;
|
222
|
+
margin: 0px;
|
222
223
|
}
|
223
224
|
|
224
225
|
/* 二维码容器样式 */
|
@@ -270,6 +271,52 @@
|
|
270
271
|
</main>
|
271
272
|
<script>
|
272
273
|
(function() {
|
274
|
+
// 生成单个二维码的函数
|
275
|
+
function generateQRCodeForNode(container) {
|
276
|
+
const rootStyles = getComputedStyle(document.documentElement);
|
277
|
+
const textColor = rootStyles.getPropertyValue('--text-color');
|
278
|
+
const inputBg = rootStyles.getPropertyValue('--input-bg');
|
279
|
+
const url = container.dataset.url;
|
280
|
+
container.innerHTML = '';
|
281
|
+
if (url) {
|
282
|
+
new QRCode(container, {
|
283
|
+
text: url,
|
284
|
+
width: 128,
|
285
|
+
height: 128,
|
286
|
+
colorDark: textColor,
|
287
|
+
colorLight: inputBg,
|
288
|
+
correctLevel: QRCode.CorrectLevel.H
|
289
|
+
});
|
290
|
+
} else {
|
291
|
+
container.textContent = 'URL 未提供';
|
292
|
+
}
|
293
|
+
}
|
294
|
+
|
295
|
+
// 为所有存在的二维码容器生成二维码
|
296
|
+
function generateQRCodes() {
|
297
|
+
const containers = document.querySelectorAll('.qrcode-container');
|
298
|
+
containers.forEach(generateQRCodeForNode);
|
299
|
+
}
|
300
|
+
|
301
|
+
// 利用 MutationObserver 动态监听 container 内新增的二维码容器
|
302
|
+
function observeQRCodes(container) {
|
303
|
+
const observer = new MutationObserver((mutationsList) => {
|
304
|
+
mutationsList.forEach(mutation => {
|
305
|
+
mutation.addedNodes.forEach(node => {
|
306
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
307
|
+
if (node.classList.contains('qrcode-container')) {
|
308
|
+
generateQRCodeForNode(node);
|
309
|
+
} else {
|
310
|
+
const childContainers = node.querySelectorAll('.qrcode-container');
|
311
|
+
childContainers.forEach(generateQRCodeForNode);
|
312
|
+
}
|
313
|
+
}
|
314
|
+
});
|
315
|
+
});
|
316
|
+
});
|
317
|
+
observer.observe(container, { childList: true, subtree: true });
|
318
|
+
}
|
319
|
+
|
273
320
|
// 缓存常用节点
|
274
321
|
const menu = document.getElementById('menu');
|
275
322
|
const toggleMenuBtn = document.getElementById('toggleMenu');
|
@@ -285,10 +332,12 @@
|
|
285
332
|
const pasteBtn = document.getElementById('pasteBtn');
|
286
333
|
const copyBtn = document.getElementById('copyBtn');
|
287
334
|
const clearBtn = document.getElementById('clearBtn');
|
288
|
-
const qrcodeContainers = document.querySelectorAll('.qrcode-container'); // 获取所有二维码容器
|
289
335
|
|
290
336
|
let pollingTimer = null;
|
291
337
|
|
338
|
+
// 监听 messageArea 内动态新增的二维码容器
|
339
|
+
observeQRCodes(messageArea);
|
340
|
+
|
292
341
|
// 菜单切换函数
|
293
342
|
function toggleMenu() {
|
294
343
|
menu.classList.toggle('hidden');
|
@@ -312,7 +361,7 @@
|
|
312
361
|
}
|
313
362
|
pageId === 'pageMessage' ? startMessagePolling() : stopMessagePolling();
|
314
363
|
if (pageId === 'pageMessage') {
|
315
|
-
generateQRCodes(); //
|
364
|
+
generateQRCodes(); // 页面切换时生成已有二维码
|
316
365
|
}
|
317
366
|
}
|
318
367
|
}
|
@@ -403,7 +452,7 @@
|
|
403
452
|
startMessagePolling();
|
404
453
|
|
405
454
|
// 表单异步提交(获取 Channel-ID)
|
406
|
-
inputForm.addEventListener('submit', function(event) {
|
455
|
+
inputForm && inputForm.addEventListener('submit', function(event) {
|
407
456
|
event.preventDefault();
|
408
457
|
const content = inputOutput.value;
|
409
458
|
fetch('getid', {
|
@@ -486,31 +535,6 @@
|
|
486
535
|
toggleMenuBtn.textContent = '❯';
|
487
536
|
}
|
488
537
|
|
489
|
-
// 生成二维码的函数
|
490
|
-
function generateQRCodes() {
|
491
|
-
const rootStyles = getComputedStyle(document.documentElement);
|
492
|
-
const textColor = rootStyles.getPropertyValue('--text-color');
|
493
|
-
const inputBg = rootStyles.getPropertyValue('--input-bg');
|
494
|
-
|
495
|
-
qrcodeContainers.forEach(container => {
|
496
|
-
const url = container.dataset.url;
|
497
|
-
// 清空容器中可能已有的内容
|
498
|
-
container.innerHTML = '';
|
499
|
-
if (url) {
|
500
|
-
new QRCode(container, {
|
501
|
-
text: url,
|
502
|
-
width: 128,
|
503
|
-
height: 128,
|
504
|
-
colorDark: textColor,
|
505
|
-
colorLight: inputBg,
|
506
|
-
correctLevel: QRCode.CorrectLevel.H
|
507
|
-
});
|
508
|
-
} else {
|
509
|
-
container.textContent = 'URL 未提供';
|
510
|
-
}
|
511
|
-
});
|
512
|
-
}
|
513
|
-
|
514
538
|
// 在页面加载完成后首次生成二维码(如果当前显示的是 Channel 页面)
|
515
539
|
window.addEventListener('load', () => {
|
516
540
|
if (pages.pageChannel.style.display === 'block') {
|
@@ -520,4 +544,4 @@
|
|
520
544
|
})();
|
521
545
|
</script>
|
522
546
|
</body>
|
523
|
-
</html>
|
547
|
+
</html>
|
@@ -80,7 +80,7 @@ podflow/remove/remove_dir.py,sha256=xQIhrnqnYjMzXjoSWaTvm7JwPYOFTN1muuTPdaLDXpQ,
|
|
80
80
|
podflow/remove/remove_file.py,sha256=8wAJQehs-XBqvu0vPlEme2_tt0FZxc5ELwGMxXA_558,982
|
81
81
|
podflow/repair/__init__.py,sha256=Gpc1i6xiSLodKjjmzH66c_Y1z0HQ9E9CS3p95FRnVFM,45
|
82
82
|
podflow/repair/reverse_log.py,sha256=Wc_vAH0WB-z1fNdWx7FYaVH4caRPtot7tDwDwFhmpz4,1106
|
83
|
-
podflow/templates/index.html,sha256=
|
83
|
+
podflow/templates/index.html,sha256=lThRMfBnTNFTCWbsQU5kaBdbgoH5QEGH5jJBRexlpQk,17324
|
84
84
|
podflow/upload/__init__.py,sha256=AtOSXDrE5EjUe3z-iBd1NTDaH8n_X9qA5WXdBLkONjA,45
|
85
85
|
podflow/upload/add_upload.py,sha256=_2-V0z75Lwu-PUCfMD9HOSxZTB102yZlZW5hSdlHcsc,1432
|
86
86
|
podflow/upload/build_hash.py,sha256=9opa3xLd7nJbGGX5xa3uuKPS6dxlbkAb87ZdEiUxmxI,473
|
@@ -95,8 +95,8 @@ podflow/youtube/__init__.py,sha256=pgXod8gq0IijZxIkPSwgAOcb9JI5rd1mqMomoR7bcJ4,4
|
|
95
95
|
podflow/youtube/build.py,sha256=3LYk_ICVXj9XkE9jZ8jEVI8596xxS_QZkcoIwcBE3Ys,12006
|
96
96
|
podflow/youtube/get.py,sha256=Of7PRgUknhpyW70nvyVAUYVb5KyFViKiBTfH3Y6Mke8,16970
|
97
97
|
podflow/youtube/login.py,sha256=KYl--ya6Z1u0uIcOp9l8i3DIIj9hsYUDH4dtJjI0MLM,1295
|
98
|
-
podflow-20250401.dist-info/METADATA,sha256=
|
99
|
-
podflow-20250401.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
100
|
-
podflow-20250401.dist-info/entry_points.txt,sha256=mn7hD_c_dmpKe3XU0KNekheBvD01LhlJ9htY-Df0j2A,131
|
101
|
-
podflow-20250401.dist-info/top_level.txt,sha256=fUujhhz-RrMI8aGvi-3Ey5y7FQnpOOgoFw9OWM3yLCU,8
|
102
|
-
podflow-20250401.dist-info/RECORD,,
|
98
|
+
podflow-20250401.2.dist-info/METADATA,sha256=ihlPzevp_R0HyFTfzdi684E8Ka_8Q8M3rZPTbbkBkEk,14165
|
99
|
+
podflow-20250401.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
100
|
+
podflow-20250401.2.dist-info/entry_points.txt,sha256=mn7hD_c_dmpKe3XU0KNekheBvD01LhlJ9htY-Df0j2A,131
|
101
|
+
podflow-20250401.2.dist-info/top_level.txt,sha256=fUujhhz-RrMI8aGvi-3Ey5y7FQnpOOgoFw9OWM3yLCU,8
|
102
|
+
podflow-20250401.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|