Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
35a0838
reordered JsonConfig fields for improved clarity, backwards compatibile
JacksonTheMaster Sep 11, 2025
ffa4e0f
fixed steamcmd update via discord, updated /help
JacksonTheMaster Sep 11, 2025
9ea6a09
Update control panel (now pretty embed) and add steamcmd update funct…
JacksonTheMaster Sep 11, 2025
3ab3126
Updated Discord Panel screenshot
JacksonTheMaster Sep 11, 2025
555d841
added firstpass on gameserver auto updater, needs further testing
JacksonTheMaster Sep 11, 2025
2ca880a
Add AllowAutoGameServerUpdates config option and related UI elements
JacksonTheMaster Sep 11, 2025
a001e6e
moved steamcmd to own package
JacksonTheMaster Sep 11, 2025
99ed8da
refactored multiple sleep statements waiting for server to top before…
JacksonTheMaster Sep 11, 2025
233a9bb
renamed steamcmd app info file
JacksonTheMaster Sep 11, 2025
3d4b3c4
added runtime command to get buildID for debugging
JacksonTheMaster Sep 11, 2025
1697645
added restart warnings when auto updating
JacksonTheMaster Sep 11, 2025
adf980d
added localization strings for auto gameserver updater
JacksonTheMaster Sep 11, 2025
4be06c0
added info text to config file
JacksonTheMaster Sep 11, 2025
2ce70cd
added discordgo-license.md and note in license as Discordgo requires …
JacksonTheMaster Sep 11, 2025
a9d10ec
updated misleading UIText_StartLocalHostInfo localization key
JacksonTheMaster Sep 11, 2025
a639237
updated config version and branch
JacksonTheMaster Sep 11, 2025
c3b551b
renamed devcontainer
JacksonTheMaster Sep 12, 2025
bc1fd14
- Removed initialization of the SteamCMD app info poller in the insta…
JacksonTheMaster Sep 12, 2025
bcef1c2
Add printconfig command and enhance PrintConfigDetails logging
JacksonTheMaster Sep 12, 2025
dc1a109
added cmdargs (from SteamServerUI)
JacksonTheMaster Sep 12, 2025
f565580
fixed flags showing on login page
JacksonTheMaster Sep 12, 2025
226ffd2
twoboxform recieved a makeover
JacksonTheMaster Sep 12, 2025
5fe2f17
TwoBoxForm Setup now simplifies SaveInfo setup (usual error source)
JacksonTheMaster Sep 12, 2025
2fa16fc
added firstpass on worldID dropdown for SaveInfo
JacksonTheMaster Sep 12, 2025
f60b167
Dropdown now shows (eg) "Old Terrain Mars" and uses "Mars2"
JacksonTheMaster Sep 12, 2025
6805256
2bxform now auto-selects available world types based on GetIsNewTerra…
JacksonTheMaster Sep 12, 2025
fc99da4
added some css for 2bxform, dropdown and mobile style (none) for prog…
JacksonTheMaster Sep 12, 2025
dc85272
updated / added localization for reworked save_identifier step
JacksonTheMaster Sep 12, 2025
f9f8d9b
removed scale transformation on 2bxform select focus
JacksonTheMaster Sep 12, 2025
b1c6ce8
updated game branch selection to also use new dropdown style
JacksonTheMaster Sep 12, 2025
9e40650
enhance localization for save file configuration and add wizard button
JacksonTheMaster Sep 12, 2025
c2444da
some more localization polishes
JacksonTheMaster Sep 12, 2025
bc6a114
fixed ssui discod icon (again)
JacksonTheMaster Sep 12, 2025
d991393
increased steam update check interval to 10 minutes
JacksonTheMaster Sep 12, 2025
b6609f3
added exit setup button
JacksonTheMaster Sep 12, 2025
f339794
fixed bug with 2bxform where /changeuser would show something went wr…
JacksonTheMaster Sep 12, 2025
4c7585e
update desc texts for recovery cmd arg
JacksonTheMaster Sep 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "StationeersServerUI (Go+Svelte)",
"name": "StationeersServerUI",
"build": {
"dockerfile": "Dockerfile",
"args": { "TZ": "${localEnv:TZ:Europe/Stockholm}" }
Expand Down
132 changes: 39 additions & 93 deletions UIMod/onboard_bundled/localization/de-DE.json

Large diffs are not rendered by default.

119 changes: 32 additions & 87 deletions UIMod/onboard_bundled/localization/en-US.json

Large diffs are not rendered by default.

125 changes: 35 additions & 90 deletions UIMod/onboard_bundled/localization/sv-SE.json

Large diffs are not rendered by default.

145 changes: 144 additions & 1 deletion UIMod/onboard_bundled/twoboxform/twoboxform.css
Original file line number Diff line number Diff line change
Expand Up @@ -482,4 +482,147 @@ footer {
h1 {
font-size: 1.2rem;
}
}

}
@media (max-width: 800px) {
.progress-bar {
display: none !important;
}
}
@media (max-height: 1050px) {
.progress-bar {
display: none !important;
}
}

