mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
Implement "Report Issue" button (#634)
Currently, "Report an Issue" button, which can be found in the `ModInfoPopup` if `mod.json` contains `issues` property, doesn't do anything useful except opening crashlog directory. This changes it to actually open the specified URL in browser / crashlogs directory, instead of both buttons having the same action.
This commit is contained in:
parent
223f168fb0
commit
9362df6078
1 changed files with 10 additions and 1 deletions
|
@ -23,7 +23,16 @@ void geode::openIssueReportPopup(Mod* mod) {
|
||||||
dirs::getCrashlogsDir().string() + "`",
|
dirs::getCrashlogsDir().string() + "`",
|
||||||
"OK", "Open Folder",
|
"OK", "Open Folder",
|
||||||
[mod](bool btn2) {
|
[mod](bool btn2) {
|
||||||
file::openFolder(dirs::getCrashlogsDir());
|
if (btn2) {
|
||||||
|
file::openFolder(dirs::getCrashlogsDir());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto issues = mod->getMetadata().getIssues();
|
||||||
|
if (issues && issues.value().url) {
|
||||||
|
auto url = issues.value().url.value();
|
||||||
|
web::openLinkInBrowser(url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)->show();
|
)->show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue