feat: check for password existence

This commit is contained in:
insects 2025-03-11 01:12:30 +01:00
parent b03df8f0e4
commit 498ecdf68b
7 changed files with 73 additions and 15 deletions

View file

@ -35,7 +35,7 @@
</span>
<% end %>
</div>
<div class="button">
<div class="action needs_pwd">
<% if is_popped %>
<button
class="action reset"
@ -49,7 +49,6 @@
hx-target="#nm-list"
>Pop</button>
<% end %>
</div>
</section>
<% end %>

View file

@ -0,0 +1,6 @@
<h1>Redirecting...</h1>
<div id="public_id" data-content="<%= @id %>"></div>
<div id="password" data-content="<%= @password %>"></div>
<%= javascript_include_tag "save_password" %>

View file

@ -1,9 +1,13 @@
<div id="public_id" data-content="<%= @instance.public_id %>"></div>
<div hx-get="" hx-trigger="every 30s" hx-swap="innerHTML" hx-target="this">
<header>
<img src="/icon.png" width="50" alt="eureka.coffee logo" />
<%= link_to root_path do %><img src="/icon.png" width="50" alt="eureka.coffee logo" /><% end %>
<h1><span class="muted">instance</span> <%= @instance.name %></h1>
<%= render partial: "zone_img", locals: { zone: @instance.zone, alt: @instance.zone, title: @instance.zone.upcase_first } %>
</header>
<%= render partial: "list", locals: { instance: @instance } %>
<%= javascript_include_tag "list" %>
</div>