.progress-bar {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
margin-top: 20px;
padding-top: 10px;
margin-bottom: 20px;
}

.progress-step {
display: flex;
flex-direction: column;
align-items: center;
width: 80px;
text-align: center;
}

.progress-circle {
display: block;
width: 20px;
height: 20px;
border-radius: 50%;
opacity: 0.7;
border: 2px solid var(--primary);
transition: all 0.3s ease;
}

.progress-circle.active {
background-color: var(--primary-dim);
scale: 1.2;
}

.progress-step.active .progress-circle {
background-color: var(--primary);
opacity: 1;
box-shadow: 0 0 10px var(--primary-glow);
}

.progress-circle:hover {
background-color: var(--primary);
transform: scale(1.2);
}

.progress-label {
font-size: 0.7rem;
color: var(--primary-dim);
margin-top: 5px;
text-wrap: balance;
line-height: 1.2;
}

.progress-step.active .progress-label {
color: var(--text-bright);
}

#progress-bar-container {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
padding: 10px 0;
z-index: 100;
display: flex;
justify-content: center;
}

select {
width: 100%;
padding: 12px;
background-color: rgba(0, 0, 0, 0.6);
color: var(--primary);
border: 2px solid var(--primary-dim);
border-radius: 4px;
font-family: 'Share Tech Mono', monospace;
transition: all 0.3s ease;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background-image: url("data:image/svg+xml;utf8,<svg fill='rgb(0,255,171)' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
background-repeat: no-repeat;
background-position: right 12px top 50%;
}

select:focus {
border-color: var(--primary);
box-shadow: 0 0 20px var(--primary-glow);
outline: none;
}

option {
background-color: var(--bg-panel);
color: var(--primary);
padding: 10px;
font-family: 'Share Tech Mono', monospace;
font-size: 1rem;
}

option:hover {
background-color: var(--primary-dim);
color: var(--text-bright);
}


#exit-button-container {
position: absolute;
top: 15px;
right: 15px;
display: flex;
gap: 10px;
cursor: pointer;
font-variant-emoji: text;
color: #00ffab;
}

#exit-button-container img{
width: 30px;
height: 20px;
cursor: pointer;
transition: transform 0.5s ease;
}

#exit-button-container img {
opacity: 0.7;
}

#exit-button-container img:hover {
scale: 1.1;
animation: wave 3s infinite;
opacity: 1;
}
40 changes: 33 additions & 7 deletions UIMod/onboard_bundled/twoboxform/twoboxform.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ <h2>Preparing...</h2>
<p>Preparing {{.Title}}</p>
</div>
</div>
{{if ne .Step "welcome"}}
{{if and (eq .Mode "setup") (ne .Step "welcome")}}
<div id="language-flags">
<img src="/static/flags/en.webp" alt="English" data-lang="en-US" title="English">
<img src="/static/flags/de.webp" alt="German" data-lang="de-DE" title="German">
<img src="/static/flags/sv.webp" alt="Swedish" data-lang="sv-SE" title="Swedish">
</div>
{{end}}
<main class="two-box-form-container">
{{if and (eq .Mode "setup") (ne .Step "welcome")}}
<div id="exit-button-container" alt="Exit Setup" title="Exit Setup" onclick="window.location.href = '/'">❌</div>
{{end}}
<header>
<h1>{{.Title}}</h1>
<br/>
Expand Down Expand Up @@ -67,13 +70,22 @@ <h2>{{.HeaderTitle}}</h2>
{{if ne .SecondaryLabel ""}}
<div class="form-group">
<label for="secondary-field">{{.SecondaryLabel}}</label>
{{if eq .SecondaryLabelType "dropdown"}}
<select id="secondary-field" name="secondary-field" required>
<option value="">{{.SecondaryPlaceholderText}}</option>
{{range .SecondaryOptions}}
<option value="{{.Value}}">{{.Display}}</option>
{{end}}
</select>
{{else}}
<input
type="{{.SecondaryLabelType}}"
id="secondary-field"
name="secondary-field"
placeholder="{{.SecondaryPlaceholderText}}"
required
>
type="{{.SecondaryLabelType}}"
id="secondary-field"
name="secondary-field"
placeholder="{{.SecondaryPlaceholderText}}"
required
>
{{end}}
</div>
{{end}}

Expand Down Expand Up @@ -107,10 +119,24 @@ <h2>{{.HeaderTitle}}</h2>
</div>

<footer>
<p>{{.FooterTextInfo}}</p>
<br>
<p>{{.FooterText}}</p>
</footer>
</main>

{{if and (eq .Mode "setup") (ne .Step "welcome")}}
<div id="progress-bar-container">
<div class="progress-bar">
{{range .Steps}}
<div class="progress-step {{if eq $.Step .ID}}active{{end}}">
<a href="/setup?step={{.ID}}" class="progress-circle"></a>
<span class="progress-label">{{.HeaderTitle}}</span>
</div>
{{end}}
</div>
{{end}}

<script src="/twoboxform/twoboxform.js"></script>
</body>
</html>
34 changes: 29 additions & 5 deletions UIMod/onboard_bundled/twoboxform/twoboxform.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ document.addEventListener('DOMContentLoaded', () => {
function booleanToConfig(value) {
if (typeof value === 'string') {
value = value.trim().toLowerCase();
if (value === 'yes' || value === 'true' || value === '1') {
if (value === 'yes' || value === 'true' || value === '1' || value === 'ja') {
return true;
} else if (value === 'no' || value === 'false' || value === '0') {
} else if (value === 'no' || value === 'false' || value === '0' || value === 'nej') {
return false;
}
}
Expand Down Expand Up @@ -135,6 +135,29 @@ document.addEventListener('DOMContentLoaded', () => {
body = JSON.stringify({
[configField]: booleanToConfig(document.getElementById('primary-field').value)
});

} else if (configField === "SaveInfo") {
const primaryValue = document.getElementById('primary-field').value.trim();
const secondaryValue = document.getElementById('secondary-field').value.trim();
if (secondaryValue === '' || secondaryValue === document.getElementById('secondary-field').placeholder) {
showNotification('Please select a world type!', 'error');
hidePreloader();
return; // Prevent submission
}
const joinedValue = `${primaryValue} ${secondaryValue}`;
body = JSON.stringify({
[configField]: joinedValue
});
} else if (configField === "gameBranch") {
const secondaryValue = document.getElementById('secondary-field').value.trim();
if (secondaryValue === '' || secondaryValue === document.getElementById('secondary-field').placeholder) {
showNotification('Please select a world type!', 'error');
hidePreloader();
return; // Prevent submission
}
body = JSON.stringify({
[configField]: secondaryValue
});
} else {
body = JSON.stringify({
[configField]: document.getElementById('primary-field').value
Expand Down Expand Up @@ -170,21 +193,22 @@ document.addEventListener('DOMContentLoaded', () => {
});
const data = await response.json();

if (response.ok) {
if (response.ok || response.status === 201) {
if (configField || step === "admin_account") {
hidePreloader();
showNotification(step === "admin_account" ? 'Admin account saved!' : 'Config saved!', 'success');
// Wait for backend response to complete before redirecting
try { await response.json(); } catch (e) {} // Ensure backend response is fully processed
window.location.href = `/setup?step=${nextStep}`;
setTimeout(() => {
window.location.href = `/setup?step=${nextStep}`;
}, 1000);
} else if (mode === 'login') {
showNotification('Login Successful!', 'success');
await preloadNextPage();
hidePreloader();
window.location.href = '/';
} else { // changeuser
hidePreloader();
const data = await response.json(); // Ensure backend response is processed
showNotification(data.message || 'User updated!', 'success');
form.reset();
}
Expand Down
10 changes: 10 additions & 0 deletions UIMod/onboard_bundled/ui/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ <h3 class="section-title">{{.UIText_BasicServerSettings}}</h3>
<input type="text" id="SaveInfo" name="SaveInfo" value="{{.SaveInfo}}"
pattern="^[A-Z].*(\s[A-Z].*)?$" required>
<div class="input-info">{{.UIText_SaveFileNameInfo}}</div>
<div class="button" style="cursor: pointer;" onclick="window.location.href = '/setup?step=save_identifier'">{{.UIText_SaveFileNameUseWizzardButtonText}}</div>
</div>

<div class="form-group">
Expand Down Expand Up @@ -240,6 +241,15 @@ <h3 class="section-title">{{.UIText_AdvancedConfiguration}}</h3>
</select>
<div class="input-info">{{.UIText_AutoStartServerOnStartupInfo}}</div>
</div>

<div class="form-group">
<label for="AllowAutoGameServerUpdates">{{.UIText_AllowAutoGameServerUpdates}}:</label>
<select id="AllowAutoGameServerUpdates" name="AllowAutoGameServerUpdates" required>
<option value="true" {{.AllowAutoGameServerUpdatesTrueSelected}}>TRUE</option>
<option value="false" {{.AllowAutoGameServerUpdatesFalseSelected}}>FALSE</option>
</select>
<div class="input-info">{{.UIText_AllowAutoGameServerUpdatesInfo}}</div>
</div>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion UIMod/onboard_bundled/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h3>

<discord-button>
<a href="https://discord.gg/8n3vN92MyJ" target="_blank">
<img src="https://cdn.discordapp.com/icons/1357524183260729404/3626cdbaa442efdad6e619a65b4f037a.png?size=128&quality=lossless"
<img src="https://cdn.discordapp.com/icons/1357524183260729404/c8d565e48353f54b854c8db296c49f7c.png?size=256&quality=lossless"
alt="SSUI Discord" width="40" height="40">
</a>
</discord-button>
Expand Down
Binary file modified media/discord-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func main() {
logger.ConfigureConsole()
logger.Install.Info("Starting setup...")
loader.ReloadConfig() // Load the config file before starting the setup process
loader.LoadCmdArgs()
setup.Install(&wg)
wg.Wait()
logger.Main.Debug("Initializing resources...")
Expand Down
23 changes: 16 additions & 7 deletions src/cli/runtimecommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/localization"
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/logger"
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/managers/gamemgr"
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/setup"
"github.com/JacksonTheMaster/StationeersServerUI/v5/src/steamcmd"
)

// ANSI escape codes for green text and reset
Expand Down Expand Up @@ -160,6 +160,8 @@ func init() {
RegisterCommand("testlocalization", WrapNoReturn(testLocalization), "tl")
RegisterCommand("supportmode", WrapNoReturn(supportMode), "sm")
RegisterCommand("supportpackage", WrapNoReturn(supportPackage), "sp")
RegisterCommand("getbuildid", WrapNoReturn(getBuildID), "gbid")
RegisterCommand("printconfig", WrapNoReturn(printConfig), "pc")
}

func startServer() {
Expand Down Expand Up @@ -191,13 +193,20 @@ func deleteConfig() {
}

func runSteamCMD() {
if gamemgr.InternalIsServerRunning() {
logger.Core.Warn("Server is running, stopping server first...")
gamemgr.InternalStopServer()
time.Sleep(10000 * time.Millisecond)
steamcmd.InstallAndRunSteamCMD()
}

func printConfig() {
loader.PrintConfigDetails("Info")
}

func getBuildID() {
buildID := config.GetCurrentBranchBuildID()
if buildID == "" {
logger.Core.Error("Build ID not found, empty string returned")
return
}
logger.Core.Info("Running SteamCMD")
setup.InstallAndRunSteamCMD()
logger.Core.Info("Build ID: " + buildID)
}

func testLocalization() {
Expand Down
Loading
Loading