make automatic bug reports use <details>

This commit is contained in:
Send_Nukez 2021-12-20 23:04:46 +01:00
parent ee98ffd134
commit c052260a8b

View file

@ -389,30 +389,29 @@ Dribbblish.on("ready", () => {
data: "Create Report", data: "Create Report",
onChange: () => { onChange: () => {
const reportBody = ` const reportBody = `
${process.env.BUG_REPORT} ${process.env.BUG_REPORT}
<!-- Leave the lines below as they are --> <!-- Leave the lines below as they are -->
--- ---
### Info for Contributors: <details>
<summary>Info for Contributors</summary>
**Versions** **Versions**
${Dribbblish.config.getOptions("aboutDribbblishInfo").description} ${Dribbblish.config.getOptions("aboutDribbblishInfo").description.split("\n").join("\n ")}
**Extensions** **Extensions**
${$(`script[src^="extensions/"]`) ${$(`script[src^="extensions/"]`)
.toArray() .toArray()
.map((e) => `- ${e.src.split("/").slice(-1)[0]}`) .map((e) => `- ${e.src.split("/").slice(-1)[0]}`)
.join("\n")} .join("\n ")}
**Settings** **Settings**
\`\`\`json \`\`\`json
${JSON.stringify(Dribbblish.config.export(), null, 4)} ${JSON.stringify(Dribbblish.config.export(), null, 4).split("\n").join("\n ")}
\`\`\` \`\`\`
` </details>
.split("\n") `.replace(/^ {12}/gm, "");
.map((line) => line.replace(/^ {16}/, ""))
.join("\n");
const reportURL = new URL("https://github.com/JulienMaille/dribbblish-dynamic-theme/issues/new"); const reportURL = new URL("https://github.com/JulienMaille/dribbblish-dynamic-theme/issues/new");
reportURL.searchParams.set("labels", "bug"); reportURL.searchParams.set("labels", "bug");