Skip to content

Commit a4fbe7f

Browse files
TwoBoxForm: add step "pls_read" and "IsNewTerrainAndSaveSystem" to better rule out user error in setup
1 parent 1756dfc commit a4fbe7f

2 files changed

Lines changed: 29 additions & 2 deletions

File tree

UIMod/onboard_bundled/twoboxform/twoboxform.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ document.addEventListener('DOMContentLoaded', () => {
8585
const configField = document.getElementById('config-field').value;
8686
let nextStep = document.getElementById('next-step').value;
8787

88-
if (step === "welcome") {
88+
if (step === "welcome" || step === "pls_read") {
8989
window.location.href = `/setup?step=${nextStep}`;
9090
return;
9191
}
@@ -131,7 +131,7 @@ document.addEventListener('DOMContentLoaded', () => {
131131

132132
// Handle boolean conversion for yes/no fields
133133
if (configField === "IsDiscordEnabled" || configField === "UPNPEnabled" ||
134-
configField === "ServerVisible" || configField === "UseSteamP2P" || configField === "IsSSCMEnabled") {
134+
configField === "ServerVisible" || configField === "UseSteamP2P" || configField === "IsSSCMEnabled" || configField === "IsNewTerrainAndSaveSystem") {
135135
body = JSON.stringify({
136136
[configField]: booleanToConfig(document.getElementById('primary-field').value)
137137
});

src/web/TwoBoxForm.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ func ServeTwoBoxFormTemplate(w http.ResponseWriter, r *http.Request) {
7979
SecondaryLabelType: "hidden",
8080
SubmitButtonText: "Start Setup",
8181
SkipButtonText: "Skip Setup",
82+
NextStep: "pls_read",
83+
},
84+
"pls_read": {
85+
ID: "pls_read",
86+
Title: "Please read!",
87+
HeaderTitle: "We strongly recommend you to read the texts in this setup wizard!",
88+
StepMessage: "Most reported issues occur because of a misconfiguration.",
89+
PrimaryLabel: "",
90+
SecondaryLabel: "",
91+
SecondaryLabelType: "hidden",
92+
SubmitButtonText: "I understand",
93+
SkipButtonText: "I understand",
8294
NextStep: "server_name",
8395
},
8496
"server_name": {
@@ -149,6 +161,21 @@ func ServeTwoBoxFormTemplate(w http.ResponseWriter, r *http.Request) {
149161
SubmitButtonText: "Save & Continue",
150162
SkipButtonText: "Use Release Version",
151163
ConfigField: "gameBranch",
164+
NextStep: "newterrain_and_savesystem",
165+
},
166+
167+
"newterrain_and_savesystem": {
168+
ID: "newterrain_and_savesystem",
169+
Title: "CHOOSE TERRAIN SYSTEM",
170+
HeaderTitle: "Very important step!",
171+
StepMessage: "Just switched to Beta? Flip Terrain and Save System to support that! Enter 'yes' to enable or 'no' to disable.",
172+
PrimaryPlaceholderText: "yes/no",
173+
PrimaryLabel: "Enable new System",
174+
SecondaryLabel: "",
175+
SecondaryLabelType: "hidden",
176+
SubmitButtonText: "Save & Continue",
177+
SkipButtonText: "Skip",
178+
ConfigField: "IsNewTerrainAndSaveSystem",
152179
NextStep: "network_config_choice",
153180
},
154181

0 commit comments

Comments
 (0)