@sjtdev/koishi-plugin-dota2tracker 2.1.0 → 2.2.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sjtdev/koishi-plugin-dota2tracker",
3
3
  "description": "koishi插件-追踪群友的DOTA2对局",
4
- "version": "2.1.0",
4
+ "version": "2.2.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -39,13 +39,17 @@
39
39
  "zh": "追踪群友的DOTA2对局",
40
40
  "en": "Track Friends' DOTA2 Matches"
41
41
  },
42
- "required": [
43
- "http",
44
- "database",
45
- "puppeteer",
46
- "cron",
47
- "cache"
48
- ],
42
+ "service": {
43
+ "required": [
44
+ "http",
45
+ "database",
46
+ "puppeteer",
47
+ "cache"
48
+ ],
49
+ "optional": [
50
+ "cron"
51
+ ]
52
+ },
49
53
  "locales": [
50
54
  "zh-CN",
51
55
  "en-US"
@@ -15,8 +15,10 @@
15
15
  <span class="time text-sm"><%= match.durationTime %></span>
16
16
  <span class="score dire text-3xl"><%= match.dire.killsCount %></span>
17
17
  </p>
18
- <img class="star absolute w-[64px] bottom-[10px] left-1/2 -translate-x-1/2" src="<%= getImageUrl('star_' + (match.rank ? match.rank.toString().split('')[1] : '')) %>">
19
- <img class="medal absolute w-[64px] bottom-[10px] left-1/2 -translate-x-1/2" src="<%= getImageUrl('medal_' + (match.rank ? match.rank.toString().split('')[0] : '')) %>">
18
+ <div class="rank absolute w-[64px] h-[64px] bottom-[10px] left-1/2 -translate-x-1/2<%- match.odParsed && match.lobbyType !== "RANKED" ? ` grayscale` : "" %>">
19
+ <img class="star absolute w-full" src="<%= getImageUrl('star_' + (match.rank ? match.rank.toString().split('')[1] : '')) %>">
20
+ <img class="medal absolute w-full" src="<%= getImageUrl('medal_' + (match.rank ? match.rank.toString().split('')[0] : '')) %>">
21
+ </div>
20
22
  </div>
21
23
  <div class="flag w-[100px] h-full flex justify-center items-end bg-cover <%= match.didRadiantWin ? 'grayscale' : "" %>" style="background-image: url('<%= getImageUrl("flag_dire") %>')"><%= !match.didRadiantWin ? $t("dota2tracker.template.won") : "" %></div>
22
24
  </div>
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
4
  @layer theme {
@@ -153,6 +153,9 @@
153
153
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
154
154
  padding-block: 0;
155
155
  }
156
+ ::-webkit-calendar-picker-indicator {
157
+ line-height: 1;
158
+ }
156
159
  :-moz-ui-invalid {
157
160
  box-shadow: none;
158
161
  }
@@ -282,6 +285,9 @@
282
285
  .h-\[44px\] {
283
286
  height: 44px;
284
287
  }
288
+ .h-\[64px\] {
289
+ height: 64px;
290
+ }
285
291
  .h-\[100px\] {
286
292
  height: 100px;
287
293
  }
@@ -41,6 +41,10 @@ nav > div.match_id > p.fail::after {
41
41
  content: "※<%= $t('dota2tracker.template.analysis_incomplete') %>";
42
42
  color: #ffb400;
43
43
  }
44
+ nav > div.match_id > p.opendota::after {
45
+ content: "※<%= $t('dota2tracker.template.analysis_by_opendota') %>";
46
+ color: #34a39a;
47
+ }
44
48
 
45
49
  nav > .rank {
46
50
  width: 48px;
@@ -30,7 +30,7 @@
30
30
  <nav>
31
31
  <div class="match_id">
32
32
  <p><%= $t("dota2tracker.template.match_id_").slice(0, -1) %> <%-match.id%></p>
33
- <p class="<%-match.parsedDateTime?'success':'fail'%>"><!--伪类赋值:类名输入success时此处为※录像分析成功,fail为※分析结果不完整,同时自动应用字体颜色样式。--></p>
33
+ <p class="<%-match.odParsed?"opendota":(match.parsedDateTime?'success':'fail')%>"><!--伪类赋值:类名输入success时此处为※录像分析成功,fail为※分析结果不完整,同时自动应用字体颜色样式。--></p>
34
34
  </div>
35
35
  <div class="start_time">
36
36
  <p><%= $t("dota2tracker.template.start_time_").slice(0, -1) %></p>
@@ -48,7 +48,7 @@
48
48
  <p><%= $t("dota2tracker.template.game_mode_").slice(0, -1) %></p>
49
49
  <p><%-$t("dota2tracker.template.lobby_types."+match.lobbyType) || match.lobbyType%>/<%-$t("dota2tracker.template.game_modes."+match.gameMode) || match.gameMode%></p>
50
50
  </div>
51
- <div class="rank">
51
+ <div class="rank"<%- match.odParsed && match.lobbyType !== "RANKED" ? ` style="filter:grayscale(1)"` : "" %>>
52
52
  <img src="<%-getImageUrl('medal_' + (match.rank?.toString().split('')[0] ?? '0'))%>" alt="" />
53
53
  <img style="z-index: 1;" src="<%-getImageUrl('star_' + (match.rank?.toString().split('')[1] ?? '0'))%>" alt="" />
54
54
  </div>