Skip to content

Commit

Permalink
Valheim: clarify 'Update + Start' button
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebual committed Dec 21, 2022
1 parent dc17223 commit 44913ca
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion game-api/src/games/valheim.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ const { spawnProcess } = require("../libjunkdrawer/fsPromises");
const fse = require("fs-extra");

module.exports = class ValheimManager extends GenericDockerManager {
updateOnStart = true;
getConnectUrl() {
return connectUrl;
}
async getPlayers() {
return await gamedigQueryPlayers({
type: "valheim", // Gamedig lacks Valheim but css is compatible
type: "valheim",
socketTimeout: 4000,
});
}
Expand Down
1 change: 1 addition & 0 deletions game-api/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ async function registerWithGateway() {
gameManager.getModSearch && "modSearch",
gameManager.getModPack && "modPack",
gameManager.update && "update",
gameManager.updateOnStart && "updateOnStart",
gameManager.filesToBackup && "backup",
gameManager.rcon && "rcon",
].filter(Boolean),
Expand Down
3 changes: 3 additions & 0 deletions ui/src/components/ServerCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ export default function ServerCard({
setStatus(newStatus);
}}
>
{features.includes("updateOnStart") && (
<div class="button-supertext">Update +</div>
)}
<StartIcon /> Start
</Button>
)}
Expand Down
8 changes: 8 additions & 0 deletions ui/src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ html {
.ss-container {
text-align: center;
}

.button-supertext {
position: absolute;
top: -3px;
right: 8px;
font-size: 0.5rem;
color: green;
}

0 comments on commit 44913ca

Please sign in to comment.