fix it up a tad

This commit is contained in:
Luna D. 2024-06-06 23:16:49 +02:00
parent 34ff8abb36
commit 885af36339
No known key found for this signature in database
GPG key ID: 4B1C63448394F688
2 changed files with 10 additions and 8 deletions

View file

@ -1,6 +1,9 @@
- anon = is_nil(assigns[:noanon]) or @noanon == false
- options = if is_nil(assigns[:options]), do: "", else: @options
- deleted = Map.has_key?(@object, :hidden_from_users) and @object.hidden_from_users == true
elixir:
anon = is_nil(assigns[:noanon]) or @noanon == false
options = if is_nil(assigns[:options]), do: "", else: @options
deleted = Map.has_key?(@object, :hidden_from_users) and @object.hidden_from_users == true
hidden_if_deleted = if deleted, do: "hidden", else: ""
deleted_class = if deleted, do: "communication--deleted", else: ""
- avatar = cond do
- not is_nil(assigns[:image]) ->
@ -48,9 +51,6 @@
- else
=<> @body
- hidden_if_deleted = if deleted, do: "hidden", else: ""
- deleted_class = if deleted, do: "communication--deleted", else: ""
.flex.flex__grow.hidden--mobile class=deleted_class
.flex.flex__fixed.spacing--right class=hidden_if_deleted
= avatar

View file

@ -1,7 +1,9 @@
- post_link = ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}"
elixir:
post_link = ~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}?#{[post_id: @post.id]}" <> "#post_#{@post.id}"
- options = if true do
.flex__spacer.hidden--desktop
a.communication__interaction.hidden--desktop title="Link to post" href=post_link
a.communication__interaction.hidden--desktop title="Link to post" href="#{post_link}"
i.fa.fa-link
= if not is_nil(@post.edited_at) and can?(@conn, :show, @post) do
a href=~p"/forums/#{@post.topic.forum}/topics/#{@post.topic}/posts/#{@post}/history"