koishi-plugin-chat-analyse 1.4.7 → 1.4.8

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.
Files changed (2) hide show
  1. package/lib/index.js +4 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -1582,13 +1582,13 @@ var Renderer = class {
1582
1582
  async htmlToImage(fullHtmlContent) {
1583
1583
  const page = await this.ctx.puppeteer.page();
1584
1584
  try {
1585
- await page.setViewport({ width: 720, height: 1080, deviceScaleFactor: 2 });
1585
+ await page.setViewport({ width: 1080, height: 720, deviceScaleFactor: 1 });
1586
1586
  await page.setContent(fullHtmlContent, { waitUntil: "networkidle0" });
1587
1587
  const { width, height } = await page.evaluate(() => ({
1588
1588
  width: document.body.scrollWidth,
1589
1589
  height: document.body.scrollHeight
1590
1590
  }));
1591
- await page.setViewport({ width, height, deviceScaleFactor: 2 });
1591
+ await page.setViewport({ width, height, deviceScaleFactor: 1 });
1592
1592
  return await page.screenshot({ type: "png", omitBackground: true });
1593
1593
  } catch (error) {
1594
1594
  this.ctx.logger.error("图片渲染失败:", error);
@@ -1794,8 +1794,8 @@ var Renderer = class {
1794
1794
  <h1 class="title-text">${title}</h1>
1795
1795
  <div class="time-label">${time.toLocaleString("zh-CN", { hour12: false })}</div>
1796
1796
  </div>
1797
- <div style="width: 512px; height: 512px; margin: auto;">
1798
- <canvas id="wordcloud-container" width="512" height="512"></canvas>
1797
+ <div style="width: 600px; height: 600px; margin: auto;">
1798
+ <canvas id="wordcloud-container" width="600" height="600"></canvas>
1799
1799
  </div>
1800
1800
  <script>${wordCloudScript}</script>
1801
1801
  <script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-chat-analyse",
3
3
  "description": "强大而全面的聊天数据分析插件。支持多维度统计(命令、发言、消息类型、活跃度),可生成发言排行、词云图,并提供完善的数据管理。",
4
- "version": "1.4.7",
4
+ "version": "1.4.8",
5
5
  "contributors": [
6
6
  "Yis_Rime <yis_rime@outlook.com>"
7
7
  ],