mirror of
https://github.com/System-End/shipment-viewer.git
synced 2026-04-19 22:05:10 +00:00
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:
parent
3f29524703
commit
a7a99a6399
1 changed files with 16 additions and 1 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue