add pre/post install message options for github json

This commit is contained in:
ITotalJustice
2024-12-31 04:41:19 +00:00
parent e452615c77
commit bc39e668eb
3 changed files with 47 additions and 8 deletions

View File

@@ -11,12 +11,16 @@ namespace sphaira::ui::menu::gh {
struct AssetEntry {
std::string name;
std::string path;
std::string pre_install_message;
std::string post_install_message;
};
struct Entry {
fs::FsPath json_path;
std::string owner;
std::string repo;
std::string pre_install_message;
std::string post_install_message;
std::vector<AssetEntry> assets;
};

View File

@@ -33,7 +33,7 @@ public:
using Options = std::vector<Option>;
public:
OptionBox(const std::string& message, const Option& a, Callback cb); // confirm
OptionBox(const std::string& message, const Option& a, Callback cb = [](auto){}); // confirm
OptionBox(const std::string& message, const Option& a, const Option& b, Callback cb); // yesno
OptionBox(const std::string& message, const Option& a, const Option& b, std::size_t index, Callback cb); // yesno
OptionBox(const std::string& message, const Option& a, const Option& b, const Option& c, Callback cb); // tri