koishi-plugin-ets2-tools-tmp 3.4.3 → 3.4.5

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.
@@ -0,0 +1,706 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Version Update</title>
6
+ <style>
7
+ * { margin: 0; padding: 0; box-sizing: border-box; }
8
+
9
+ body {
10
+ font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
11
+ background: #06060b;
12
+ -webkit-font-smoothing: antialiased;
13
+ }
14
+
15
+ #container {
16
+ width: 560px;
17
+ background: #0a0a12;
18
+ position: relative;
19
+ overflow: hidden;
20
+ padding-bottom: 16px;
21
+ }
22
+
23
+ /* ===== 背景:网格 + 光晕 ===== */
24
+ .grid-bg {
25
+ position: absolute;
26
+ inset: 0;
27
+ background-image:
28
+ linear-gradient(rgba(0, 200, 255, 0.03) 1px, transparent 1px),
29
+ linear-gradient(90deg, rgba(0, 200, 255, 0.03) 1px, transparent 1px);
30
+ background-size: 26px 26px;
31
+ pointer-events: none;
32
+ z-index: 0;
33
+ }
34
+
35
+ .glow-top {
36
+ position: absolute;
37
+ top: -180px;
38
+ left: 50%;
39
+ transform: translateX(-50%);
40
+ width: 620px;
41
+ height: 360px;
42
+ background: radial-gradient(ellipse at center, rgba(0, 200, 255, 0.16) 0%, rgba(0, 200, 255, 0.04) 45%, transparent 70%);
43
+ pointer-events: none;
44
+ z-index: 0;
45
+ }
46
+
47
+ .scan-line {
48
+ position: absolute;
49
+ top: 0; left: 0; right: 0;
50
+ height: 2px;
51
+ background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.35), transparent);
52
+ pointer-events: none;
53
+ z-index: 3;
54
+ }
55
+
56
+ /* ===== 顶部 ===== */
57
+ .header {
58
+ position: relative;
59
+ z-index: 2;
60
+ padding: 22px 26px 18px;
61
+ display: flex;
62
+ align-items: center;
63
+ gap: 14px;
64
+ border-bottom: 1px solid rgba(0, 200, 255, 0.1);
65
+ background: linear-gradient(180deg, rgba(0, 200, 255, 0.07) 0%, transparent 100%);
66
+ }
67
+
68
+ .header-badge {
69
+ width: 46px;
70
+ height: 46px;
71
+ flex-shrink: 0;
72
+ border-radius: 13px;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ font-size: 23px;
77
+ background: linear-gradient(145deg, rgba(0, 200, 255, 0.22), rgba(0, 200, 255, 0.06));
78
+ border: 1px solid rgba(0, 200, 255, 0.32);
79
+ box-shadow: 0 0 18px rgba(0, 200, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
80
+ }
81
+
82
+ .header-text { flex: 1; min-width: 0; }
83
+
84
+ .header-title {
85
+ font-size: 20px;
86
+ font-weight: 800;
87
+ color: #eaf6ff;
88
+ letter-spacing: 1.5px;
89
+ line-height: 1.25;
90
+ }
91
+
92
+ .header-title em {
93
+ font-style: normal;
94
+ color: #00c8ff;
95
+ text-shadow: 0 0 14px rgba(0, 200, 255, 0.55);
96
+ }
97
+
98
+ .header-sub {
99
+ margin-top: 3px;
100
+ font-size: 10px;
101
+ letter-spacing: 3.2px;
102
+ color: #3d5570;
103
+ text-transform: uppercase;
104
+ }
105
+
106
+ .stage-tag {
107
+ flex-shrink: 0;
108
+ font-size: 11px;
109
+ font-weight: 700;
110
+ letter-spacing: 1px;
111
+ padding: 6px 12px;
112
+ border-radius: 20px;
113
+ color: #ffb545;
114
+ background: rgba(255, 181, 69, 0.1);
115
+ border: 1px solid rgba(255, 181, 69, 0.34);
116
+ box-shadow: 0 0 14px rgba(255, 181, 69, 0.16);
117
+ }
118
+
119
+ .stage-tag:empty { display: none; }
120
+
121
+ /* ===== 版本对比 ===== */
122
+ .hero {
123
+ position: relative;
124
+ z-index: 2;
125
+ margin: 20px 20px 0;
126
+ padding: 22px 20px 20px;
127
+ border-radius: 16px;
128
+ background: linear-gradient(160deg, rgba(0, 200, 255, 0.06) 0%, rgba(0, 200, 255, 0.012) 55%, rgba(0, 255, 136, 0.03) 100%);
129
+ border: 1px solid rgba(0, 200, 255, 0.14);
130
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(0, 200, 255, 0.08);
131
+ }
132
+
133
+ /* 四角装饰 */
134
+ .hero::before,
135
+ .hero::after {
136
+ content: '';
137
+ position: absolute;
138
+ width: 16px;
139
+ height: 16px;
140
+ border: 1.5px solid rgba(0, 200, 255, 0.5);
141
+ }
142
+ .hero::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 16px; }
143
+ .hero::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 16px; }
144
+
145
+ .hero-caption {
146
+ text-align: center;
147
+ font-size: 10px;
148
+ letter-spacing: 3px;
149
+ color: #3d5570;
150
+ text-transform: uppercase;
151
+ margin-bottom: 16px;
152
+ }
153
+
154
+ .versus {
155
+ display: flex;
156
+ align-items: center;
157
+ justify-content: center;
158
+ gap: 16px;
159
+ }
160
+
161
+ .ver {
162
+ flex: 1;
163
+ min-width: 0;
164
+ text-align: center;
165
+ padding: 14px 8px 12px;
166
+ border-radius: 12px;
167
+ }
168
+
169
+ .ver-label {
170
+ font-size: 11px;
171
+ letter-spacing: 1.6px;
172
+ margin-bottom: 9px;
173
+ font-weight: 600;
174
+ }
175
+
176
+ .ver-value {
177
+ font-weight: 800;
178
+ letter-spacing: 0.5px;
179
+ font-variant-numeric: tabular-nums;
180
+ white-space: nowrap;
181
+ }
182
+
183
+ /* 旧版本 */
184
+ .ver.old {
185
+ background: rgba(255, 255, 255, 0.018);
186
+ border: 1px solid rgba(255, 255, 255, 0.06);
187
+ }
188
+ .ver.old .ver-label { color: #5a6878; }
189
+ .ver.old .ver-value {
190
+ font-size: 24px;
191
+ color: #8b98a8;
192
+ text-decoration: line-through;
193
+ text-decoration-color: rgba(255, 92, 92, 0.6);
194
+ text-decoration-thickness: 1.5px;
195
+ }
196
+
197
+ /* 新版本 */
198
+ .ver.new-ver {
199
+ background: linear-gradient(160deg, rgba(0, 200, 255, 0.16) 0%, rgba(0, 255, 136, 0.05) 100%);
200
+ border: 1px solid rgba(0, 200, 255, 0.45);
201
+ box-shadow: 0 0 24px rgba(0, 200, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
202
+ position: relative;
203
+ }
204
+ .ver.new-ver .ver-label { color: #7fe3ff; }
205
+ .ver.new-ver .ver-value {
206
+ font-size: 32px;
207
+ color: #ffffff;
208
+ text-shadow: 0 0 16px rgba(0, 200, 255, 0.7), 0 0 34px rgba(0, 200, 255, 0.35);
209
+ }
210
+
211
+ .new-flag {
212
+ position: absolute;
213
+ top: -9px;
214
+ right: -7px;
215
+ font-size: 9px;
216
+ font-weight: 800;
217
+ letter-spacing: 1.4px;
218
+ padding: 3px 8px;
219
+ border-radius: 9px;
220
+ color: #04121a;
221
+ background: linear-gradient(135deg, #00ff88, #00c8ff);
222
+ box-shadow: 0 0 14px rgba(0, 255, 136, 0.5);
223
+ }
224
+
225
+ /* 中间箭头 */
226
+ .arrow {
227
+ flex-shrink: 0;
228
+ width: 44px;
229
+ display: flex;
230
+ align-items: center;
231
+ justify-content: center;
232
+ }
233
+ .arrow svg { display: block; filter: drop-shadow(0 0 7px rgba(0, 200, 255, 0.55)); }
234
+
235
+ /* ===== 信息区 ===== */
236
+ .info {
237
+ position: relative;
238
+ z-index: 2;
239
+ margin: 16px 20px 0;
240
+ display: flex;
241
+ flex-direction: column;
242
+ gap: 8px;
243
+ }
244
+
245
+ .info-row {
246
+ display: flex;
247
+ align-items: center;
248
+ gap: 12px;
249
+ padding: 11px 14px;
250
+ border-radius: 11px;
251
+ background: rgba(255, 255, 255, 0.022);
252
+ border: 1px solid rgba(255, 255, 255, 0.055);
253
+ }
254
+
255
+ .info-icon {
256
+ width: 30px;
257
+ height: 30px;
258
+ flex-shrink: 0;
259
+ border-radius: 9px;
260
+ display: flex;
261
+ align-items: center;
262
+ justify-content: center;
263
+ font-size: 15px;
264
+ background: rgba(0, 200, 255, 0.1);
265
+ border: 1px solid rgba(0, 200, 255, 0.2);
266
+ }
267
+
268
+ .info-key {
269
+ font-size: 12px;
270
+ color: #5d7089;
271
+ letter-spacing: 0.6px;
272
+ flex-shrink: 0;
273
+ min-width: 96px;
274
+ }
275
+
276
+ .info-val {
277
+ margin-left: auto;
278
+ font-size: 14px;
279
+ font-weight: 700;
280
+ color: #cfe6f7;
281
+ font-variant-numeric: tabular-nums;
282
+ letter-spacing: 0.4px;
283
+ white-space: nowrap;
284
+ display: flex;
285
+ align-items: center;
286
+ gap: 7px;
287
+ }
288
+
289
+ .info-row.hl .info-val { color: #00ff9d; }
290
+
291
+ /* 支持版本「旧 → 新」对比 */
292
+ .v-from {
293
+ font-size: 12.5px;
294
+ font-weight: 600;
295
+ color: #7d8b9c;
296
+ text-decoration: line-through;
297
+ text-decoration-color: rgba(255, 92, 92, 0.5);
298
+ text-decoration-thickness: 1px;
299
+ }
300
+
301
+ .v-to {
302
+ color: #00ff9d;
303
+ text-shadow: 0 0 10px rgba(0, 255, 157, 0.38);
304
+ }
305
+
306
+ .v-same { color: #9fb3c6; font-weight: 600; }
307
+
308
+ .v-none { color: #3d5570; }
309
+
310
+ .mini-arrow { display: block; flex-shrink: 0; }
311
+
312
+ .tag-chg {
313
+ font-size: 10px;
314
+ font-weight: 800;
315
+ letter-spacing: 0.6px;
316
+ padding: 2px 7px;
317
+ border-radius: 8px;
318
+ color: #04121a;
319
+ background: linear-gradient(135deg, #00ff88, #00c8ff);
320
+ box-shadow: 0 0 10px rgba(0, 255, 136, 0.45);
321
+ }
322
+
323
+ .tag-same {
324
+ font-size: 10px;
325
+ letter-spacing: 0.6px;
326
+ padding: 2px 7px;
327
+ border-radius: 8px;
328
+ color: #5d7089;
329
+ background: rgba(255, 255, 255, 0.03);
330
+ border: 1px solid rgba(255, 255, 255, 0.07);
331
+ }
332
+
333
+ /* 支持版本有变化 → 整行高亮 + 左侧强调条 */
334
+ .info-row.changed {
335
+ position: relative;
336
+ border-color: rgba(0, 255, 157, 0.32);
337
+ background: rgba(0, 255, 157, 0.05);
338
+ box-shadow: inset 0 0 20px rgba(0, 255, 157, 0.07);
339
+ }
340
+
341
+ .info-row.changed::before {
342
+ content: '';
343
+ position: absolute;
344
+ left: 0;
345
+ top: 7px;
346
+ bottom: 7px;
347
+ width: 3px;
348
+ border-radius: 0 3px 3px 0;
349
+ background: linear-gradient(180deg, #00ff88, #00c8ff);
350
+ box-shadow: 0 0 10px rgba(0, 255, 136, 0.6);
351
+ }
352
+
353
+ /* ===== 更新文件列表 ===== */
354
+ .files {
355
+ position: relative;
356
+ z-index: 2;
357
+ margin: 14px 22px 0;
358
+ padding: 13px 15px;
359
+ border-radius: 11px;
360
+ background: rgba(255, 255, 255, 0.022);
361
+ border: 1px solid rgba(255, 255, 255, 0.055);
362
+ }
363
+
364
+ .files-head {
365
+ display: flex;
366
+ align-items: center;
367
+ gap: 8px;
368
+ margin-bottom: 9px;
369
+ }
370
+
371
+ .files-icon {
372
+ width: 26px;
373
+ height: 26px;
374
+ flex-shrink: 0;
375
+ border-radius: 8px;
376
+ display: flex;
377
+ align-items: center;
378
+ justify-content: center;
379
+ font-size: 13px;
380
+ background: rgba(0, 200, 255, 0.1);
381
+ border: 1px solid rgba(0, 200, 255, 0.2);
382
+ }
383
+
384
+ .files-title {
385
+ font-size: 12px;
386
+ color: #5d7089;
387
+ letter-spacing: 0.6px;
388
+ }
389
+
390
+ .files-count {
391
+ margin-left: auto;
392
+ font-size: 12px;
393
+ font-weight: 800;
394
+ color: #00c8ff;
395
+ font-variant-numeric: tabular-nums;
396
+ }
397
+
398
+ .files-note {
399
+ margin-bottom: 8px;
400
+ font-size: 10.5px;
401
+ line-height: 1.5;
402
+ color: #7d8b9c;
403
+ }
404
+
405
+ .file-list {
406
+ display: flex;
407
+ flex-direction: column;
408
+ gap: 5px;
409
+ max-height: 190px;
410
+ overflow: hidden;
411
+ }
412
+
413
+ .file-row {
414
+ display: flex;
415
+ align-items: center;
416
+ gap: 8px;
417
+ font-size: 11.5px;
418
+ font-family: 'Cascadia Mono', 'Consolas', monospace;
419
+ color: #9fb3c6;
420
+ line-height: 1.45;
421
+ }
422
+
423
+ .file-kind {
424
+ flex-shrink: 0;
425
+ width: 34px;
426
+ text-align: center;
427
+ font-size: 9px;
428
+ font-weight: 800;
429
+ letter-spacing: 0.4px;
430
+ padding: 1px 0;
431
+ border-radius: 5px;
432
+ font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
433
+ }
434
+
435
+ .file-kind.k-modified { color: #04121a; background: linear-gradient(135deg, #00ff88, #00c8ff); }
436
+ .file-kind.k-added { color: #04121a; background: #00ff9d; }
437
+ .file-kind.k-removed { color: #ffd9d9; background: rgba(255, 92, 92, 0.28); }
438
+ .file-kind.k-unknown { color: #5d7089; background: rgba(255, 255, 255, 0.05); }
439
+
440
+ .file-path {
441
+ overflow: hidden;
442
+ text-overflow: ellipsis;
443
+ white-space: nowrap;
444
+ }
445
+
446
+ .files-more {
447
+ margin-top: 7px;
448
+ font-size: 10.5px;
449
+ color: #5d7089;
450
+ }
451
+
452
+ .files-empty {
453
+ font-size: 12px;
454
+ color: #5d7089;
455
+ }
456
+
457
+ /* ===== 附加文本 ===== */
458
+ .extra {
459
+ position: relative;
460
+ z-index: 2;
461
+ margin: 12px 22px 0;
462
+ padding: 11px 14px;
463
+ border-radius: 11px;
464
+ font-size: 12px;
465
+ line-height: 1.6;
466
+ color: #b9d4e8;
467
+ white-space: pre-wrap;
468
+ word-break: break-word;
469
+ background: rgba(0, 200, 255, 0.05);
470
+ border: 1px solid rgba(0, 200, 255, 0.16);
471
+ }
472
+
473
+ .extra:empty { display: none; }
474
+
475
+ /* ===== 底部 ===== */
476
+ .footer {
477
+ position: relative;
478
+ z-index: 2;
479
+ margin-top: 16px;
480
+ padding: 0 22px;
481
+ text-align: center;
482
+ }
483
+
484
+ .footer-line {
485
+ height: 1px;
486
+ background: linear-gradient(90deg, transparent, rgba(0, 200, 255, 0.2), transparent);
487
+ margin-bottom: 10px;
488
+ }
489
+
490
+ .footer-text {
491
+ font-size: 9.5px;
492
+ letter-spacing: 2.6px;
493
+ color: #22303e;
494
+ text-transform: uppercase;
495
+ }
496
+ </style>
497
+ </head>
498
+ <body>
499
+ <div id="container">
500
+ <div class="grid-bg"></div>
501
+ <div class="glow-top"></div>
502
+ <div class="scan-line"></div>
503
+
504
+ <div class="header">
505
+ <div class="header-badge">📢</div>
506
+ <div class="header-text">
507
+ <div class="header-title">TRUCKERS<em>MP</em> 版本更新</div>
508
+ <div class="header-sub">Version Update Notice</div>
509
+ </div>
510
+ <div class="stage-tag" id="stage-tag"></div>
511
+ </div>
512
+
513
+ <div class="hero">
514
+ <div class="hero-caption">Version Changed</div>
515
+ <div class="versus">
516
+ <div class="ver old">
517
+ <div class="ver-label">旧版本</div>
518
+ <div class="ver-value" id="old-name">-</div>
519
+ </div>
520
+ <div class="arrow">
521
+ <svg width="52" height="26" viewBox="0 0 52 26" xmlns="http://www.w3.org/2000/svg">
522
+ <defs>
523
+ <!-- 注意:水平线的 objectBoundingBox 高度为 0,渐变会塌缩 → 必须用 userSpaceOnUse -->
524
+ <linearGradient id="arw" gradientUnits="userSpaceOnUse" x1="3" y1="13" x2="32" y2="13">
525
+ <stop offset="0%" stop-color="rgba(0,200,255,0.35)"/>
526
+ <stop offset="100%" stop-color="#00c8ff"/>
527
+ </linearGradient>
528
+ </defs>
529
+ <path d="M3 13 H32" stroke="url(#arw)" stroke-width="3" stroke-linecap="round"/>
530
+ <path d="M29 5 L39 13 L29 21" fill="none" stroke="#00ff88" stroke-width="3"
531
+ stroke-linecap="round" stroke-linejoin="round"/>
532
+ </svg>
533
+ </div>
534
+ <div class="ver new-ver">
535
+ <div class="new-flag">NEW</div>
536
+ <div class="ver-label">新版本</div>
537
+ <div class="ver-value" id="new-name">-</div>
538
+ </div>
539
+ </div>
540
+ </div>
541
+
542
+ <div class="info" id="info">
543
+ <div class="info-row">
544
+ <div class="info-icon">🕒</div>
545
+ <div class="info-key">更新时间</div>
546
+ <div class="info-val" id="time">-</div>
547
+ </div>
548
+ <div class="info-row hl" id="ets-row">
549
+ <div class="info-icon">🚛</div>
550
+ <div class="info-key">欧卡支持版本</div>
551
+ <div class="info-val" id="ets-ver"></div>
552
+ </div>
553
+ <div class="info-row hl" id="ats-row">
554
+ <div class="info-icon">🚚</div>
555
+ <div class="info-key">美卡支持版本</div>
556
+ <div class="info-val" id="ats-ver"></div>
557
+ </div>
558
+ </div>
559
+
560
+ <div class="files" id="files-block">
561
+ <div class="files-head">
562
+ <div class="files-icon">📦</div>
563
+ <div class="files-title">更新文件</div>
564
+ <div class="files-count" id="files-count"></div>
565
+ </div>
566
+ <div class="files-note" id="files-note"></div>
567
+ <div class="file-list" id="file-list"></div>
568
+ <div class="files-more" id="files-more"></div>
569
+ </div>
570
+
571
+ <div class="extra" id="extra"></div>
572
+
573
+ <div class="footer">
574
+ <div class="footer-line"></div>
575
+ <div class="footer-text">TruckersMP · Version Monitor</div>
576
+ </div>
577
+ </div>
578
+
579
+ <script>
580
+ /* 「旧 → 新」小箭头(纯实色描边,避开水平线渐变塌缩的坑) */
581
+ var MINI_ARROW =
582
+ '<svg class="mini-arrow" width="19" height="10" viewBox="0 0 19 10" xmlns="http://www.w3.org/2000/svg">' +
583
+ '<path d="M1 5 H12" stroke="#00c8ff" stroke-width="1.6" stroke-linecap="round"/>' +
584
+ '<path d="M10.5 1.5 L15 5 L10.5 8.5" fill="none" stroke="#00ff88" stroke-width="1.6"' +
585
+ ' stroke-linecap="round" stroke-linejoin="round"/></svg>';
586
+
587
+ function esc(s) {
588
+ return String(s == null ? '' : s)
589
+ .replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
590
+ .replace(/"/g, '&quot;').replace(/'/g, '&#39;');
591
+ }
592
+
593
+ function setText(id, value) {
594
+ var el = document.getElementById(id);
595
+ if (el) el.textContent = (value === undefined || value === null || value === '') ? '-' : String(value);
596
+ }
597
+
598
+ /**
599
+ * 渲染一条「游戏支持版本」:
600
+ * - 新旧都拿到且不同 → 旧(删除线) → 新(绿) + 「已更新」标签,整行高亮
601
+ * - 相同 / 拿不到旧值 → 只显示当前版本 + 「未变化」标签
602
+ */
603
+ function setGameVersion(valId, rowId, oldV, newV) {
604
+ var el = document.getElementById(valId);
605
+ var row = document.getElementById(rowId);
606
+ if (!el) return;
607
+ var hasOld = oldV !== undefined && oldV !== null && oldV !== '';
608
+ var hasNew = newV !== undefined && newV !== null && newV !== '';
609
+ var changed = hasOld && hasNew && String(oldV) !== String(newV);
610
+
611
+ if (changed) {
612
+ if (row) row.classList.add('changed');
613
+ el.innerHTML =
614
+ '<span class="v-from">' + esc(oldV) + '</span>' +
615
+ MINI_ARROW +
616
+ '<span class="v-to">' + esc(newV) + '</span>' +
617
+ '<span class="tag-chg">已更新</span>';
618
+ return;
619
+ }
620
+
621
+ if (row) row.classList.remove('changed');
622
+ if (!hasNew && !hasOld) {
623
+ el.innerHTML = '<span class="v-none">-</span>';
624
+ return;
625
+ }
626
+ el.innerHTML =
627
+ '<span class="v-same">' + esc(hasNew ? newV : oldV) + '</span>' +
628
+ '<span class="tag-same">未变化</span>';
629
+ }
630
+
631
+ /* 变化类型 → 展示用标签与样式类 */
632
+ var KIND_LABEL = { modified: '更新', added: '新增', removed: '移除', unknown: '文件' };
633
+
634
+ /* 卡片里最多列多少个文件(超出的用「等共 N 个」收尾,避免卡片无限长) */
635
+ var MAX_FILES_IN_CARD = 12;
636
+
637
+ /**
638
+ * 渲染更新文件区块。
639
+ * - filesUnavailable → 清单查询失败(不能显示成「没有变化」)
640
+ * - files 为空 → 确实没有文件变化
641
+ */
642
+ function setChangedFiles(files, snapshotMissing, unavailable) {
643
+ var list = Array.isArray(files) ? files : [];
644
+ var listEl = document.getElementById('file-list');
645
+ var countEl = document.getElementById('files-count');
646
+ var noteEl = document.getElementById('files-note');
647
+ var moreEl = document.getElementById('files-more');
648
+ if (!listEl) return;
649
+
650
+ if (countEl) countEl.textContent = list.length > 0 ? list.length + ' 个' : '';
651
+
652
+ if (unavailable) {
653
+ if (noteEl) noteEl.textContent = '';
654
+ if (moreEl) moreEl.textContent = '';
655
+ listEl.innerHTML = '<div class="files-empty">文件清单获取失败,无法比对变化</div>';
656
+ return;
657
+ }
658
+
659
+ if (list.length === 0) {
660
+ if (noteEl) noteEl.textContent = '';
661
+ if (moreEl) moreEl.textContent = '';
662
+ listEl.innerHTML = '<div class="files-empty">未检测到文件变化</div>';
663
+ return;
664
+ }
665
+
666
+ if (noteEl) {
667
+ noteEl.textContent = snapshotMissing
668
+ ? '未留存上次清单,以下为当前版本完整文件列表'
669
+ : '以下文件相对上次检查发生了 MD5 变化';
670
+ }
671
+
672
+ var shown = list.slice(0, MAX_FILES_IN_CARD);
673
+ listEl.innerHTML = shown.map(function (f) {
674
+ var kind = KIND_LABEL[f.kind] ? f.kind : 'unknown';
675
+ return '<div class="file-row">' +
676
+ '<span class="file-kind k-' + kind + '">' + KIND_LABEL[kind] + '</span>' +
677
+ '<span class="file-path" title="' + esc(f.path) + '">' + esc(f.path) + '</span>' +
678
+ '</div>';
679
+ }).join('');
680
+
681
+ if (moreEl) {
682
+ moreEl.textContent = list.length > shown.length
683
+ ? '… 等共 ' + list.length + ' 个文件'
684
+ : '';
685
+ }
686
+ }
687
+
688
+ function setData(data) {
689
+ data = data || {};
690
+ setText('old-name', data.oldName);
691
+ setText('new-name', data.newName);
692
+ setText('time', data.time);
693
+ setText('stage-tag', data.stage);
694
+ setGameVersion('ets-ver', 'ets-row', data.etsOld, data.etsNew);
695
+ setGameVersion('ats-ver', 'ats-row', data.atsOld, data.atsNew);
696
+ setChangedFiles(data.files, data.filesSnapshotMissing, data.filesUnavailable);
697
+
698
+ var extraEl = document.getElementById('extra');
699
+ if (extraEl) {
700
+ var extra = data.extraText == null ? '' : String(data.extraText).trim();
701
+ extraEl.textContent = extra;
702
+ }
703
+ }
704
+ </script>
705
+ </body>
706
+ </html>