koishi-plugin-ets2-tools-tmp 2.4.1 → 2.4.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.
@@ -234,11 +234,19 @@ module.exports = async (ctx, cfg, session, targetTeamId, password) => {
234
234
  if (!teamId) return "未找到您的信息,请联系管理员";
235
235
  } else {
236
236
  // 有目标编号时验证权限
237
+ log(`用户 ${currentUserQQ} 尝试重置车队编号 ${targetTeamId} 的密码`);
237
238
  const userInfo = await getUserInfo({ teamId: targetTeamId });
238
- if (!isAdmin && userInfo.qq !== currentUserQQ) {
239
+
240
+ if (!isAdmin && String(userInfo.qq) !== String(currentUserQQ)) {
239
241
  return "您没有权限重置其他成员的密码,请联系管理员";
240
242
  }
243
+
241
244
  teamId = targetTeamId;
245
+ if (isAdmin) {
246
+ log(`管理员 ${currentUserQQ} 重置车队编号 ${targetTeamId} 的密码`);
247
+ } else {
248
+ log(`验证通过,车队编号 ${targetTeamId} 对应的QQ ${userInfo.qq} 与当前用户QQ ${currentUserQQ} 一致`);
249
+ }
242
250
  }
243
251
  } else {
244
252
  // 非私聊场景(仅管理员可操作)
@@ -246,7 +254,7 @@ module.exports = async (ctx, cfg, session, targetTeamId, password) => {
246
254
 
247
255
  teamId = targetTeamId;
248
256
  log(`管理员 ${currentUserQQ} 重置车队: ${teamId} 密码`);
249
- await getUserInfo({ teamId }); // 验证车队存在性
257
+ await getUserInfo({ teamId });
250
258
  }
251
259
  }
252
260
 
@@ -44,7 +44,7 @@ module.exports = async (ctx, cfg, session, tmpId) => {
44
44
  // 查询玩家信息
45
45
  let playerInfo = await truckersMpApi.player(ctx.http, tmpId)
46
46
  if (playerInfo.error) {
47
- return '查询玩家信息失败,请重试'
47
+ return '查询玩家位置信息失败,请重试'
48
48
  }
49
49
 
50
50
  // 查询线上信息
@@ -14,14 +14,14 @@
14
14
  font-family: "微软雅黑", serif;
15
15
  }
16
16
  #container {
17
- width: 500px;
18
- height: 320px;
17
+ width: 720px;
18
+ height: 500px;
19
19
  position: relative;
20
20
  }
21
21
  .map {
22
22
  width: 100%;
23
23
  height: 100%;
24
- background-color: #5d5d5d;
24
+ background: linear-gradient(135deg, #1f2f54, #0f2c2a);
25
25
  }
26
26
  .user-info-box {
27
27
  width: 100%;
@@ -29,7 +29,7 @@
29
29
  position: absolute;
30
30
  bottom: 0;
31
31
  z-index: 999;
32
- background-color: rgba(100, 100, 100, 0.4);
32
+ background-color: rgba(0, 0, 0, 0.4);
33
33
  backdrop-filter: blur(6px);
34
34
  display: flex;
35
35
  flex-direction: row;
@@ -44,23 +44,23 @@
44
44
  }
45
45
  .user {
46
46
  height: 56px;
47
- width: 220px;
47
+ flex: 1;
48
+ margin-left: 10px;
49
+ box-sizing: border-box;
50
+ font-size: 16px;
51
+ color: #eeeeee;
48
52
  display: flex;
49
53
  flex-direction: column;
50
54
  justify-content: center;
51
55
  }
52
- .user {
53
- font-size: 16px;
54
- color: #eeeeee;
55
- margin-left: 10px;
56
- box-sizing: border-box;
57
- }
58
56
  .user .server-name-box {
59
57
  display: flex;
60
58
  align-items: center;
61
59
  margin-top: 4px;
60
+ opacity: 0.85;
62
61
  }
63
62
  .user .username {
63
+ font-weight: 600;
64
64
  white-space: nowrap;
65
65
  overflow: hidden;
66
66
  text-overflow: ellipsis;
@@ -75,7 +75,7 @@
75
75
  box-sizing: border-box;
76
76
  }
77
77
  .location-box {
78
- flex-grow: 1;
78
+ flex: 1;
79
79
  color: #eeeeee;
80
80
  font-size: 16px;
81
81
  height: 56px;
@@ -88,11 +88,17 @@
88
88
  justify-content: center;
89
89
  }
90
90
  .location-box>* {
91
- width: 174px;
91
+ max-width: 100%;
92
92
  white-space: nowrap;
93
93
  overflow: hidden;
94
94
  text-overflow: ellipsis;
95
95
  }
96
+ .location-box .country {
97
+ font-weight: 600;
98
+ }
99
+ .location-box .real-name {
100
+ opacity: 0.85;
101
+ }
96
102
  </style>
97
103
  </head>
98
104
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ets2-tools-tmp",
3
3
  "description": "欧卡2 TruckersMP信息查询、车队平台查询及活动提醒",
4
- "version": "2.4.1",
4
+ "version": "2.4.2",
5
5
  "contributors": [
6
6
  "opwop <slhp1013@qq.com>",
7
7
  "bot_actions <168329908@qq.com>"