Additional Model metadata - Description (#9398)

* starting to add description field to GUI

* additional work to add GUI

* make a multi-line entry

* Remove building of non-mac

* fix tag collision

* debugging suggestions from CoPilot

* yet another debug suggestion

* Fix build with Xcode 16.3

* Simplify OpenVDB patch, from 930c3acb8e (diff-bc3061cc2fe6c64a3d67c8350330bb3a530d01037faace6da27ad9a12aa03e29)

* Fix CGAL header under clang 19
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281880

* Fix compile error due to removal of base template for `std::char_traits` in clang 19
https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html#deprecations-and-removals

* Update Auxiliary.cpp trying to prevent crash

* Add files via upload

* from other branch

* rolling back changes

---------

Co-authored-by: Kaleb Best <kalebbest@MacBook-Air.local>
Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
kfbest
2025-06-01 06:35:48 -04:00
committed by GitHub
parent 5df4275c18
commit 63bca8ab64
3 changed files with 52 additions and 23 deletions

View File

@@ -76,6 +76,16 @@ ProjectPanel::ProjectPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos,
ProjectPanel::~ProjectPanel() {}
// Helper to convert newlines to <br>
static std::string convert_newlines_to_br(const std::string& text) {
std::string result = text;
size_t pos = 0;
while ((pos = result.find('\n', pos)) != std::string::npos) {
result.replace(pos, 1, "<br>");
pos += 4;
}
return result;
}
void ProjectPanel::onWebNavigating(wxWebViewEvent& evt)
{
@@ -189,7 +199,7 @@ void ProjectPanel::on_reload(wxCommandEvent& evt)
j["model"]["name"] = wxGetApp().url_encode(model_name);
j["model"]["author"] = wxGetApp().url_encode(model_author);;
j["model"]["cover_img"] = wxGetApp().url_encode(cover_file);
j["model"]["description"] = wxGetApp().url_encode(description);
j["model"]["description"] = wxGetApp().url_encode(convert_newlines_to_br(description));
j["model"]["preview_img"] = files["Model Pictures"];
j["model"]["upload_type"] = update_type;