can personalize UI message

This commit is contained in:
counterweight 2025-10-18 18:13:47 +02:00
parent 40d08e21ae
commit b4a769c557
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 30 additions and 1 deletions

View file

@ -27,6 +27,23 @@
</div>
<script>
// Load UI configuration on page load
async function loadConfig() {
try {
const response = await fetch('/api/config');
const config = await response.json();
// Update the title and heading with the UI message
document.title = config.uiMessage;
document.querySelector('h1').textContent = config.uiMessage;
} catch (error) {
console.error('Error loading config:', error);
}
}
// Load config when page loads
loadConfig();
document.getElementById('messageForm').addEventListener('submit', async (e) => {
e.preventDefault();