fix some bugs n stuff
This commit is contained in:
parent
b925726977
commit
d7559647e2
7 changed files with 90 additions and 21 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue