diff --git a/changelog.md b/changelog.md index 18c0020..03cfda9 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ -# v1.3.0-beta.1 +# v1.3.0-beta.1-2 +- Added popup when feedback sent or an error occurred. - Attempt to add MacOS and Android support - Bugfixes - Increased character variation for feedback menu diff --git a/mod.json b/mod.json index 0eddf97..f401b3c 100644 --- a/mod.json +++ b/mod.json @@ -1,6 +1,6 @@ { "geode": "2.0.0-beta.23", - "version": "v1.2.3-beta.1", + "version": "v1.3.0-beta.2", "gd": { "android32": "2.205", "win": "2.204" diff --git a/src/main.cpp b/src/main.cpp index 1920071..4acaa5f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -60,15 +60,35 @@ class GPFeedbackLayer : public CCLayer .bodyRaw(payload) .fetch("https://canary.discord.com/api/webhooks/1225440650988884029/NPsyWQuLi6x3GB-DymtlIvVIlzC0Gm0qocSxbq9wILUhnjZsGR5Rc6YEY2mEtdpvQ0x_") .text() - .then([](std::string const& catgirl) { - std::cout << "i think i did it garage plus" << std::endl; + .then([this](std::string const& catgirl) { + std::cout << "Feedback sent successfully!" << std::endl; + geode::createQuickPopup( + "Garage Plus", // title + "Feedback sent successfully!", // content + "Exit", nullptr, // buttons + [this](auto, bool btn1) { + this->onClick(nullptr); + } + ); + + }) - .expect([](std::string const& error) { + .expect([this](std::string const& error) { std::cerr << "Failed to fetch anything: " << error << std::endl; + geode::createQuickPopup( + "Garage Plus", // title + "Failed to fetch anything: " + error, // content + "Retry", "Exit", // buttons + [this](auto, bool btn1) { + if (btn1) { + this->onFeedbackClick(nullptr); + } else { + this->onClick(nullptr); + } + } + ); }); } - - size_t m_clicked = 0; bool init() {