Skip to content

Commit 078cb66

Browse files
committed
Embed MatrixShop bStats chart on site
1 parent 7afef7e commit 078cb66

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

docs/matrixshop/bstats-and-telemetry.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ MatrixShop 当前已经集成 `bStats`,用于统计插件的安装量和基础
1414
30502
1515
```
1616

17+
## 当前使用量图表
18+
19+
[![MatrixShop bStats](https://bstats.org/signatures/bukkit/MatrixShop.svg)](https://bstats.org/plugin/bukkit/MatrixShop)
20+
1721
## 当前会上报什么
1822

1923
当前版本只上报配置和模块层面的聚合数据:

src/pages/index.module.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,20 @@
258258
line-height: 1.8;
259259
}
260260

261+
.telemetryChart {
262+
margin-top: 1rem;
263+
padding: 0.85rem;
264+
border: 1px solid var(--site-panel-border);
265+
border-radius: 18px;
266+
background: rgba(15, 23, 42, 0.02);
267+
}
268+
269+
.telemetryChart img {
270+
display: block;
271+
width: 100%;
272+
height: auto;
273+
}
274+
261275
.telemetryBadgeActive,
262276
.telemetryBadgePending {
263277
display: inline-flex;

src/pages/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ const telemetryCards = [
105105
status: '已接入',
106106
statusTone: 'active',
107107
summary: '已接入聚合级统计与遥测说明,首页只保留简要状态展示,详细范围进入文档页查看。',
108+
chart: 'https://bstats.org/signatures/bukkit/MatrixShop.svg',
108109
to: '/docs/matrixshop/bstats-and-telemetry',
109110
action: '查看 MatrixShop 统计',
110111
},
@@ -240,6 +241,11 @@ export default function Home(): ReactNode {
240241
{card.status}
241242
</span>
242243
</div>
244+
{'chart' in card ? (
245+
<div className={styles.telemetryChart}>
246+
<img src={card.chart} alt={`${card.title} bStats usage chart`} loading="lazy" />
247+
</div>
248+
) : null}
243249
<Link className={styles.cardAction} to={card.to}>
244250
{card.action}
245251
</Link>

0 commit comments

Comments
 (0)