fix some bugs n stuff

This commit is contained in:
zack 2024-10-24 20:22:37 -04:00
parent b925726977
commit d7559647e2
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
7 changed files with 90 additions and 21 deletions

View file

@ -1,7 +1,7 @@
<.header>
uploaded by <%= @image.user.email %>
<:actions>
<%= if(@image.user.email == @current_user.email) do %>
<%= if(@current_user && @image.user.email == @current_user.email) do %>
<.link patch={~p"/images/#{@image.file}/show/edit"} phx-click={JS.push_focus()}>
<.button>Edit image</.button>
</.link>
@ -9,9 +9,13 @@
</:actions>
</.header>
<img src={"https://s3.zoeys.computer/imgs/uploads/#{@image.file}.png"} />
<a target="_blank" href={"https://s3.zoeys.computer/imgs/uploads/#{@image.file}.png"}>
<img src={"https://s3.zoeys.computer/imgs/uploads/#{@image.file}.png"} />
</a>
<.back navigate={~p"/images"}>Back to images</.back>
<%= if(@current_user) do %>
<.back navigate={~p"/images"}>Back to images</.back>
<% end %>
<.modal
:if={@live_action == :edit}