From c805db33717dc83083de5c2c564a9121f9dc113b Mon Sep 17 00:00:00 2001 From: snowykami Date: Sun, 1 Sep 2024 22:14:09 +0800 Subject: [PATCH] =?UTF-8?q?:memo:=20[docs]:=20=E6=96=B0=E5=A2=9E=E5=9C=A8?= =?UTF-8?q?=E7=BA=BF=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/theme/index.ts | 6 +++++- docs/components/PluginStore.vue | 18 ++++++++++-------- docs/components/ResStore.vue | 5 +++-- docs/components/scripts/i18n.ts | 11 +++++++++++ docs/en/store/plugin.md | 4 ++-- docs/en/store/resource.md | 4 ++-- docs/zh/store/plugin.md | 6 +----- docs/zh/store/resource.md | 3 --- 8 files changed, 34 insertions(+), 23 deletions(-) diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 28ec7f90..8127c390 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -2,13 +2,17 @@ import DefaultTheme from 'vitepress/theme' import './liteyuki.css' import StatsBar from '../../components/StatsBar.vue' +import PluginStore from '../../components/PluginStore.vue' +import ResStore from '../../components/ResStore.vue' export default { extends: DefaultTheme, enhanceApp({ app }) { - app.component('StatsBar', StatsBar) + app.component('StatsBar', StatsBar); + app.component('PluginStore', PluginStore); + app.component('ResStore', ResStore); }, Layout: StatsBar } \ No newline at end of file diff --git a/docs/components/PluginStore.vue b/docs/components/PluginStore.vue index 7565f91e..87a8b419 100644 --- a/docs/components/PluginStore.vue +++ b/docs/components/PluginStore.vue @@ -2,16 +2,17 @@ import {computed, ref} from 'vue' import ItemCard from './PluginItemCard.vue' import ToggleSwitch from "./ToggleSwitch.vue"; +import {getTextRef} from "./scripts/i18n"; let showLiteyukiPluginOnly = ref(false) let filteredItems = computed(() => { let filtered = items.value if (search.value) { filtered = filtered.filter(item => - item.name.toLowerCase().includes(search.value.toLowerCase()) || - item.desc.toLowerCase().includes(search.value.toLowerCase()) || - item.author.toLowerCase().includes(search.value.toLowerCase()) || - item.module_name.toLowerCase().includes(search.value.toLowerCase()) + item.name.toLowerCase().includes(search.value.toLowerCase()) || + item.desc.toLowerCase().includes(search.value.toLowerCase()) || + item.author.toLowerCase().includes(search.value.toLowerCase()) || + item.module_name.toLowerCase().includes(search.value.toLowerCase()) ) } if (showLiteyukiPluginOnly.value) { @@ -48,12 +49,13 @@ fetch('https://registry.nonebot.dev/plugins.json')