koishi-plugin-ets2-tools-tmp 3.1.1 → 3.1.2
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.
|
@@ -67,6 +67,7 @@ module.exports = async (ctx, cfg, session, tmpId) => {
|
|
|
67
67
|
let playerMapInfo = await truckyAppApi.online(ctx.http, tmpId);
|
|
68
68
|
// 拼接数据
|
|
69
69
|
let data = {};
|
|
70
|
+
data.showAvatar = cfg.tmpQuery?.showAvatar !== false;
|
|
70
71
|
data.tmpId = playerInfo.data.tmpId;
|
|
71
72
|
data.name = playerInfo.data.name;
|
|
72
73
|
data.steamId = playerInfo.data.steamId;
|
package/lib/resource/query.html
CHANGED
|
@@ -81,6 +81,11 @@
|
|
|
81
81
|
.avatar-wrapper {
|
|
82
82
|
position: relative;
|
|
83
83
|
flex-shrink: 0;
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.avatar-wrapper.show {
|
|
88
|
+
display: block;
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
.avatar {
|
|
@@ -244,16 +249,21 @@
|
|
|
244
249
|
color: #94a3b8;
|
|
245
250
|
display: flex;
|
|
246
251
|
align-items: center;
|
|
247
|
-
gap:
|
|
248
|
-
flex-shrink:
|
|
252
|
+
gap: 4px;
|
|
253
|
+
flex-shrink: 1;
|
|
254
|
+
white-space: nowrap;
|
|
255
|
+
min-width: 0;
|
|
249
256
|
}
|
|
250
257
|
|
|
251
258
|
.info-value {
|
|
252
259
|
font-size: 13px;
|
|
253
260
|
color: #e2e8f0;
|
|
254
261
|
text-align: right;
|
|
255
|
-
|
|
256
|
-
|
|
262
|
+
white-space: nowrap;
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
text-overflow: ellipsis;
|
|
265
|
+
max-width: 70%;
|
|
266
|
+
margin-left: 8px;
|
|
257
267
|
}
|
|
258
268
|
|
|
259
269
|
.info-value.gold {
|
|
@@ -478,11 +488,11 @@
|
|
|
478
488
|
<div class="section-title">🚚 车队信息</div>
|
|
479
489
|
<div class="info-row">
|
|
480
490
|
<div class="info-label">🚚 所属车队</div>
|
|
481
|
-
<div class="info-value gold" id="tmp-vtc-name"></div>
|
|
491
|
+
<div class="info-value gold" id="tmp-vtc-name" style="white-space:normal;overflow:visible;text-overflow:unset;max-width:75%;"></div>
|
|
482
492
|
</div>
|
|
483
493
|
<div class="info-row">
|
|
484
494
|
<div class="info-label">🚚 车队角色</div>
|
|
485
|
-
<div class="info-value" id="tmp-vtc-role"></div>
|
|
495
|
+
<div class="info-value" id="tmp-vtc-role" style="white-space:normal;overflow:visible;text-overflow:unset;max-width:75%;"></div>
|
|
486
496
|
</div>
|
|
487
497
|
<div id="vtc-history-container"></div>
|
|
488
498
|
<div class="info-row" id="reward-points-row" style="display:none;">
|
|
@@ -606,7 +616,10 @@
|
|
|
606
616
|
|
|
607
617
|
function init(data) {
|
|
608
618
|
// Header
|
|
609
|
-
|
|
619
|
+
if (data.showAvatar) {
|
|
620
|
+
document.querySelector('.avatar-wrapper').classList.add('show');
|
|
621
|
+
document.getElementById('tmp-avatar').src = data.avatarUrl;
|
|
622
|
+
}
|
|
610
623
|
document.getElementById('tmp-name').innerText = data.name;
|
|
611
624
|
document.getElementById('tmp-id').innerText = 'TMP#' + data.tmpId;
|
|
612
625
|
document.getElementById('group-badge').innerText = data.groupName;
|