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

41 lines
1.6 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>
<link
rel="stylesheet"
href="{{ url_for('static', path='style.css') }}"
/>
</head>
<body>
<div style="display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 800px; margin-bottom: 20px;">
<h1 style="margin: 0;">Add Links</h1>
<a href="/" class="btn" style="margin: 0;">&larr; Home</a>
</div>
<form method="POST" action="/queuein">
<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) }}
</body>
</html>