Skip to content

Commit

Permalink
Small improvements to message display
Browse files Browse the repository at this point in the history
  • Loading branch information
renatolond committed Nov 21, 2024
1 parent 0fed8fa commit 2a7480d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/assets/stylesheets/bulma.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@

.chat .message {
--bulma-message-border-style: none;
width: 300px;
}
2 changes: 1 addition & 1 deletion app/controllers/conversations/messages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Conversations
class MessagesController < ApplicationController
def show
@profile_info = retro_meet_client.profile_info
@basic_profile_info = basic_profile_info
# TODO: everything here is a placeholder, make it real
@conversation = retro_meet_client.find_conversations.first
@messages = [
Expand Down
9 changes: 3 additions & 6 deletions app/views/conversations/messages/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@
%h1 Chat with #{@conversation.other_profile.display_name}
%hr
- @messages.each do |message|
- if message.sender == @profile_info.id
- if message.sender == @basic_profile_info.id
.media.chat-right
.message.is-success
.message-body
%p
#{message.content}
%p
%p.is-size-7.has-text-right
sent #{time_ago_in_words(message.sent_at)} ago
.media-right
%figure.image.is-48x48.is-32x32-mobile
%img.is-rounded{:alt => "Image", :src => @profile_info.profile_picture}/
- else
.media
.media-left
Expand All @@ -23,5 +20,5 @@
.message-body
%p
#{message.content}
%p
%p.is-size-7.has-text-right
sent #{time_ago_in_words(message.sent_at)} ago

0 comments on commit 2a7480d

Please sign in to comment.