podflow 20250401.1__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 +52 -29
- {podflow-20250401.1.dist-info → podflow-20250401.2.dist-info}/METADATA +1 -1
- {podflow-20250401.1.dist-info → podflow-20250401.2.dist-info}/RECORD +6 -6
- {podflow-20250401.1.dist-info → podflow-20250401.2.dist-info}/WHEEL +0 -0
- {podflow-20250401.1.dist-info → podflow-20250401.2.dist-info}/entry_points.txt +0 -0
- {podflow-20250401.1.dist-info → podflow-20250401.2.dist-info}/top_level.txt +0 -0
podflow/templates/index.html
CHANGED
@@ -271,6 +271,52 @@
|
|
271
271
|
</main>
|
272
272
|
<script>
|
273
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
|
+
|
274
320
|
// 缓存常用节点
|
275
321
|
const menu = document.getElementById('menu');
|
276
322
|
const toggleMenuBtn = document.getElementById('toggleMenu');
|
@@ -286,10 +332,12 @@
|
|
286
332
|
const pasteBtn = document.getElementById('pasteBtn');
|
287
333
|
const copyBtn = document.getElementById('copyBtn');
|
288
334
|
const clearBtn = document.getElementById('clearBtn');
|
289
|
-
const qrcodeContainers = document.querySelectorAll('.qrcode-container'); // 获取所有二维码容器
|
290
335
|
|
291
336
|
let pollingTimer = null;
|
292
337
|
|
338
|
+
// 监听 messageArea 内动态新增的二维码容器
|
339
|
+
observeQRCodes(messageArea);
|
340
|
+
|
293
341
|
// 菜单切换函数
|
294
342
|
function toggleMenu() {
|
295
343
|
menu.classList.toggle('hidden');
|
@@ -313,7 +361,7 @@
|
|
313
361
|
}
|
314
362
|
pageId === 'pageMessage' ? startMessagePolling() : stopMessagePolling();
|
315
363
|
if (pageId === 'pageMessage') {
|
316
|
-
generateQRCodes(); //
|
364
|
+
generateQRCodes(); // 页面切换时生成已有二维码
|
317
365
|
}
|
318
366
|
}
|
319
367
|
}
|
@@ -404,7 +452,7 @@
|
|
404
452
|
startMessagePolling();
|
405
453
|
|
406
454
|
// 表单异步提交(获取 Channel-ID)
|
407
|
-
inputForm.addEventListener('submit', function(event) {
|
455
|
+
inputForm && inputForm.addEventListener('submit', function(event) {
|
408
456
|
event.preventDefault();
|
409
457
|
const content = inputOutput.value;
|
410
458
|
fetch('getid', {
|
@@ -487,31 +535,6 @@
|
|
487
535
|
toggleMenuBtn.textContent = '❯';
|
488
536
|
}
|
489
537
|
|
490
|
-
// 生成二维码的函数
|
491
|
-
function generateQRCodes() {
|
492
|
-
const rootStyles = getComputedStyle(document.documentElement);
|
493
|
-
const textColor = rootStyles.getPropertyValue('--text-color');
|
494
|
-
const inputBg = rootStyles.getPropertyValue('--input-bg');
|
495
|
-
|
496
|
-
qrcodeContainers.forEach(container => {
|
497
|
-
const url = container.dataset.url;
|
498
|
-
// 清空容器中可能已有的内容
|
499
|
-
container.innerHTML = '';
|
500
|
-
if (url) {
|
501
|
-
new QRCode(container, {
|
502
|
-
text: url,
|
503
|
-
width: 128,
|
504
|
-
height: 128,
|
505
|
-
colorDark: textColor,
|
506
|
-
colorLight: inputBg,
|
507
|
-
correctLevel: QRCode.CorrectLevel.H
|
508
|
-
});
|
509
|
-
} else {
|
510
|
-
container.textContent = 'URL 未提供';
|
511
|
-
}
|
512
|
-
});
|
513
|
-
}
|
514
|
-
|
515
538
|
// 在页面加载完成后首次生成二维码(如果当前显示的是 Channel 页面)
|
516
539
|
window.addEventListener('load', () => {
|
517
540
|
if (pages.pageChannel.style.display === 'block') {
|
@@ -521,4 +544,4 @@
|
|
521
544
|
})();
|
522
545
|
</script>
|
523
546
|
</body>
|
524
|
-
</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.
|
99
|
-
podflow-20250401.
|
100
|
-
podflow-20250401.
|
101
|
-
podflow-20250401.
|
102
|
-
podflow-20250401.
|
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
|