mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2024-11-15 01:34:38 +08:00
🐛 docs: 添加发布插件表单
This commit is contained in:
parent
fbb9ed82ee
commit
0c859957b4
@ -7,10 +7,7 @@ import {RepoUrl} from "./scripts/statsApi";
|
|||||||
|
|
||||||
import resourcesJson from "../public/resources.json"
|
import resourcesJson from "../public/resources.json"
|
||||||
import {useData} from "vitepress";
|
import {useData} from "vitepress";
|
||||||
// formLang
|
// formLan
|
||||||
const lang = computed(
|
|
||||||
() => formatLang(useData().lang.value)
|
|
||||||
)
|
|
||||||
|
|
||||||
// 从public/assets/resources.json加载插件
|
// 从public/assets/resources.json加载插件
|
||||||
let filteredItems = computed(() => {
|
let filteredItems = computed(() => {
|
||||||
@ -43,15 +40,15 @@ function closePublishWindow() {
|
|||||||
isPublishWindowOpen.value = false
|
isPublishWindowOpen.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let submitLang = ""
|
||||||
|
if (formatLang(useData().site.value.lang) === "zh") {
|
||||||
|
submitLang = "zh"
|
||||||
|
} else {
|
||||||
|
submitLang = "en"
|
||||||
|
}
|
||||||
|
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
const title = encodeURI(`Resource: ${newRes.value.name}`)
|
const title = encodeURI(`Resource: ${newRes.value.name}`)
|
||||||
let submitLang = ""
|
|
||||||
if (lang.value === "zh") {
|
|
||||||
submitLang = "zh"
|
|
||||||
} else {
|
|
||||||
submitLang = "en"
|
|
||||||
}
|
|
||||||
const issueURL = `${RepoUrl}/issues/new?assignees=&labels=Resource&template=resource_publish_${submitLang}.yml&title=${title}`
|
const issueURL = `${RepoUrl}/issues/new?assignees=&labels=Resource&template=resource_publish_${submitLang}.yml&title=${title}`
|
||||||
console.log(issueURL)
|
console.log(issueURL)
|
||||||
window.open(issueURL, '_blank')
|
window.open(issueURL, '_blank')
|
||||||
|
Loading…
Reference in New Issue
Block a user