Files
qrcode-from-onetab/templates/queue.html
T
2025-12-19 02:19:09 +07:00

34 lines
1.2 KiB
HTML

{% extends "base.html" %} {% block title %}Queue Input{% endblock %} {% block
content %}
<div class="queue-title">
<h1 style="margin: 0">Add Links</h1>
<div>
<a href="/" class="btn" style="margin: 0">&larr; Home</a>
<a href="javascript:location.reload()" class="btn" style="margin: 0"
>Reload</a
>
</div>
</div>
<form method="POST" action="/queuein" class="queue-form">
<textarea id="lines" rows="20" cols="100" name="lines"></textarea>
<input type="submit" value="ahh" />
</form>
<script>
// lifted from google search ai
/**@type {HTMLTextAreaElement} */
(document.getElementById("lines")).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) }} {% endblock %}