bullet_train-themes-light 1.0.23 → 1.0.24
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62876938f237b59152f1a3615cfa11eab6f99b5a8f019a2ea5ce2f474bddfd93
|
4
|
+
data.tar.gz: a60919cb5fa7ddde111e579b2dcda6153a18af2ae2f559e5ccbf8091eb076b12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb63d3b24365d86bef9efc547a94e2fd32baaea77db3d8875efeb8e782ab042540db70f3ca38899470868b05ffc4ff27e979aeeda5feeacb98fb8816ff37fe6c
|
7
|
+
data.tar.gz: 84daffe16622fb1279926d52e32c25ba9b4b49b0243f1b0276095029dfb11ee4d67daec0f8d9621367b688e298ff1a0480500faf956f6400e48b720bcd25bd5d
|
@@ -1,12 +1,21 @@
|
|
1
1
|
<% new_message ||= false %>
|
2
|
-
<%
|
2
|
+
<% current_author = defined?(current_user) ? current_user : send(BulletTrain::Conversations.current_participant_helper_method) %>
|
3
|
+
<% current_user_message = message.author == current_author %>
|
3
4
|
<% avatar = capture do %>
|
4
|
-
|
5
|
+
<% if message.membership %>
|
6
|
+
<img src="<%= membership_profile_photo_url(message.membership) %>" title="<%= message.user_name %>" alt="<%= message.user_name %>" class="w-6 h-6 rounded-full <%= current_user_message ? 'order-2' : 'order-1' %>">
|
7
|
+
<% elsif message.participant %>
|
8
|
+
<div class="<%= current_user_message ? 'order-2' : 'order-1' %>">
|
9
|
+
<% if BulletTrain::Conversations.respond_to?(:participant_avatar_partial) && BulletTrain::Conversations.participant_avatar_partial %>
|
10
|
+
<%= render BulletTrain::Conversations.participant_avatar_partial, participant: message.participant %>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
5
14
|
<% end %>
|
6
15
|
<% next_message ||= message.next_message %>
|
7
16
|
|
8
17
|
<%# A message series is a series of messages by the same user, each message within 5 minutes of the previous message. It has nothing to do with replies and message threads %>
|
9
|
-
<% next_message_in_series = (message.
|
18
|
+
<% next_message_in_series = (message.author == next_message&.author) && (message.created_at > next_message.created_at - 5.minutes) && (message.parent_message_id == next_message&.parent_message_id || message.id == next_message.parent_message_id)%>
|
10
19
|
<% if next_message_in_series %>
|
11
20
|
<% avatar = nil %>
|
12
21
|
<% end %>
|
@@ -28,7 +37,7 @@
|
|
28
37
|
<% timestamp = next_message_in_series || show_as_thread ? '' : time_ago_in_words(message.created_at) + " ago" %>
|
29
38
|
|
30
39
|
<% threaded_message = message.threaded? %>
|
31
|
-
<% thread_started_by_current_user = message.thread_origin_user ==
|
40
|
+
<% thread_started_by_current_user = message.thread_origin_user == current_author %>
|
32
41
|
<% last_message_in_thread = !placeholder_message && threaded_message && (message.next_message.nil? || message.next_message.thread_id != message.thread_id)%>
|
33
42
|
<% out_of_thread_message = !show_as_thread && threaded_message && message.reply? && message.previous_message != message.previous_message_in_thread %>
|
34
43
|
<% has_replies = message.replies.any? && message.next_message == message.next_message_in_thread %>
|
@@ -43,7 +52,7 @@
|
|
43
52
|
<div class="chat-message"
|
44
53
|
<% unless show_as_thread %>
|
45
54
|
data-reply-target="message"
|
46
|
-
data-user="<%= message.
|
55
|
+
data-user="<%= message.author.label_string %>"
|
47
56
|
data-message-id="<%= message.parent_message_id || message.id %>"
|
48
57
|
data-action="mouseleave->reply#hideReplyButton"
|
49
58
|
<% end %>
|
@@ -102,7 +111,7 @@
|
|
102
111
|
|
103
112
|
<div class="flex flex-grow order-1 <%= current_user_message ? 'justify-end items-end pr-8' : 'justify-start items-start pl-8' %> <%= 'mb-3' unless next_message_in_series %>">
|
104
113
|
<div class="<%= show_as_thread ? 'text-gray-400' : 'text-gray-300' %> text-sm">
|
105
|
-
<strong><%= message.
|
114
|
+
<strong><%= message.author.name %></strong>
|
106
115
|
<%= timestamp %>
|
107
116
|
</div>
|
108
117
|
</div>
|