diff --git a/docs/.vuepress/components/PluginItemCard.vue b/docs/.vuepress/components/PluginItemCard.vue
index bd8906c9..d74e88fb 100644
--- a/docs/.vuepress/components/PluginItemCard.vue
+++ b/docs/.vuepress/components/PluginItemCard.vue
@@ -2,6 +2,9 @@
{{ props.item.name }}
{{ props.item.desc }}
+
+ {{ tag.label }}
+
@@ -45,6 +48,21 @@ const copyToClipboard = () => {
})
}
+const getTagStyle = (backgroundColor: string) => {
+ // 将颜色值转换为 RGB 格式
+ const rgb = backgroundColor.replace(/^#/, '');
+ const [r, g, b] = rgb.match(/.{2}/g).map(x => parseInt(x, 16));
+
+ // 计算亮度
+ const brightness = (r * 299 + g * 587 + b * 114) / 1000;
+
+ // 根据亮度决定文字颜色
+ return {
+ backgroundColor: backgroundColor,
+ color: brightness > 128 ? '#000' : '#fff'
+ };
+};
+
// 复制到剪贴板的函数
@@ -123,4 +141,12 @@ button {
justify-content: space-between;
color: #00000055;
}
+
+.tag {
+ display: inline-block;
+ padding: 2px 5px;
+ margin-right: 5px;
+ border-radius: 5px;
+ font-size: 12px;
+}
\ No newline at end of file
diff --git a/docs/.vuepress/public/assets/plugins.json b/docs/.vuepress/public/assets/plugins.json
index 946cccbb..d24deb4a 100644
--- a/docs/.vuepress/public/assets/plugins.json
+++ b/docs/.vuepress/public/assets/plugins.json
@@ -3,12 +3,12 @@
"module_name": "liteyukibot-plugin-nonebot",
"project_link": "liteyukibot-plugin-nonebot",
"name": "NoneBot插件",
- "desc": "在轻雪中使用NoneBot,为NoneBot开发者提供了更多便捷功能(已内置)",
+ "desc": "在轻雪中使用NoneBot,内置轻雪--NoneBot会话控制器插件,为NoneBot开发者提供了更多便捷功能(已内置)",
"author": "snowykami",
"homepage": "https://github.com/LiteyukiStudio/liteyukibot-plugin-nonebot",
"tags": [
{
- "label": "server",
+ "label": "app",
"color": "#aeeaa8"
}
],
@@ -16,5 +16,27 @@
"type": "application",
"valid": true,
"version": "rolling"
+ },
+ {
+ "module_name": "liteyukibot-plugin-antidislink",
+ "project_link": "liteyukibot-plugin-antidislink",
+ "name": "防断联插件",
+ "desc": "防止你的群友断联化",
+ "author": "snowykami",
+ "homepage": "https://github.com/snowykami/liteyukibot-plugin-antidislink",
+ "tags": [
+ {
+ "label": "app",
+ "color": "#aeeaa8"
+ },
+ {
+ "label": "dislink",
+ "color": "#d0e9ff"
+ }
+ ],
+ "is_official": true,
+ "type": "application",
+ "valid": true,
+ "version": "rolling"
}
]