more admin functions (#16)

* add a favicon!

* add admin card and send email button

* Update main.rb to allow for email sending

* add user information to both public and internal!

* let's else that

---------

Co-authored-by: nora <163450896+24c02@users.noreply.github.com>
This commit is contained in:
Leo Wilkin 2025-01-06 18:25:55 +00:00 committed by GitHub
parent 3f29524703
commit a7a99a6399
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,21 @@
<script src="https://cdn.jsdelivr.net/npm/macy@2.5.1"></script>
<% end %>
<div class="container">
<% if @internal %>
<div class="card internal" style="margin-bottom: var(--spacing-3); display: flex; justify-content: space-between; align-items: center;">
<a href="/internal"><button class="button">← Back</button></a>
<h3>Viewing shipments for: <%= params[:email] %></h3>
<form action="/dyn/send_mail" method="post" style="display: inline;">
<input type="hidden" name="email" value="<%= params[:email] %>">
<button type="submit" class="button">Send Email</button>
</form>
</div>
<% else %>
<div class="card" style="margin-bottom: var(--spacing-3); display: flex; justify-content: space-between; align-items: center;">
<span>You're signed in as <a href="mailto:<%= params[:email] %>"><%= params[:email] %></a> 👋🏻</span>
<a href="/"><button type="submit" class="button">Not you?</button></a>
</div>
<% end %>
<% if @shipments.empty? %>
<img src="https://cloud-m5nxd8r27-hack-club-bot.vercel.app/0cleanshot_2025-01-02_at_14.18.09_2x.png" alt="no shipments?">
<% else %>
@ -26,4 +41,4 @@
700: 1,
}
});
</script>
</script>