karin-plugin-teamspeak 1.3.4 → 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/apps/ts3.js CHANGED
@@ -97,8 +97,8 @@ class ts3 {
97
97
  }
98
98
  const renderList = [];
99
99
  renderList.push(usePuppeteer
100
- ? `<h1>${config().SERVER_NAME || "TeamSpeak服务器"}</h1>`
101
- : `====${config().SERVER_NAME || "TeamSpeak服务器"}====`);
100
+ ? `<h1>${config().SERVER_NAME || config().HOST}</h1>`
101
+ : `====${config().SERVER_NAME || config().HOST}====`);
102
102
  renderList.push(usePuppeteer
103
103
  ? `<div class="tips">仅展示有人的频道</div>`
104
104
  : `仅展示有人的频道 `);
@@ -152,5 +152,8 @@ class ts3 {
152
152
  };
153
153
  }
154
154
  const teamspeak3 = new ts3();
155
- teamspeak3.init();
155
+ setTimeout(() => {
156
+ //确保配置文件生成且正确保存
157
+ teamspeak3.init();
158
+ }, 1000);
156
159
  export default teamspeak3;
package/lib/web.config.js CHANGED
@@ -112,9 +112,8 @@ export default {
112
112
  ],
113
113
  /** 前端点击保存之后调用的方法 */
114
114
  save: (config) => {
115
- Object.assign(defConfig, config);
116
- writeJsonSync(`${dirConfig}/config.json`, config);
117
115
  logger.info("保存的配置:", config);
116
+ writeJsonSync(`${dirConfig}/config.json`, config);
118
117
  // 在这里处理保存逻辑
119
118
  return {
120
119
  success: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karin-plugin-teamspeak",
3
- "version": "1.3.4",
3
+ "version": "1.4.0",
4
4
  "description": "karin 的 teamspeak 插件",
5
5
  "homepage": "https://github.com/jacksixth/karin-plugin-teamspeak3",
6
6
  "bugs": {
@@ -27,7 +27,7 @@
27
27
  h1 {
28
28
  text-align: center;
29
29
  color: #673AB7;
30
- margin-bottom: 12px;
30
+ margin-bottom: 6px;
31
31
  }
32
32
 
33
33
  .tips {
@@ -49,7 +49,6 @@
49
49
 
50
50
  li {
51
51
  list-style-type: circle;
52
- margin-left: 10%;
53
52
  color: #3F51B5;
54
53
  white-space: nowrap;
55
54
  }