From dccf2f3ca89f6b97438fd056496eee7d038ceba5 Mon Sep 17 00:00:00 2001 From: forchannot <100580891+forchannot@users.noreply.github.com> Date: Mon, 12 Jun 2023 21:18:25 +0800 Subject: [PATCH] =?UTF-8?q?:fire:=20Docs:=20=E5=88=A0=E9=99=A4=E5=95=86?= =?UTF-8?q?=E5=BA=97=E6=8F=92=E4=BB=B6=E5=8F=91=E5=B8=83=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=20(#2095)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- website/src/components/Plugin.tsx | 61 +++---------------------------- 1 file changed, 6 insertions(+), 55 deletions(-) diff --git a/website/src/components/Plugin.tsx b/website/src/components/Plugin.tsx index a583c3d2..b1c824b0 100644 --- a/website/src/components/Plugin.tsx +++ b/website/src/components/Plugin.tsx @@ -29,12 +29,9 @@ export default function Plugin(): JSX.Element { const currentPlugins = filteredPlugins.slice(startIndex, endIndex + 1); const [form, setForm] = useState<{ - name: string; - desc: string; projectLink: string; moduleName: string; - homepage: string; - }>({ name: "", desc: "", projectLink: "", moduleName: "", homepage: "" }); + }>({ projectLink: "", moduleName: "" }); const ref = useRef(null); const [tags, setTags] = useState([]); @@ -48,13 +45,13 @@ export default function Plugin(): JSX.Element { setModalOpen(false); const queries: { key: string; value: string }[] = [ { key: "template", value: "plugin_publish.yml" }, - { key: "title", value: form.name && `Plugin: ${form.name}` }, + { + key: "title", + value: form.projectLink && `Plugin: ${form.projectLink}`, + }, { key: "labels", value: "Plugin" }, - { key: "name", value: form.name }, - { key: "description", value: form.desc }, { key: "pypi", value: form.projectLink }, { key: "module", value: form.moduleName }, - { key: "homepage", value: form.homepage }, { key: "tags", value: JSON.stringify(tags) }, ]; const urlQueries = queries @@ -95,10 +92,6 @@ export default function Plugin(): JSX.Element { const delTag = (index: number) => { setTags(tags.filter((_, i) => i !== index)); }; - const insertTagType = (text: string) => { - setLabel(text + label); - ref.current.value = text + label; - }; return ( <> @@ -137,25 +130,6 @@ export default function Plugin(): JSX.Element {
- - -
@@ -211,21 +176,7 @@ export default function Plugin(): JSX.Element { disableAlpha={true} onChangeComplete={onChangeColor} /> -
- Type: - - -
+