1
0
forked from bot/app

📝 [docs]: 新增在线展示

This commit is contained in:
远野千束 2024-09-01 22:14:09 +08:00
parent 58d0d12c1f
commit c805db3371
8 changed files with 34 additions and 23 deletions

View File

@ -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
}

View File

@ -2,6 +2,7 @@
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(() => {
@ -48,12 +49,13 @@ fetch('https://registry.nonebot.dev/plugins.json')
<template>
<div class="market">
<h1>插件商店</h1>
<p>内容来自轻雪商店及<a href="https://nonebot.dev/store/plugins">NoneBot插件商店</a>轻雪通过nonebot插件实现兼容NoneBot在此仅作引用具体请访问NoneBot插件商店</p>
<h1>{{ getTextRef('pluginStore') }}</h1>
<p>{{ getTextRef('pluginStoreDesc') }}</p>
<!-- 搜索框-->
<div class="search-box-div">
<input class="item-search-box" type="text" placeholder="搜索插件" v-model="search"/>
<ToggleSwitch v-model:modelValue="showLiteyukiPluginOnly" />仅轻雪插件
<input class="item-search-box" type="text" v-model="search" :placeholder="getTextRef('search')"/>
<ToggleSwitch v-model:modelValue="showLiteyukiPluginOnly"/>
{{ getTextRef('liteyukiOnly') }}
</div>
<div class="items">
<!-- 使用filteredItems来布局商品 -->

View File

@ -2,6 +2,7 @@
import {computed, ref} from 'vue'
import ItemCard from './ResItemCard.vue'
import * as url from "node:url";
import {getTextRef} from "./scripts/i18n";
// public/assets/resources.json
let filteredItems = computed(() => {
@ -29,8 +30,8 @@ fetch("/resources.json")
<template>
<div class="market">
<h1>主题/资源商店</h1>
<div class="search-box-div"><input class="item-search-box" type="text" placeholder="搜索资源" v-model="search" /></div>
<h1>{{ getTextRef('resourceStore') }}</h1>
<div class="search-box-div"><input class="item-search-box" type="text" :placeholder="getTextRef('search')" v-model="search" /></div>
<div class="items">
<!-- 使用filteredItems来布局商品 -->
<ItemCard v-for="item in filteredItems" :key="item.id" :item="item"/>

View File

@ -15,6 +15,11 @@ const i18nData = {
size: 'Size',
plugins: 'Plugins',
resources: 'Resources',
pluginStore: 'Plugin Store',
pluginStoreDesc: 'Content from the LightSnow Plugin Store, LightSnow supports NoneBot through the lpnonebot plugin, and references some NoneBot plugins',
liteyukiOnly: 'Liteyuki Only',
search: 'Search',
resourceStore: 'Resources Store',
},
zh: {
online: '在线',
@ -28,6 +33,12 @@ const i18nData = {
size: '大小',
plugins: '插件',
resources: '主题资源',
store: '商店',
pluginStore: '插件商店',
pluginStoreDesc: '内容来自轻雪插件商店轻雪通过lpnonebot插件对NoneBot实现支持引用了部分NoneBot插件',
liteyukiOnly: '仅轻雪',
search: '搜索',
resourceStore: '资源商店',
}
}

View File

@ -1,6 +1,6 @@
---
title: 插件商店
title: Plugin Store
order: 2
---
<pluginStoreComp />
<PluginStore />

View File

@ -1,6 +1,6 @@
---
title: 资源商店
title: Resource Store
order: 1
---
<resourceStoreComp />
<ResStore />

View File

@ -3,8 +3,4 @@ title: 插件商店
order: 2
---
<script setup>
import PluginStore from '../../components/PluginStore.vue';
</script>
<PluginStore></PluginStore>
<PluginStore />

View File

@ -2,8 +2,5 @@
title: 资源商店
order: 1
---
<script setup>
import ResStore from '../../components/ResStore.vue';
</script>
<ResStore />