diff --git a/src/ModMan/main.cpp b/src/ModMan/main.cpp index ae58b638..810239ac 100644 --- a/src/ModMan/main.cpp +++ b/src/ModMan/main.cpp @@ -6,6 +6,7 @@ #include "webview/gtk/CustomProtocolHandlerGtk.h" #include +#include #include #include @@ -22,15 +23,15 @@ int main() long count = 0; webview::webview w(true, nullptr); w.set_title("OpenAssetTools ModMan"); + w.set_size(480, 320, WEBVIEW_HINT_NONE); w.set_size(480, 320, WEBVIEW_HINT_MIN); // A binding that counts up or down and immediately returns the new value. - w.bind("count", + w.bind("greet", [&](const std::string& req) -> std::string { - // Imagine that req is properly parsed or use your own JSON parser. - auto direction = std::stol(req.substr(1, req.size() - 1)); - return std::to_string(count += direction); + const auto name = req.substr(2, req.size() - 4); + return std::format("\"Hello from C++ {}!\"", name); }); // A binding that creates a new thread and returns the result at a later time. diff --git a/src/ModManUi/src/App.vue b/src/ModManUi/src/App.vue index f25da055..6bc85569 100644 --- a/src/ModManUi/src/App.vue +++ b/src/ModManUi/src/App.vue @@ -1,18 +1,18 @@