feat(panel): edit memoryMB from the Settings modal

Adds GET/POST /api/daemon/config (safe subset of server-config.json --
just memoryMB for now) and a "Resources" section in the existing Settings
modal. The Save and Save+restart buttons now POST both /api/server/settings
and /api/daemon/config; restartRequired is OR'd across the two endpoints.

Future fields like backupKeep / backupSchedule / bluemapDir can be added
by extending DAEMON_FIELDS in settings.js + the validation block in
RunCommand.cs. Sensitive fields (passwords, manifestUrl, ports) are
intentionally kept off this endpoint.
This commit is contained in:
Matt Sijbers
2026-05-20 21:25:47 +01:00
parent 9bf3cc69b0
commit 683c2c19ff
4 changed files with 116 additions and 5 deletions
+8 -1
View File
@@ -263,8 +263,15 @@
<button class="modal-close" aria-label="Close">×</button>
</div>
<p style="font-size: 12px; color: var(--text-muted); margin: 0 0 14px;">
These map to <code>server.properties</code>. MC reads them at startup, so changes need a server restart to take effect.
These map to <code>server.properties</code> and the daemon config. MC reads them at startup, so changes need a server restart to take effect.
</p>
<div class="settings-section-label">Resources</div>
<div class="settings-grid">
<label>Memory (MB)<input id="ssfMemoryMB" type="number" min="1024" max="65536" step="256" /></label>
</div>
<div class="settings-section-label" style="margin-top: 14px;">MC server.properties</div>
<div class="settings-grid">
<label>MOTD<input id="ssfMotd" type="text" /></label>
<label>Gamemode<select id="ssfGamemode">