diff --git a/game-api/src/games/valheim.js b/game-api/src/games/valheim.js index aa7c5a5..564558d 100644 --- a/game-api/src/games/valheim.js +++ b/game-api/src/games/valheim.js @@ -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, }); } diff --git a/game-api/src/index.js b/game-api/src/index.js index 283e77c..ec65551 100644 --- a/game-api/src/index.js +++ b/game-api/src/index.js @@ -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), diff --git a/ui/src/components/ServerCard.js b/ui/src/components/ServerCard.js index e1ae165..c11cb64 100644 --- a/ui/src/components/ServerCard.js +++ b/ui/src/components/ServerCard.js @@ -298,6 +298,9 @@ export default function ServerCard({ setStatus(newStatus); }} > + {features.includes("updateOnStart") && ( +
Update +
+ )} Start )} diff --git a/ui/src/styles/global.scss b/ui/src/styles/global.scss index 8e34820..4c18069 100644 --- a/ui/src/styles/global.scss +++ b/ui/src/styles/global.scss @@ -49,3 +49,11 @@ html { .ss-container { text-align: center; } + +.button-supertext { + position: absolute; + top: -3px; + right: 8px; + font-size: 0.5rem; + color: green; +}