@sjtdev/koishi-plugin-dota2tracker 1.3.1 → 1.4.0
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/lib/index.js +143 -71
- package/package.json +1 -1
- package/template/match/match_2.ejs +1 -1
- package/template/player/player_1/private.ejs +5 -0
- package/template/player/player_1.ejs +411 -360
|
@@ -6,303 +6,344 @@
|
|
|
6
6
|
<title>Document</title>
|
|
7
7
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" />
|
|
8
8
|
<style>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
9
|
+
html,
|
|
10
|
+
body {
|
|
11
|
+
background-color: black;
|
|
12
|
+
color: white;
|
|
13
|
+
width: 800px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.wrapper > * {
|
|
17
|
+
margin: 5px;
|
|
18
|
+
box-shadow: 0 0 5px #fff;
|
|
19
|
+
width: 790px;
|
|
20
|
+
border-radius: 5px;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
position: relative;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
img {
|
|
26
|
+
width: auto;
|
|
27
|
+
vertical-align: middle;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
p {
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.player {
|
|
35
|
+
display: flex;
|
|
36
|
+
position: relative;
|
|
37
|
+
height: 128px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.player .avatar {
|
|
41
|
+
width: 128px;
|
|
42
|
+
height: 128px;
|
|
43
|
+
position: absolute;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.player .avatar img {
|
|
47
|
+
width: 100%;
|
|
48
|
+
border-radius: 5px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.player .name {
|
|
52
|
+
font-size: 24px;
|
|
53
|
+
}
|
|
54
|
+
.player .name .guild::before {
|
|
55
|
+
content: "[";
|
|
56
|
+
color: #fff;
|
|
57
|
+
}
|
|
58
|
+
.player .name .guild::after {
|
|
59
|
+
content: "]";
|
|
60
|
+
color: #fff;
|
|
61
|
+
}
|
|
62
|
+
.player .name .hero_name::before {
|
|
63
|
+
content: ">";
|
|
64
|
+
color: #fff;
|
|
65
|
+
}
|
|
66
|
+
.player .name .hero_name::after {
|
|
67
|
+
content: "<";
|
|
68
|
+
color: #fff;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.player .info {
|
|
72
|
+
width: 100%;
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
align-items: center;
|
|
76
|
+
/* line-height: 2; */
|
|
77
|
+
justify-content: space-around;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.player .info .guild.Copper {
|
|
81
|
+
color: #b4775f;
|
|
82
|
+
}
|
|
83
|
+
.player .info .guild.Silver {
|
|
84
|
+
color: #9a9593;
|
|
85
|
+
}
|
|
86
|
+
.player .info .guild.Gold {
|
|
87
|
+
color: #bda97f;
|
|
88
|
+
}
|
|
89
|
+
.player .info .guild.Diamond {
|
|
90
|
+
color: #a5cbcf;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.player .info .matches span.win {
|
|
94
|
+
color: #007a00;
|
|
95
|
+
}
|
|
96
|
+
.player .info .matches span.lose {
|
|
97
|
+
color: #b30000;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.player .info .matches span.victory {
|
|
101
|
+
color: lightgreen;
|
|
102
|
+
}
|
|
103
|
+
.player .info .matches span.stomp {
|
|
104
|
+
color: green;
|
|
105
|
+
/* font-size: 8px; */
|
|
106
|
+
}
|
|
107
|
+
.player .info .matches span.fail {
|
|
108
|
+
color: #ff6961;
|
|
109
|
+
}
|
|
110
|
+
.player .info .matches span.stomped {
|
|
111
|
+
color: red;
|
|
112
|
+
/* font-size: 8px; */
|
|
113
|
+
}
|
|
114
|
+
.player .info .matches.blur {
|
|
115
|
+
filter: blur(10px);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.player .rank {
|
|
119
|
+
width: 64px;
|
|
120
|
+
height: 64px;
|
|
121
|
+
flex-grow: 1;
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: 0;
|
|
124
|
+
right: 0;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.player .rank.estimated {
|
|
128
|
+
filter: grayscale(100%);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.player .rank .medal {
|
|
132
|
+
z-index: 1;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.player .rank .star {
|
|
136
|
+
z-index: 2;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.player .rank p {
|
|
140
|
+
z-index: 4;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.player .rank div {
|
|
144
|
+
height: 100%;
|
|
145
|
+
width: 100%;
|
|
146
|
+
top: 0;
|
|
147
|
+
right: 0;
|
|
148
|
+
position: absolute;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.player .rank img {
|
|
152
|
+
top: 0;
|
|
153
|
+
right: 0;
|
|
154
|
+
position: absolute;
|
|
155
|
+
height: 64px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.player .rank p {
|
|
159
|
+
font-size: 12px;
|
|
160
|
+
line-height: 1;
|
|
161
|
+
position: absolute;
|
|
162
|
+
text-align: center;
|
|
163
|
+
width: 64px;
|
|
164
|
+
bottom: 4px;
|
|
165
|
+
right: 0;
|
|
166
|
+
/* background-color: #222; */
|
|
167
|
+
/* border: black 1px solid; */
|
|
168
|
+
box-sizing: border-box;
|
|
169
|
+
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; /* 描边效果 */
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.hero_winrate > *:not(:last-child) {
|
|
173
|
+
/* margin-bottom: 10px; */
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.hero_winrate {
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.hero_winrate .heroes {
|
|
180
|
+
display: grid;
|
|
181
|
+
/* line-height: 2; */
|
|
182
|
+
grid-template-columns: 32px auto auto auto auto auto;
|
|
183
|
+
/* grid-template-rows: repeat(auto-fill, 1fr); */
|
|
184
|
+
justify-content: start;
|
|
185
|
+
align-items: center;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.hero_winrate .heroes .hero {
|
|
189
|
+
width: 100%;
|
|
190
|
+
display: flex;
|
|
191
|
+
align-items: center;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.hero_winrate .heroes img {
|
|
195
|
+
width: 100%;
|
|
196
|
+
/* height: 32px; */
|
|
197
|
+
border-radius: 6px;
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.hero_winrate .heroes span.imp {
|
|
202
|
+
margin: 0 4px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.hero_winrate .heroes span {
|
|
206
|
+
text-align: center;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.hero_winrate .heroes .tip.row {
|
|
210
|
+
grid-column: 1/-1;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.hero_winrate .heroes .win {
|
|
214
|
+
/* color: #000; */
|
|
215
|
+
text-align: right;
|
|
216
|
+
padding-right: 8px;
|
|
217
|
+
background-color: #006400;
|
|
218
|
+
border-radius: 16px 0 0 16px;
|
|
219
|
+
height: 16px;
|
|
220
|
+
justify-self: end;
|
|
221
|
+
}
|
|
222
|
+
.hero_winrate .heroes .lose {
|
|
223
|
+
/* color: #000; */
|
|
224
|
+
text-align: left;
|
|
225
|
+
padding-left: 8px;
|
|
226
|
+
background-color: #8b0000;
|
|
227
|
+
border-radius: 0 16px 16px 0;
|
|
228
|
+
height: 16px;
|
|
229
|
+
justify-self: start;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
table.matches {
|
|
233
|
+
table-layout: fixed;
|
|
234
|
+
width: 100%;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.matches .match.win {
|
|
238
|
+
background-color: #006400;
|
|
239
|
+
}
|
|
240
|
+
.matches .match.lose {
|
|
241
|
+
background-color: #8b0000;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.matches .match td {
|
|
245
|
+
text-align: center;
|
|
246
|
+
/* line-height: 40px; */
|
|
247
|
+
height: 40px;
|
|
248
|
+
overflow: hidden;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.matches .match .player_lane {
|
|
252
|
+
width: 100%;
|
|
253
|
+
height: 100%;
|
|
254
|
+
justify-content: center; /* 水平居中 */
|
|
255
|
+
align-items: center; /* 垂直居中 */
|
|
256
|
+
display: flex;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.matches .match .player_lane:not(.tie) {
|
|
260
|
+
/* background-color: #000; */
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.matches .match .player_lane svg {
|
|
264
|
+
width: 36px;
|
|
265
|
+
height: 36px;
|
|
266
|
+
}
|
|
267
|
+
.player_lane.victory svg path {
|
|
268
|
+
fill: lightgreen;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.player_lane.stomp svg path {
|
|
272
|
+
fill: green;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.player_lane.stomped svg path {
|
|
276
|
+
fill: red;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.plus {
|
|
280
|
+
display: grid;
|
|
281
|
+
grid-template-columns: repeat(4, 1fr);
|
|
282
|
+
gap: 10px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.plus .hero {
|
|
286
|
+
width: 190px;
|
|
287
|
+
height: 190px;
|
|
288
|
+
border-radius: 5px;
|
|
289
|
+
position: relative;
|
|
290
|
+
display: grid;
|
|
291
|
+
grid-template-columns: repeat(2, 1fr);
|
|
292
|
+
grid-template-rows: 118.75px auto;
|
|
293
|
+
justify-items: center;
|
|
294
|
+
align-items: center;
|
|
295
|
+
}
|
|
296
|
+
.plus .hero img {
|
|
297
|
+
width: 100%;
|
|
298
|
+
grid-column: 1/-1;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.plus .level {
|
|
302
|
+
position: absolute;
|
|
303
|
+
width: 50px;
|
|
304
|
+
height: 50px;
|
|
305
|
+
left: calc(50% - 25px);
|
|
306
|
+
top: calc(118.75px - 25px);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.plus .level span {
|
|
310
|
+
position: absolute;
|
|
311
|
+
width: 100%;
|
|
312
|
+
text-align: center;
|
|
313
|
+
left: 0;
|
|
314
|
+
bottom: 18px;
|
|
315
|
+
font-size: 14px;
|
|
316
|
+
text-shadow: -1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000, 1px 1px 1px #000;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.blur-overlay {
|
|
320
|
+
position: absolute;
|
|
321
|
+
top: 0;
|
|
322
|
+
left: 0;
|
|
323
|
+
width: 100%;
|
|
324
|
+
height: 100%;
|
|
325
|
+
background: #00000050;
|
|
326
|
+
backdrop-filter: blur(10px);
|
|
327
|
+
display: flex;
|
|
328
|
+
flex-direction: column;
|
|
329
|
+
justify-content: center;
|
|
330
|
+
align-items: center;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.lock-icon {
|
|
334
|
+
font-size: 24px;
|
|
335
|
+
margin-bottom: 10px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.lock-text {
|
|
339
|
+
font-size: 18px;
|
|
340
|
+
font-weight: bold;
|
|
341
|
+
}
|
|
342
|
+
.lock-sub {
|
|
343
|
+
line-height: 3;
|
|
344
|
+
font-size: 14px;
|
|
345
|
+
color: #aaa;
|
|
346
|
+
}
|
|
306
347
|
</style>
|
|
307
348
|
</head>
|
|
308
349
|
<body>
|
|
@@ -395,7 +436,6 @@
|
|
|
395
436
|
const pixelOfPerMatchInNear = (heroesCountPixels / (highestCountsNear?.winCount + highestCountsNear?.loseCount ?? 1)) * nearAdjustmentFactor;
|
|
396
437
|
|
|
397
438
|
player.positionPerformance=[];
|
|
398
|
-
// 瞎j8定义的各位置代表物品,以后看情况调整
|
|
399
439
|
const positionIcons = ["damage","nuke","armor","speed","healing"];
|
|
400
440
|
for (let index = 0; index < 5; index++) {
|
|
401
441
|
let currentPositionMatches = player.matches.filter(match=>match.players.find(innerPlayer=>player.steamAccount.id==innerPlayer.steamAccount.id).position == ("POSITION_"+(index+1)))
|
|
@@ -427,9 +467,9 @@
|
|
|
427
467
|
</p>
|
|
428
468
|
<p class="matches">
|
|
429
469
|
<%=$t("dota2tracker.template.match_count_")%><%=player.matchCount%> (<span class="win"><%=player.winCount%></span>/<span class="lose"><%=player.matchCount - player.winCount%></span>)
|
|
430
|
-
<%=$t("dota2tracker.template.winrate_")%><span
|
|
470
|
+
<%=$t("dota2tracker.template.winrate_")%><span <%-`style="color:${utils.winRateColor(player.winCount / player.matchCount)};"`%>><%=((player.winCount / player.matchCount) * 100).toFixed(2)%>%</span>
|
|
431
471
|
</p>
|
|
432
|
-
<p class="matches">
|
|
472
|
+
<p class="matches<%- player.steamAccount.isAnonymous ? " blur" : "" %>">
|
|
433
473
|
<span><%-$t("dota2tracker.template.last25matches_")%>
|
|
434
474
|
<span class="win"><%-nearWinCount%></span>/
|
|
435
475
|
<span class="lose"><%-nearMatchCount - nearWinCount%></span>
|
|
@@ -437,19 +477,19 @@
|
|
|
437
477
|
<span><%-$t("dota2tracker.template.winrate_")%>
|
|
438
478
|
<span <%-`style="color:${utils.winRateColor(nearWinCount / nearMatchCount)};"`%>><%-((nearWinCount / nearMatchCount) * 100).toFixed(2)%>%</span>
|
|
439
479
|
</span>
|
|
440
|
-
<span><%-$t("dota2tracker.template.imp_")%><%-(player.performance?.imp > 0 ? "+" : "") + player.performance?.imp%></span>
|
|
480
|
+
<span><%-$t("dota2tracker.template.imp_")%><%-player.steamAccount.isAnonymous?"?":((player.performance?.imp > 0 ? "+" : "") + player.performance?.imp)%></span>
|
|
441
481
|
</p>
|
|
442
|
-
<p class="matches">
|
|
482
|
+
<p class="matches<%- player.steamAccount.isAnonymous ? " blur" : "" %>">
|
|
443
483
|
<span><%-$t("dota2tracker.template.lane")%>
|
|
444
484
|
<span class="victory"><%-outcomeCounts.victory + outcomeCounts.stomp%>(<span class="stomp"><%-outcomeCounts.stomp%></span>)</span>-<span class="tie"><%-outcomeCounts.tie%></span>-<span class="fail"><%-outcomeCounts.fail + outcomeCounts.stomped%>(<span class="stomped"><%-outcomeCounts.stomped%></span>)</span>
|
|
445
485
|
</span>
|
|
446
486
|
<span><%-$t("dota2tracker.template.lane_advantage_rate_")%>
|
|
447
|
-
<span <%-`style="color:${utils.winRateColor((outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie / 2) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie + outcomeCounts.fail + outcomeCounts.stomped))};"`%>><%-(((outcomeCounts.victory + outcomeCounts.stomp) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.fail + outcomeCounts.stomped)) * 100).toFixed(2)%>%</span>
|
|
487
|
+
<span <%-`style="color:${utils.winRateColor((outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie / 2) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.tie + outcomeCounts.fail + outcomeCounts.stomped))};"`%>><%-player.steamAccount.isAnonymous?"?":(((outcomeCounts.victory + outcomeCounts.stomp) / (outcomeCounts.victory + outcomeCounts.stomp + outcomeCounts.fail + outcomeCounts.stomped)) * 100).toFixed(2)%>%</span>
|
|
448
488
|
</span>
|
|
449
489
|
</p>
|
|
450
490
|
</div>
|
|
451
|
-
<div class="rank">
|
|
452
|
-
<img class="medal" src="<%-utils.getImageUrl('medal_' +(player.inTop100??player.rank.medal))%>" alt="" />
|
|
491
|
+
<div class="rank<%= player.isEstimatedRank ? " estimated" : "" %>">
|
|
492
|
+
<img class="medal" src="<%-utils.getImageUrl('medal_' +(player.rank.inTop100??player.rank.medal))%>" alt="" />
|
|
453
493
|
<img class="star" src="<%-utils.getImageUrl('star_' + player.rank.star)%>" alt="" />
|
|
454
494
|
<p><%-player.steamAccount.seasonLeaderboardRank ?? ""%></p>
|
|
455
495
|
</div>
|
|
@@ -500,63 +540,71 @@
|
|
|
500
540
|
<span class="win" style="${position.winCount == 0 ? "visibility:hidden;" : ""}width: ${position.winCount * pixelOfPerMatchInPosition}px">${position.winCount}</span>
|
|
501
541
|
<span class="lose" style="${position.matchCount - position.winCount == 0 ? "visibility:hidden;" : ""}width: ${(position.matchCount - position.winCount) * pixelOfPerMatchInPosition}px">${position.matchCount - position.winCount}</span>`).join("") %>
|
|
502
542
|
</div>
|
|
543
|
+
<% if (player.steamAccount.isAnonymous) { %>
|
|
544
|
+
<%- include("player_1/private", {$t, player}) %>
|
|
545
|
+
<% } %>
|
|
503
546
|
</div>
|
|
504
|
-
<%- Math.abs(player.streak) > 1 ?
|
|
547
|
+
<%- Math.abs(player.streak) > 1 && !player.steamAccount.isAnonymous ?
|
|
505
548
|
`<div class="streak" style="box-shadow:none;color:${utils.winRateColor((player.streak + 10) / 20)};">${Math.abs(player.streak) + (player.streak > 0 ? $t("dota2tracker.template.winning_streak") : $t("dota2tracker.template.losing_streak"))}</div>`:"" %>
|
|
506
|
-
<
|
|
507
|
-
<
|
|
508
|
-
<
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
<
|
|
520
|
-
<
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
.
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
<
|
|
542
|
-
|
|
543
|
-
<
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
<
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
549
|
+
<div>
|
|
550
|
+
<table class="matches">
|
|
551
|
+
<colgroup>
|
|
552
|
+
<col style="width: auto" />
|
|
553
|
+
<col style="width: auto" />
|
|
554
|
+
<col style="width: 40px" />
|
|
555
|
+
<col style="width: auto" />
|
|
556
|
+
<col style="width: 40px" />
|
|
557
|
+
<col style="width: auto" />
|
|
558
|
+
<col style="width: auto" />
|
|
559
|
+
<col style="width: auto" />
|
|
560
|
+
<col style="width: 40px" />
|
|
561
|
+
</colgroup>
|
|
562
|
+
<thead>
|
|
563
|
+
<tr>
|
|
564
|
+
<th><%= $t("dota2tracker.template.id") %></th>
|
|
565
|
+
<th><%= $t("dota2tracker.template.mode") %></th>
|
|
566
|
+
<th><%= $t("dota2tracker.template.hero") %></th>
|
|
567
|
+
<th><%= $t("dota2tracker.template.kda_kc") %></th>
|
|
568
|
+
<th><%= $t("dota2tracker.template.lane") %></th>
|
|
569
|
+
<th><%= $t("dota2tracker.template.time") %></th>
|
|
570
|
+
<th><%= $t("dota2tracker.template.duration") %></th>
|
|
571
|
+
<th><%= $t("dota2tracker.template.imp") %></th>
|
|
572
|
+
<th><%= $t("dota2tracker.template.rank") %></th>
|
|
573
|
+
</tr>
|
|
574
|
+
</thead>
|
|
575
|
+
<tbody>
|
|
576
|
+
<%- player.matches.map((match) => {
|
|
577
|
+
const innerPlayer = match.players.find(innerPlayer => player.steamAccount.id == innerPlayer.steamAccount.id);
|
|
578
|
+
innerPlayer.teamKillsCount = match.parsedDateTime ?
|
|
579
|
+
(match[(innerPlayer.isRadiant ? "radiant" : "dire") + "Kills"]?.reduce((acc, cva) => acc + cva, 0) ?? 0) :
|
|
580
|
+
match.players
|
|
581
|
+
.filter(p => p.isRadiant === innerPlayer.isRadiant)
|
|
582
|
+
.reduce((k, p) => k + p.kills, 0);
|
|
583
|
+
return `
|
|
584
|
+
<tr class="match ${match.didRadiantWin == innerPlayer.isRadiant ? "win" : "lose"}">
|
|
585
|
+
<td>${match.parsedDateTime ? match.id : `<p>${match.id}</p><p>${$t("dota2tracker.template.un_parsed")}</p>`}</td>
|
|
586
|
+
<td>
|
|
587
|
+
<p>${$t("dota2tracker.template.lobby_types."+match.lobbyType) || match.lobbyType}</p>
|
|
588
|
+
<p>${$t("dota2tracker.template.game_modes."+match.gameMode) || match.gameMode}</p>
|
|
589
|
+
</td>
|
|
590
|
+
<td><img alt="" src="${utils.getImageUrl(innerPlayer.hero.shortName, ImageType.HeroIcons)}" /></td>
|
|
591
|
+
<td style="line-height: 20px">
|
|
592
|
+
<p>${((innerPlayer.kills + innerPlayer.assists) / Math.max(1, innerPlayer.deaths)).toFixed(2)} (${(match.parsedDateTime?"":"≈")+((((innerPlayer.kills + innerPlayer.assists) /
|
|
593
|
+
innerPlayer.teamKillsCount) * 100)?.toFixed(0))}%)</p>
|
|
594
|
+
<p>${innerPlayer.kills}/${innerPlayer.deaths}/${innerPlayer.assists}</p>
|
|
595
|
+
</td>
|
|
596
|
+
<td><div class="player_lane ${match.laneResult}">${laneSVG[match.laneResult]}</div></td>
|
|
597
|
+
<td style="line-height: 20px">${moment(new Date(match.startDateTime * 1000)).format("YYYY-MM-DD HH:mm:ss").slice(2)}</td>
|
|
598
|
+
<td>${utils.sec2time(match.durationSeconds)}</td>
|
|
599
|
+
<td>${innerPlayer.imp != null ? ((innerPlayer.imp >= 0 ? "+" : "") + innerPlayer.imp) : "?"}</td>
|
|
600
|
+
<td><img class="medal" src="${utils.getImageUrl("medal_" + match.rank?.toString().split("")[0])}" style="width: 100%" /></td>
|
|
601
|
+
</tr>`}).join("")%>
|
|
602
|
+
</tbody>
|
|
603
|
+
</table>
|
|
604
|
+
<% if (player.steamAccount.isAnonymous) { %>
|
|
605
|
+
<%- include("player_1/private", {$t, player}) %>
|
|
606
|
+
<% } %>
|
|
607
|
+
</div>
|
|
560
608
|
<div class="plus">
|
|
561
609
|
<%- player.dotaPlus.map((hero) => `
|
|
562
610
|
<div class="hero">
|
|
@@ -565,6 +613,9 @@
|
|
|
565
613
|
<span>${((hero.winCount / hero.matchCount) * 100).toFixed(2)}%</span>
|
|
566
614
|
<span>${hero.matchCount}</span>
|
|
567
615
|
</div>`).join("") %>
|
|
616
|
+
<% if (player.steamAccount.isAnonymous) { %>
|
|
617
|
+
<%- include("player_1/private", {$t, player}) %>
|
|
618
|
+
<% } %>
|
|
568
619
|
</div>
|
|
569
620
|
</div>
|
|
570
621
|
</body>
|