Add Brother printer switcher proxied through one port, move sinatra to port 80

This commit is contained in:
randy committed 2026-09-12 00:31:36 +02:00
1 parent 2ea45b5f21
commit daa39320a6
3 files changed
+82 -2

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
<h1>Brother printers</h1>
<p>Choose a printer to open its label designer through this server.</p>
<div class="list-group" style="max-width: 400px;">
<% @printers.each do |key, info| %>
<form action="/brother/select" method="POST" class="mb-2">
<input type="hidden" name="printer" value="<%= key %>">
<button type="submit" class="btn <%= @selected == key ? 'btn-primary' : 'btn-outline-primary' %> w-100 text-start">
<%= info[:label] %>
<% if @selected == key %> (active) <% end %>
</button>
</form>
<% end %>
</div>
<% if @selected %>
<p class="mt-3"><a href="/brother/">Open <%= @printers[@selected][:label] %> &raquo;</a></p>
<% end %>