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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user