mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-26 19:55:03 +08:00
📦 docs: 资源商店新增发布资源功能
This commit is contained in:
parent
d867996072
commit
d8c50752f7
@ -3,6 +3,7 @@ import {computed, ref} from 'vue'
|
|||||||
import ItemCard from './PluginItemCard.vue'
|
import ItemCard from './PluginItemCard.vue'
|
||||||
import ToggleSwitch from "./ToggleSwitch.vue";
|
import ToggleSwitch from "./ToggleSwitch.vue";
|
||||||
import {getTextRef} from "./scripts/i18n";
|
import {getTextRef} from "./scripts/i18n";
|
||||||
|
import pluginsJson from "../public/plugins.json"
|
||||||
|
|
||||||
let showLiteyukiPluginOnly = ref(false)
|
let showLiteyukiPluginOnly = ref(false)
|
||||||
let filteredItems = computed(() => {
|
let filteredItems = computed(() => {
|
||||||
@ -24,15 +25,7 @@ let filteredItems = computed(() => {
|
|||||||
let items = ref([])
|
let items = ref([])
|
||||||
let search = ref('')
|
let search = ref('')
|
||||||
// 从官方拉取
|
// 从官方拉取
|
||||||
fetch("/plugins.json")
|
items.value = pluginsJson
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
data.forEach(item => {
|
|
||||||
item.is_liteyuki_plugin = true
|
|
||||||
})
|
|
||||||
items.value = data
|
|
||||||
})
|
|
||||||
.catch(error => console.error(error))
|
|
||||||
|
|
||||||
//追加
|
//追加
|
||||||
fetch('https://registry.nonebot.dev/plugins.json')
|
fetch('https://registry.nonebot.dev/plugins.json')
|
||||||
|
@ -5,6 +5,8 @@ import ResPubWindow from "./ResPubWindow.vue";
|
|||||||
import {getTextRef} from "./scripts/i18n";
|
import {getTextRef} from "./scripts/i18n";
|
||||||
import {RepoUrl} from "./scripts/statsApi";
|
import {RepoUrl} from "./scripts/statsApi";
|
||||||
|
|
||||||
|
import resourcesJson from "../public/resources.json"
|
||||||
|
|
||||||
// 从public/assets/resources.json加载插件
|
// 从public/assets/resources.json加载插件
|
||||||
let filteredItems = computed(() => {
|
let filteredItems = computed(() => {
|
||||||
if (!search.value) {
|
if (!search.value) {
|
||||||
@ -19,12 +21,7 @@ let filteredItems = computed(() => {
|
|||||||
// 插件商店Nonebot
|
// 插件商店Nonebot
|
||||||
let items = ref([])
|
let items = ref([])
|
||||||
let search = ref('')
|
let search = ref('')
|
||||||
fetch("/resources.json")
|
items.value = resourcesJson
|
||||||
.then(response => response.json())
|
|
||||||
.then(data => {
|
|
||||||
items.value = data
|
|
||||||
})
|
|
||||||
.catch(error => console.error(error))
|
|
||||||
// 列表倒序
|
// 列表倒序
|
||||||
|
|
||||||
const isPublishWindowOpen = ref(false)
|
const isPublishWindowOpen = ref(false)
|
||||||
|
@ -96,7 +96,7 @@ def pre_check(github: Github, issue: Issue, repo: Repository) -> err:
|
|||||||
|
|
||||||
issue.edit(body=new_issue_body)
|
issue.edit(body=new_issue_body)
|
||||||
issue.add_to_labels("pre-checked")
|
issue.add_to_labels("pre-checked")
|
||||||
issue.get_comment(cid).edit("✅ 预检查通过\n## 元数据\n" + metadata_markdown)
|
issue.get_comment(cid).edit("✅ 预检查通过,等待管理员人工审核\n## 元数据\n" + metadata_markdown)
|
||||||
return nil
|
return nil
|
||||||
|
|
||||||
|
|
||||||
@ -139,6 +139,7 @@ def add_resource(github: Github, issue: Issue, repo: Repository):
|
|||||||
ref.edit(commit.sha)
|
ref.edit(commit.sha)
|
||||||
issue.remove_from_labels("pre-checked")
|
issue.remove_from_labels("pre-checked")
|
||||||
issue.add_to_labels("passed")
|
issue.add_to_labels("passed")
|
||||||
|
issue.create_comment(f"✅ 资源包 {name} 已发布!商店页面稍后就会更新。")
|
||||||
|
|
||||||
|
|
||||||
def handle_resource(github: Github, issue: Issue, repo: Repository, act_type: str):
|
def handle_resource(github: Github, issue: Issue, repo: Repository, act_type: str):
|
||||||
|
Loading…
Reference in New Issue
Block a user