From 3448e7cffc3642922b7f8e7d203a9976b6a58746 Mon Sep 17 00:00:00 2001 From: Send_Nukez Date: Wed, 17 Nov 2021 21:20:01 +0100 Subject: [PATCH] add `Request Feature` button to about --- CHANGELOG.md | 2 +- src/js/main.js | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 518ea0e..286b705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ Added: -- `Report Bugs` and `Changelog` buttons to `Settings > About` +- `Report Bugs`, `Request Feature` and `Changelog` buttons to `Settings > About` - Markdown parsing for settings descriptions - Option to have a button to open the settings next to your profile picture diff --git a/src/js/main.js b/src/js/main.js index 5e857db..3501439 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -389,7 +389,7 @@ waitForElement(["#main"], () => { type: "button", key: "aboutDribbblishBugs", name: "Report Bugs", - description: "Open new issue on GitHub", + description: "Open new issue on GitHub to report a bug", data: "Create Report", onChange: () => { const reportBody = ` @@ -444,6 +444,22 @@ waitForElement(["#main"], () => { } }); + Dribbblish.config.register({ + area: "About", + type: "button", + key: "aboutDribbblishFeature", + name: "Request Feature", + description: "Open new issue on GitHub to request a feature", + data: "Request Feature", + onChange: () => { + const reportURL = new URL("https://github.com/JulienMaille/dribbblish-dynamic-theme/issues/new"); + reportURL.searchParams.set("labels", "enhancement"); + reportURL.searchParams.set("template", "feature_request.md"); + + window.open(reportURL.toString(), "_blank"); + } + }); + Dribbblish.config.register({ area: "About", type: "button",