Add tape printer settings panel and catalogue skin

This commit is contained in:
jessikitty committed 2026-10-12 21:32:14 +11:00
1 parent 70443028e3
commit 86b3f5a481
1 file changed
+64 -10
+64 -10
View File
@@ -2,17 +2,16 @@
{% block title %}Label Settings - Admin{% endblock %}
{% block extra_css %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/labels-bricklink.css') }}">
{% endblock %}
{% block content %}
<div class="row mb-4">
<div class="col">
<h1><i class="bi bi-sliders"></i> Label Settings</h1>
</div>
<div class="col-auto">
<a href="{{ url_for('labels.index') }}" class="btn btn-outline-secondary">
<i class="bi bi-arrow-left"></i> Back to labels
</a>
</div>
</div>
<div class="bl">
{% set section = 'settings' %}
{% set bar_sub = 'API keys, print defaults and the tape printer' %}
{% set crumbs = [{'name': 'Settings'}] %}
{% include 'admin/labels/_nav.html' %}
<div class="row">
<div class="col-lg-7">
@@ -65,6 +64,60 @@
</div>
</div>
<div class="card mb-3">
<div class="card-header"><strong>Tape printer (Brother VC-500W)</strong></div>
<div class="card-body row g-3">
<div class="col-12">
<p class="small text-muted mb-1">
The VC-500W is AirPrint-enabled, which means it speaks IPP on port 631.
Put its IP address here and LIM can send labels to it directly over the
network &mdash; no Brother driver, no P-touch Editor. Give the printer a
DHCP reservation first, or the address will move.
</p>
<p class="small text-muted">
Leave this blank to skip direct printing; tape labels can always be
downloaded as a PDF instead.
</p>
</div>
<div class="col-md-6">
<label class="form-label">Printer IP address or hostname</label>
<input type="text" name="tape_printer_host" class="form-control"
value="{{ tape_printer_host }}" placeholder="192.168.1.50">
</div>
<div class="col-md-3">
<label class="form-label">Port</label>
<input type="number" name="tape_printer_port" class="form-control"
value="{{ tape_printer_port }}">
</div>
<div class="col-md-3">
<label class="form-label">IPP path</label>
<input type="text" name="tape_printer_path" class="form-control"
value="{{ tape_printer_path }}" placeholder="/ipp/print">
</div>
<div class="col-md-6">
<label class="form-label">Default tape width</label>
<select name="tape_default" class="form-select">
{% for key, preset in tapes.items() %}
<option value="{{ key }}" {% if key == tape_default %}selected{% endif %}>{{ preset.name }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6">
<label class="form-label">Force document format</label>
<select name="tape_printer_format" class="form-select">
<option value="">Ask the printer (recommended)</option>
<option value="image/jpeg" {% if tape_printer_format == 'image/jpeg' %}selected{% endif %}>image/jpeg</option>
<option value="image/png" {% if tape_printer_format == 'image/png' %}selected{% endif %}>image/png</option>
<option value="application/pdf" {% if tape_printer_format == 'application/pdf' %}selected{% endif %}>application/pdf</option>
</select>
<div class="form-text">
Leave on "Ask the printer" unless it rejects jobs. Use
<em>Test connection</em> on the tape page to see what it accepts.
</div>
</div>
</div>
</div>
<button class="btn btn-danger"><i class="bi bi-check-lg"></i> Save settings</button>
</form>
</div>
@@ -92,4 +145,5 @@
</div>
</div>
</div>
</div>
{% endblock %}