koishi-plugin-ll-mc 3.1.3 → 3.1.5

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 +5 -12
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2519,7 +2519,6 @@ ${targetUserRecord[0].username}
2519
2519
  }[ch]));
2520
2520
  }
2521
2521
  __name(escapeHtml, "escapeHtml");
2522
- const BAR_LIGHT_TRACK = "#F3F4F6";
2523
2522
  const BAR_FILL_COLORS = [
2524
2523
  "#F472B6", // pink
2525
2524
  "#A78BFA", // violet
@@ -2540,8 +2539,7 @@ ${targetUserRecord[0].username}
2540
2539
  const avatar = escapeHtml(item.avatar || "");
2541
2540
  const name = escapeHtml(item.name || "");
2542
2541
  const count = item.count;
2543
- // 柱子总背景固定为浅色,发言部分单独用颜色区分,这样更显眼
2544
- const barBg = BAR_LIGHT_TRACK;
2542
+ // 柱子未发言部分用半透明玻璃(毛玻璃),发言部分用彩色区分
2545
2543
  const fill = isHero
2546
2544
  ? 'linear-gradient(to right, #6366F1, #A855F7, #EC4899)'
2547
2545
  : fillColor;
@@ -2551,7 +2549,7 @@ ${targetUserRecord[0].username}
2551
2549
  : "";
2552
2550
  return `<div class="row">
2553
2551
  <div class="avatar"><img src="${avatar}" alt="avatar"></div>
2554
- <div class="bar" style="background:${barBg};">
2552
+ <div class="bar">
2555
2553
  <div class="fill" style="width:${width}%;background:${fill};"></div>
2556
2554
  <div class="bar-content" style="color:${textColor};">
2557
2555
  <span class="row-name${isHero ? " is-hero" : ""}">${star}${name}</span>
@@ -2578,19 +2576,14 @@ ${targetUserRecord[0].username}
2578
2576
  background-color: #F5F7FA;
2579
2577
  }
2580
2578
  body {
2581
- padding: 24px;
2582
2579
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
2583
2580
  -webkit-font-smoothing: antialiased;
2584
2581
  }
2585
2582
  .card {
2586
2583
  width: 100%;
2587
- max-width: 868px;
2588
- margin: 0 auto;
2589
- background: #FFFFFF;
2590
- border-radius: 12px;
2584
+ /* 去掉容器白色圆角背景,让自定义背景直接透出;边距即卡片内边距(到边缘的真实距离) */
2585
+ background: transparent;
2591
2586
  padding: 24px;
2592
- box-shadow: 0 4px 6px rgba(0,0,0,0.06);
2593
- border: 1px solid #F3F4F6;
2594
2587
  }
2595
2588
  .card-header { text-align: center; margin-bottom: 22px; }
2596
2589
  .card-title { font-size: 28px; font-weight: 700; letter-spacing: 0.02em; color: #000000; margin-bottom: 6px; }
@@ -2599,7 +2592,7 @@ ${targetUserRecord[0].username}
2599
2592
  .row { display: flex; align-items: center; gap: 12px; width: 100%; }
2600
2593
  .avatar { width: 40px; height: 40px; flex-shrink: 0; }
2601
2594
  .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 1px 2px rgba(0,0,0,0.08); background: #fff; padding: 2px; }
2602
- .bar { position: relative; flex-grow: 1; height: 40px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
2595
+ .bar { position: relative; flex-grow: 1; height: 40px; border-radius: 8px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: rgba(255,255,255,0.34); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.45); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
2603
2596
  .bar::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(to right, transparent 99%, rgba(255,255,255,0.2) 100%); background-size: 10% 100%; pointer-events: none; }
2604
2597
  .fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 8px 0 0 8px; z-index: 0; }
2605
2598
  .bar-content { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; width: 100%; }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-ll-mc",
3
3
  "description": "消息数量统计插件(基于 koishi-plugin-message-counter 重做,官方QQ机器人兼容)",
4
- "version": "3.1.3",
4
+ "version": "3.1.5",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [