Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 UIMod/onboard_bundled/assets/apiinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<body>
<div id="space-background"></div>
<header>
<img src="/static/stationeers.png" alt="Stationeers Banner" id="banner">
<img src="/static/stationeers.webp" alt="Stationeers Banner" id="banner">
</header>
<main>
<h1>About the Server API (Incomplete)</h1>
Expand Down
56 changes: 56 additions & 0 deletions UIMod/onboard_bundled/assets/css/flags.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

#language-flags {
position: absolute;
top: 15px;
right: 10px;
display: flex;
gap: 10px;
}

#welcome-flags {
display: flex;
gap: 10px;
justify-content: space-evenly;
margin-top: 15px
}

#language-flags img, #welcome-flags img{
width: 30px;
height: 20px;
cursor: pointer;
transition: transform 0.5s ease;
}

#language-flags img {
opacity: 0.7;
}

#language-flags img:hover, #welcome-flags img:hover {
scale: 1.1;
animation: wave 3s infinite;
opacity: 1;
}

@keyframes wave {
0% {
transform: perspective(200px) rotateY(0deg) scaleX(1);
}
25% {
transform: perspective(200px) rotateY(10deg) scaleX(0.95);
}
50% {
transform: perspective(200px) rotateY(0deg) scaleX(1);
}
75% {
transform: perspective(200px) rotateY(-10deg) scaleX(0.95);
}
100% {
transform: perspective(200px) rotateY(0deg) scaleX(1);
}
}

@media (max-width: 767px) {
#language-flags, #welcome-flags {
display: none;
}
}
Binary file added UIMod/onboard_bundled/assets/flags/de.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added UIMod/onboard_bundled/assets/flags/en.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added UIMod/onboard_bundled/assets/flags/sv.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions UIMod/onboard_bundled/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,29 @@ document.addEventListener('DOMContentLoaded', () => {
}
console.warn("If you see errors for sscm.js or sscm.css, you may want to enable SSCM.");
}
// Language flag selection
const languageFlags = document.querySelectorAll('#language-flags img');
languageFlags.forEach(flag => {
flag.addEventListener('click', async () => {
const lang = flag.dataset.lang;
try {
const response = await fetch('/api/v2/saveconfig', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ LanguageSetting: lang })
});
const data = await response.json();
if (response.ok) {
window.location.reload();
} else {
console.error(data.error);
}
} catch (error) {
console.error('Language setting error:', error);
}

});
});
});

// Global references to EventSource objects
Expand Down
Binary file removed UIMod/onboard_bundled/assets/stationeers.png
Binary file not shown.
Binary file added UIMod/onboard_bundled/assets/stationeers.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<body>
<div id="space-background"></div>
<header>
<img src="/static/stationeers.png" alt="Stationeers Banner" id="banner">
<img src="/static/stationeers.webp" alt="Stationeers Banner" id="banner">
</header>
<main>
<h1>Custom Detection Manager</h1>
Expand Down
11 changes: 7 additions & 4 deletions UIMod/onboard_bundled/localization/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"UIText_Update_SteamCMD": "Server Updaten",
"UIText_Console": "Konsole",
"UIText_Detection_Events": "Ereignisse",
"UIText_Backend_Log": "Backend Konsole",
"UIText_Backup_Manager": "Spielstands-Manager",
"UIText_Connected_PlayersHeader": "Verbundene Spieler",
"UIText_Discord_Info": "Tritt dem Discord bei und hilf uns SSUI besser zu machen oder Support anzufragen!",
"UIText_API_Info": "API-Endpunktdokumentation",
"UIText_Copyright": "Urheberrecht",
Expand Down Expand Up @@ -284,6 +286,7 @@
"UIText_Finalize_SubmitButton": "Zurück zum Start",
"UIText_Finalize_SkipButton": "Authentifizierung Überspringen",
"UIText_Login_Title": "Stationeers Server UI",
"UIText_Login_HeaderTitle": "Login",
"UIText_Login_PrimaryLabel": "Benutzername",
"UIText_Login_SecondaryLabel": "Passwort",
"UIText_Login_PrimaryPlaceholder": "Benutzername eingeben",
Expand All @@ -298,10 +301,10 @@
}
},
"BackendText": {
"top1": {},
"nest1": {
"nestINnest1": {},
"nestINnest2": {}
"gamemgr": {
"BackendText_ServerStarted": "Server gestartet.",
"BackendText_ServerNotRunningOrAlreadyStopped": "Server war nicht gestartet oder wurde bereits gestoppt",
"BackendText_ServerStopped": "Server gestoppt."
}
}
}
11 changes: 7 additions & 4 deletions UIMod/onboard_bundled/localization/sv-SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"UIText_Update_SteamCMD": "Uppdatera server",
"UIText_Console": "Konsol",
"UIText_Detection_Events": "Detekteringshändelser",
"UIText_Backend_Log": "Backend Konsol",
"UIText_Backup_Manager": "Backup-hanterare",
"UIText_Connected_PlayersHeader": "Konnekterade spelare",
"UIText_Discord_Info": "Gå med i Discord och hjälp till att förbättra SSUI eller få support!",
"UIText_API_Info": "API-slutpunktsreferens",
"UIText_Copyright": "Upphovsrätt",
Expand Down Expand Up @@ -284,6 +286,7 @@
"UIText_Finalize_SubmitButton": "Gå tillbaka till start",
"UIText_Finalize_SkipButton": "Hoppa över autentisering",
"UIText_Login_Title": "Stationeers Server UI",
"UIText_Login_HeaderTitle": "Logga in",
"UIText_Login_PrimaryLabel": "Användarnamn",
"UIText_Login_SecondaryLabel": "Lösenord",
"UIText_Login_PrimaryPlaceholder": "Ange användarnamn",
Expand All @@ -298,10 +301,10 @@
}
},
"BackendText": {
"top1": {},
"nest1": {
"nestINnest1": {},
"nestINnest2": {}
"gamemgr": {
"BackendText_ServerStarted": "Server startad.",
"BackendText_ServerNotRunningOrAlreadyStopped": "Servern kördes inte eller var redan stoppad",
"BackendText_ServerStopped": "Server stoppad."
}
}
}
20 changes: 18 additions & 2 deletions UIMod/onboard_bundled/twoboxform/twoboxform.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<title>{{.Title}}</title>
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/twoboxform/twoboxform.css">
<link rel="stylesheet" href="/static/css/flags.css">
</head>
<body>
<div id="space-background"></div>
Expand All @@ -19,7 +20,13 @@ <h2>Preparing...</h2>
<p>Preparing {{.Title}}</p>
</div>
</div>

{{if 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">
<header>
<h1>{{.Title}}</h1>
Expand All @@ -32,7 +39,7 @@ <h2>{{.HeaderTitle}}</h2>
<p class="step-message">{{.StepMessage}}</p>
{{end}}

<!-- Only show on finalize screen -->

{{if eq .Step "finalize"}}
<div class="config-summary">
<div id="config-details">
Expand Down Expand Up @@ -88,6 +95,15 @@ <h2>{{.HeaderTitle}}</h2>
<input type="hidden" id="config-field" value="{{.ConfigField}}">
<input type="hidden" id="next-step" value="{{.NextStep}}">
</form>

{{if eq .Step "welcome"}}
<div id="welcome-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}}

</div>

<footer>
Expand Down
28 changes: 28 additions & 0 deletions UIMod/onboard_bundled/twoboxform/twoboxform.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,32 @@ document.addEventListener('DOMContentLoaded', () => {
}
}
});

// Language flag selection
const languageFlags = document.querySelectorAll('#language-flags img, #welcome-flags img');
languageFlags.forEach(flag => {
flag.addEventListener('click', async () => {
const lang = flag.dataset.lang;
try {
showPreloader();
const response = await fetch('/api/v2/saveconfig', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ LanguageSetting: lang })
});
const data = await response.json();
if (response.ok) {
showNotification(`Language set to ${lang}`, 'success');
} else {
showNotification(data.error || 'Failed to set language', 'error');
}
} catch (error) {
console.error('Language setting error:', error);
showNotification('Error setting language!', 'error');
} finally {
hidePreloader();
}
window.location.reload();
});
});
});
8 changes: 7 additions & 1 deletion UIMod/onboard_bundled/ui/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@
<link rel="stylesheet" href="/static/css/background.css">
<link rel="stylesheet" href="/static/css/mobile.css">
<link rel="stylesheet" href="/static/css/config.css">
<link rel="stylesheet" href="/static/css/flags.css">
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
</head>

<body>
<div id="space-background"></div>
<header>
<img src="/static/stationeers.png" alt="Stationeers Banner" id="banner">
<img src="/static/stationeers.webp" alt="Stationeers Banner" id="banner">
<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>
</header>
<main>
<h1>{{.UIText_ServerConfig}}</h1>
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 @@ -29,7 +29,7 @@ <h2 id="popupTitle"></h2>
</div>
</div>
<header>
<img src="/static/stationeers.png" alt="Stationeers Banner" id="banner">
<img src="/static/stationeers.webp" alt="Stationeers Banner" id="banner">
<button onclick="window.location.href = '/auth/logout';" class="logout-icon" title="Logout"></button>
<button onclick="toggleGPUSaver()" class="gpusaver-icon"
title="Save GPU Power by disabling background Animations. Persistent until toggled off. Options: Focus (Default), Always, Disabled. If unsure, check developer tools -> Application -> Local Storage -> animationState"></button>
Expand Down
Loading
Loading