39 lines
1.4 KiB
HTML
39 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Queue Input</title>
|
|
</head>
|
|
<body>
|
|
<form method="POST" action="/queuein">
|
|
<label for="lines">in:</label>
|
|
<textarea
|
|
id="l"
|
|
rows="20"
|
|
cols="100"
|
|
style="min-width: 20%; min-height: 20dvh"
|
|
name="lines"
|
|
></textarea>
|
|
<input type="submit" value="ahh" />
|
|
</form>
|
|
<script>
|
|
/**@type {HTMLTextAreaElement} */
|
|
(
|
|
// lifted from google search ai
|
|
document.getElementById("l")
|
|
).addEventListener("keydown", function (e) {
|
|
// Check for Ctrl+Enter (Windows/Linux) or Command+Enter (Mac)
|
|
if ((e.ctrlKey || e.metaKey) && e.key === "Enter") {
|
|
e.preventDefault(); // Prevent the default newline character
|
|
// Submit the form associated with this textarea
|
|
this.form.submit();
|
|
}
|
|
});
|
|
</script>
|
|
{% from "macros.html" import qrcode_queue %} {% if queue_items %}
|
|
<p>total: {{ queue_items|length }}</p>
|
|
{% endif %} {{ qrcode_queue(queue_items) }}
|
|
</body>
|
|
</html>
|