try fix autocomplete
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 4m8s

This commit is contained in:
Karl 2025-07-09 10:39:12 +01:00
parent 0bea8c6e0b
commit ba63f64e98

View File

@ -67,7 +67,9 @@
</div>
<div class="form-group">
<label for="stream">Stream Name</label>
<input type="text" class="form-control" id="stream" name="stream" required>
<div class="awesomplete">
<input type="text" class="form-control" id="stream" name="stream" required>
</div>
</div>
<button type="submit" class="btn btn-primary" id="submitButton">
<span class="spinner-border spinner-border-sm" id="loadingSpinner" role="status" aria-hidden="true"></span>
@ -106,12 +108,12 @@
document.addEventListener("DOMContentLoaded", function() {
var streamInput = document.getElementById("stream");
var awesomplete = new Awesomplete(streamInput);
fetch('/get_stream_names')
.then(response => response.json())
.then(data => {
awesomplete.list = data.map(item => item.streamName);
new Awesomplete(streamInput, {
list: data.map(item => item.streamName)
});
});
});
</script>