@sjtdev/koishi-plugin-dota2tracker 1.2.11 → 1.2.13
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 +8 -0
- package/lib/index.js +6 -1
- package/package.json +1 -1
- package/template/match/match_1.ejs +28 -9
- package/template/match/match_2.ejs +39 -21
package/changelog.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -207,10 +207,14 @@ function MATCH_INFO(matchId) {
|
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
constants {
|
|
210
|
-
facets {
|
|
210
|
+
facets (language: S_CHINESE) {
|
|
211
|
+
name
|
|
211
212
|
id
|
|
212
213
|
color
|
|
213
214
|
icon
|
|
215
|
+
language {
|
|
216
|
+
displayName
|
|
217
|
+
}
|
|
214
218
|
}
|
|
215
219
|
}
|
|
216
220
|
}
|
|
@@ -784,6 +788,7 @@ function getFormattedMatchData(data) {
|
|
|
784
788
|
}
|
|
785
789
|
if (player.variant != null) {
|
|
786
790
|
player.facet = constants.facets.find((facet) => facet.id == player.hero.facets[player.variant - 1].facetId);
|
|
791
|
+
player.facet.name = player.facet.language.displayName ?? player.facet.name;
|
|
787
792
|
}
|
|
788
793
|
});
|
|
789
794
|
let ComparisonMode;
|
package/package.json
CHANGED
|
@@ -146,7 +146,6 @@
|
|
|
146
146
|
height: 63px;
|
|
147
147
|
position: relative;
|
|
148
148
|
border-radius: 4px;
|
|
149
|
-
overflow: hidden;
|
|
150
149
|
flex-grow: 0;
|
|
151
150
|
}
|
|
152
151
|
|
|
@@ -267,9 +266,8 @@
|
|
|
267
266
|
}
|
|
268
267
|
|
|
269
268
|
.hero .player_avatar .level {
|
|
270
|
-
|
|
269
|
+
right: 2px;
|
|
271
270
|
bottom: 1px;
|
|
272
|
-
right: auto;
|
|
273
271
|
font-size: 12px;
|
|
274
272
|
color: rgba(255, 255, 255, 1);
|
|
275
273
|
/* color: #cccccc; */
|
|
@@ -277,19 +275,38 @@
|
|
|
277
275
|
}
|
|
278
276
|
|
|
279
277
|
.hero .player_avatar .facet {
|
|
280
|
-
width:
|
|
278
|
+
width: 112px;
|
|
281
279
|
height: 24px;
|
|
282
280
|
position: absolute;
|
|
283
|
-
|
|
284
|
-
bottom:
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
justify-content: center;
|
|
281
|
+
left: 0;
|
|
282
|
+
bottom: -24px;
|
|
283
|
+
display: grid;
|
|
284
|
+
grid-template-columns: 24px auto;
|
|
288
285
|
align-items: center;
|
|
289
286
|
}
|
|
290
287
|
.hero .player_avatar .facet img{
|
|
288
|
+
padding: 3px;
|
|
291
289
|
width: 18px;
|
|
292
290
|
height: 18px;
|
|
291
|
+
background-color: #4444;
|
|
292
|
+
}
|
|
293
|
+
.hero .player_avatar .facet span{
|
|
294
|
+
display: grid;
|
|
295
|
+
place-items: center;
|
|
296
|
+
align-items: center;
|
|
297
|
+
justify-content: center;
|
|
298
|
+
height: 100%;
|
|
299
|
+
width: 88px;
|
|
300
|
+
position: relative;
|
|
301
|
+
}
|
|
302
|
+
.hero .player_avatar .facet span > * {
|
|
303
|
+
box-sizing: border-box;
|
|
304
|
+
padding: 0 4px;
|
|
305
|
+
max-width: 100%;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
text-overflow: ellipsis;
|
|
308
|
+
white-space: nowrap;
|
|
309
|
+
font-size: 14px;
|
|
293
310
|
}
|
|
294
311
|
.hero > .player_avatar > .facet.Red {
|
|
295
312
|
background: linear-gradient(to right, #9f3c3c, #4a2026);
|
|
@@ -454,6 +471,7 @@
|
|
|
454
471
|
margin-bottom: 4px;
|
|
455
472
|
padding-left: 4px;
|
|
456
473
|
height: 24px;
|
|
474
|
+
margin-left: 120px;
|
|
457
475
|
/* text-shadow: -1px -1px 2px #aaa, 1px -1px 2px #aaa, -1px 1px 2px #aaa, 1px 1px 2px #aaa; */ /*描边效果 */
|
|
458
476
|
}
|
|
459
477
|
|
|
@@ -764,6 +782,7 @@
|
|
|
764
782
|
${player.facet ? `
|
|
765
783
|
<div class="facet ${player.facet.color}">
|
|
766
784
|
<img src="${utils.getImageUrl(player.facet.icon, ImageType.IconsFacets)}">
|
|
785
|
+
<span><p style="font-size: ${player.facet.name.length > 7 ? 10 : player.facet.name.length > 5 ? 12 : 14}px;">${player.facet.name}</p></span>
|
|
767
786
|
</div>` : ""}
|
|
768
787
|
</div>
|
|
769
788
|
<div class="player_info">
|
|
@@ -231,38 +231,55 @@
|
|
|
231
231
|
content: "IV";
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.player > .
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
left: 0;
|
|
238
|
-
bottom: 0;
|
|
239
|
-
width: 16px;
|
|
234
|
+
.player > .facet {
|
|
235
|
+
color: #fff;
|
|
236
|
+
width: 100%;
|
|
240
237
|
height: 16px;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
grid-row: 4;
|
|
239
|
+
grid-column: 1;
|
|
240
|
+
display: grid;
|
|
241
|
+
grid-template-columns: 16px auto;
|
|
244
242
|
z-index: 1;
|
|
243
|
+
position: relative;
|
|
244
|
+
top: -5px;
|
|
245
245
|
}
|
|
246
|
-
.player > .
|
|
246
|
+
.player > .facet > img {
|
|
247
|
+
padding: 2px;
|
|
247
248
|
width: 12px;
|
|
248
249
|
height: 12px;
|
|
250
|
+
background-color: #4444;
|
|
249
251
|
}
|
|
250
|
-
.player > .
|
|
252
|
+
.player > .facet > span {
|
|
253
|
+
padding: 0 2px;
|
|
254
|
+
line-height: 1;
|
|
255
|
+
display: grid;
|
|
256
|
+
place-items: center;
|
|
257
|
+
align-items: center;
|
|
258
|
+
justify-content: center;
|
|
259
|
+
height: 100%;
|
|
260
|
+
}
|
|
261
|
+
.player > .facet > span > * {
|
|
262
|
+
max-width: 100%;
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
text-overflow: ellipsis;
|
|
265
|
+
white-space: nowrap;
|
|
266
|
+
}
|
|
267
|
+
.player > .facet.Red {
|
|
251
268
|
background: linear-gradient(to right, #9f3c3c, #4a2026);
|
|
252
269
|
}
|
|
253
|
-
.player > .
|
|
270
|
+
.player > .facet.Yellow {
|
|
254
271
|
background: linear-gradient(to right, #c8a45c, #6f3d21);
|
|
255
272
|
}
|
|
256
|
-
.player > .
|
|
273
|
+
.player > .facet.Green {
|
|
257
274
|
background: linear-gradient(to right, #a2b23e, #2d5a18);
|
|
258
275
|
}
|
|
259
|
-
.player > .
|
|
276
|
+
.player > .facet.Blue {
|
|
260
277
|
background: linear-gradient(to right, #547ea6, #2a385e);
|
|
261
278
|
}
|
|
262
|
-
.player > .
|
|
279
|
+
.player > .facet.Purple {
|
|
263
280
|
background: linear-gradient(to right, #675cae, #261c44);
|
|
264
281
|
}
|
|
265
|
-
.player > .
|
|
282
|
+
.player > .facet.Gray {
|
|
266
283
|
background: linear-gradient(to right, #adb6be, #4e5557);
|
|
267
284
|
}
|
|
268
285
|
|
|
@@ -288,7 +305,7 @@
|
|
|
288
305
|
|
|
289
306
|
.player > .titles {
|
|
290
307
|
grid-row: 4;
|
|
291
|
-
grid-column:
|
|
308
|
+
grid-column: 3;
|
|
292
309
|
/* text-shadow: 1px 1px 0 #333; 设置阴影颜色及偏移 */
|
|
293
310
|
}
|
|
294
311
|
.player > .titles > span {
|
|
@@ -522,14 +539,15 @@
|
|
|
522
539
|
<div class="player ${player.team}${player.hero.id==80?" bear":""}" style="order: ${player.team==="radiant"?1:100};">
|
|
523
540
|
<div class="hero_avatar row-1${player.partyId != null ? " party_" + match.party[player.partyId] : ""}">
|
|
524
541
|
<img src="${utils.getImageUrl(player.hero.shortName, ImageType.Heroes)}" />
|
|
525
|
-
${player.facet ? `
|
|
526
|
-
<div class="facet ${player.facet.color}">
|
|
527
|
-
<img src="${utils.getImageUrl(player.facet.icon, ImageType.IconsFacets)}">
|
|
528
|
-
</div>` : ""}
|
|
529
542
|
<p class="level">${player.level}</p>
|
|
530
543
|
<p class="party_line"></p>
|
|
531
544
|
<p class="party_mark"></p>
|
|
532
545
|
</div>
|
|
546
|
+
${player.facet ? `
|
|
547
|
+
<div class="facet ${player.facet.color}">
|
|
548
|
+
<img src="${utils.getImageUrl(player.facet.icon, ImageType.IconsFacets)}">
|
|
549
|
+
<span style="font-size: ${player.facet.name?.length>4?8:11}px;"><p>${player.facet.name??""}</p></span>
|
|
550
|
+
</div>` : ""}
|
|
533
551
|
<div class="rank">
|
|
534
552
|
<img
|
|
535
553
|
src="${utils.getImageUrl('medal_' +(player.inTop100??player.rank.medal))}"
|