Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

Membership cards: Terms & refunds link (sculptforge.app/terms.html); the cards open only their fixed links

islandmeda4387d5c7872
diff --git a/assets/fonts/NotoSansTC-UI.otf b/assets/fonts/NotoSansTC-UI.otf
index b8fc6182..215cc251 100644
Binary files a/assets/fonts/NotoSansTC-UI.otf and b/assets/fonts/NotoSansTC-UI.otf differ
diff --git a/changes/fix-card-terms.md b/changes/fix-card-terms.md
new file mode 100644
index 00000000..89bd3cfd
--- /dev/null
+++ b/changes/fix-card-terms.md
@@ -0,0 +1,6 @@
+---
+changed: The membership cards link to the membership terms (**Terms & refunds**, sculptforge.app/terms.html), and open
+ only their fixed links.
+testers:
+ - Any OS: Preferences > Support > Show the memberships; Terms & refunds in the footer opens the terms page, the card stays.
+---
diff --git a/src/app/I18nSimplifiedChinese.cpp b/src/app/I18nSimplifiedChinese.cpp
index eafaf004..8da34e06 100644
--- a/src/app/I18nSimplifiedChinese.cpp
+++ b/src/app/I18nSimplifiedChinese.cpp
@@ -3884,6 +3884,7 @@ constexpr Entry kSimplifiedChinese[] = {
"可用内存不足以运行 %s:将会跳过。请先关闭其他应用。"},
{"Not now",
"暂时不要"},
+ {"Terms & refunds", "条款与退款"},
{"Nothing about memberships for a week.",
"一周内不再显示会员方案。"},
{"Nothing else is sent: no folders, no user name, no model details. Needs the Discord app running.",
diff --git a/src/app/I18nSpanish.cpp b/src/app/I18nSpanish.cpp
index 8a63ea2a..836e1c80 100644
--- a/src/app/I18nSpanish.cpp
+++ b/src/app/I18nSpanish.cpp
@@ -4321,6 +4321,7 @@ constexpr Entry kSpanish[] = {
"No hay memoria libre suficiente para %s: se omitirá. Cierra antes otras aplicaciones."},
{"Not now",
"Ahora no"},
+ {"Terms & refunds", "Términos y reembolsos"},
{"Nothing about memberships for a week.",
"Nada sobre membresías durante una semana."},
{"Nothing else is sent: no folders, no user name, no model details. Needs the Discord app running.",
diff --git a/src/app/I18nTraditionalChinese.cpp b/src/app/I18nTraditionalChinese.cpp
index 6fc3b2fa..8f84889d 100644
--- a/src/app/I18nTraditionalChinese.cpp
+++ b/src/app/I18nTraditionalChinese.cpp
@@ -3882,6 +3882,7 @@ constexpr Entry kTraditionalChinese[] = {
"可用記憶體不足以執行 %s:將會略過。請先關閉其他應用程式。"},
{"Not now",
"現在不要"},
+ {"Terms & refunds", "條款與退款"},
{"Nothing about memberships for a week.",
"一週內不再顯示會員方案。"},
{"Nothing else is sent: no folders, no user name, no model details. Needs the Discord app running.",
diff --git a/src/app/PanelSupportCard.cpp b/src/app/PanelSupportCard.cpp
index a32b8833..7fd194c2 100644
--- a/src/app/PanelSupportCard.cpp
+++ b/src/app/PanelSupportCard.cpp
@@ -151,6 +151,7 @@ void App::closeSupportCard() {
}
void App::openSupportLink(const char* url) {
+ if (!url || !supportLinkAllowed(url)) return;
++supportPageRequests_;
if (!interactive()) { // UI tests, renders and demos never start a browser
status_ = std::string("Support SculptForge: ") + url;
@@ -341,6 +342,7 @@ void App::drawSupportCard() {
const float tierTop = b.y - footer - tierH;
const char* clicked = nullptr;
bool discord = false; // the Discord pill in the footer (opens the invite, keeps the card)
+ bool terms = false; // Terms & refunds in the footer (opens the terms page, keeps the card)
for (int i = 0; i < 2; ++i) {
const Tier& tier = kTiers[i];
const bool featured = i == 0;
@@ -477,6 +479,11 @@ void App::drawSupportCard() {
ImVec2(g0.x + 3.0f * k, g1.y + 5.0f * k), tc(hot ? ink : accent, fa));
const float my = (g0.y + g1.y) * 0.5f, r = 1.6f * k;
for (int i = -1; i <= 1; ++i) dl->AddCircleFilled(ImVec2((g0.x + g1.x) * 0.5f + float(i) * 4.5f * k, my), r, tc(bg, fa));
+ // The fine print: the membership terms (refunds, cancelling), after the pill.
+ const char* label = tr("Terms & refunds");
+ const float tx = std::floor(c0.x + paint.measure(boldUi, 15.0f, "Join the members on Discord").x + 44.0f * k + glyph +
+ 10.0f * k + 24.0f * k);
+ terms = link(label, "##card.terms", ImVec2(tx, std::floor(fy - paint.measure(bodyFont, 15.0f, label).y * 0.5f)), dim, true);
}
bool later = false, supporter = false;
{
@@ -503,6 +510,8 @@ void App::drawSupportCard() {
closeSupportCard();
} else if (discord) {
openDiscordPage(); // the card stays: a membership may still follow
+ } else if (terms) {
+ openSupportLink(kTermsUrl); // the card stays too
} else if (supporter) {
closeSupportCard();
verifyMember(); // the small card shows the sign-in's steps
@@ -650,6 +659,20 @@ void App::drawMemberCard() {
ImGui::SameLine();
const bool already = ImGui::Button(tr("I'm already a member##member_card.already"));
if (ImGui::IsItemHovered()) ImGui::SetTooltip(tr("Sign in with GitHub (the member builds' sign-in): no more cards."));
+ { // the fine print: the membership terms (refunds, cancelling), a quiet link after the buttons (or under them)
+ const char* terms = tr("Terms & refunds##member_card.terms");
+ ImGui::SameLine();
+ if (ImGui::GetContentRegionAvail().x < ImGui::CalcTextSize(terms, nullptr, true).x) ImGui::NewLine();
+ ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0, 0, 0, 0));
+ ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0, 0, 0, 0));
+ ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0, 0, 0, 0));
+ ImGui::PushStyleColor(ImGuiCol_Text, theme::textDim);
+ ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
+ if (ImGui::SmallButton(terms)) openSupportLink(kTermsUrl);
+ if (ImGui::IsItemHovered()) ImGui::SetMouseCursor(ImGuiMouseCursor_Hand);
+ ImGui::PopStyleVar();
+ ImGui::PopStyleColor(4);
+ }
if (become) {
openSupportPage(); // both choices (monthly, yearly) on the membership page
memberCardChoice(MemberCardChoice::Become);
diff --git a/src/app/Support.h b/src/app/Support.h
index 5e7e88ff..35de10d0 100644
--- a/src/app/Support.h
+++ b/src/app/Support.h
@@ -31,6 +31,14 @@ inline constexpr const char* kSupportUrlMember = "https://buy.stripe.com/aFacN5h
inline constexpr const char* kSupportUrlMemberYearly = "https://buy.stripe.com/aFa5kD4eHfhE2an6il4F206"; // $48 / year
inline constexpr const char* kSupportUrlStudio = "https://buy.stripe.com/3cI00j12v5H4g1dgWZ4F204"; // Founding Studio, $150 / month
inline constexpr const char* kStudioPageUrl = "https://sculptforge.app/studios.html#membership";
+// The membership terms (refunds, cancelling): the page website/support.html and studios.html link to.
+inline constexpr const char* kTermsUrl = "https://sculptforge.app/terms.html";
+// The fixed links the membership cards may open (App::openSupportLink refuses anything else).
+inline bool supportLinkAllowed(std::string_view url) {
+ for (const char* u : {kSupportUrlMember, kSupportUrlMemberYearly, kSupportUrlStudio, kStudioPageUrl, kTermsUrl})
+ if (u[0] != '\0' && url == u) return true;
+ return false;
+}
// The promise next to members' early builds. Worded the same in the app, on the membership page and in the guide
// (tests/test_support.cpp checks the membership page).
inline constexpr const char* kFreeReleaseNote =
diff --git a/tests/test_support.cpp b/tests/test_support.cpp
index 9f4a3c77..e3f75894 100644
--- a/tests/test_support.cpp
+++ b/tests/test_support.cpp
@@ -175,12 +175,26 @@ TEST(support_card_links_match_the_website) {
}
CHECK(studios.find("GPL-3.0") != std::string::npos && studios.find("no exclusive or secret features") != std::string::npos);
CHECK(std::string(kStudioPageUrl) == "https://sculptforge.app/studios.html#membership");
+ // Terms & refunds: the terms page exists, carries the refund wording and is linked from both pages.
+ CHECK(std::string(kTermsUrl) == "https://sculptforge.app/terms.html");
+ const std::string terms = read("terms.html");
+ CHECK(terms.find("id=\"refunds\"") != std::string::npos && terms.find("Memberships aren't refundable.") != std::string::npos);
+ CHECK(page.find("href=\"terms.html#refunds\"") != std::string::npos);
+ CHECK(studios.find("href=\"terms.html") != std::string::npos);
// Founding Members and Member Requests on the membership page; its counter reads founding.json.
CHECK(page.find("Founding Member") != std::string::npos);
CHECK(page.find("Member Requests") != std::string::npos);
CHECK(page.find("founding.json") != std::string::npos);
}
+TEST(support_card_opens_only_its_fixed_links) {
+ for (const char* url : {kSupportUrlMember, kSupportUrlMemberYearly, kSupportUrlStudio, kStudioPageUrl, kTermsUrl})
+ CHECK(url[0] == '\0' || supportLinkAllowed(url));
+ for (const char* url : {"", "https://sculptforge.app/terms.html.evil.example", "https://sculptforge.app/terms.htm",
+ "file:///etc/passwd", "https://buy.stripe.com/", "javascript:alert(1)"})
+ CHECK(!supportLinkAllowed(url));
+}
+
TEST(support_card_timing) {
// The full card: the first start only (Help > Support and the welcome open it by hand).
SupportCardPrefs p;
diff --git a/tests/ui/member_card.sfui b/tests/ui/member_card.sfui
index 2392feb0..f1c35d61 100644
--- a/tests/ui/member_card.sfui
+++ b/tests/ui/member_card.sfui
@@ -28,9 +28,14 @@ expect "Not now##member_card.not_now"
expect "I'm already a member##member_card.already"
expect_no_text Don't show again
shot sculpted
+# Terms & refunds (the fine print) opens the membership terms; the card stays.
+click "Terms & refunds##member_card.terms"
+expect_value support_requests == 1
+expect_status https://sculptforge.app/terms.html
+expect_value member_card_open == 1
# Become a member opens the membership page (both choices); the card goes, back in a week.
click "Become a member##member_card.become"
-expect_value support_requests == 1
+expect_value support_requests == 2
expect_status https://sculptforge.app/support.html
expect_value member_card_open == 0
# Once per session: more sculpting brings nothing more.
diff --git a/tests/ui/support_card.sfui b/tests/ui/support_card.sfui
index b113e77a..9d0d751c 100644
--- a/tests/ui/support_card.sfui
+++ b/tests/ui/support_card.sfui
@@ -63,6 +63,20 @@ expect_value support_requests == 3
expect_status https://sculptforge.app/studios.html#membership
wait 0.4
+# Terms & refunds in the footer opens the membership terms (kTermsUrl) and keeps the card open.
+click "Preferences##palette.preferences" # (Support stays expanded)
+click "Show the memberships"
+wait 0.8
+expect_text Terms & refunds
+click "##card.terms"
+expect_value support_requests == 4
+expect_status https://sculptforge.app/terms.html
+wait 0.4
+expect_value support_card_open == 1
+key Escape
+wait 0.4
+expect_value support_card_open == 0
+
# Not now and Esc close it.
click "Preferences##palette.preferences" # (Support stays expanded)
click "Show the memberships"
@@ -94,4 +108,4 @@ support_card first_run
expect_value support_card_open == 0
click "Preferences##palette.preferences" # (Support stays expanded)
expect_text Thank you for being a member! No membership cards show.
-expect_value support_requests == 3
+expect_value support_requests == 4