|
1 | 1 | <div class="thread-message" style="margin-left: <%= depth * 6 %>px;" <% if (depth == 0) && message.children&.any? %>data-controller="thread"<% end %>> |
2 | 2 | <% if depth == 0 %> |
3 | 3 | <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-lg transition-shadow"> |
4 | | - <div class="p-5 <% if message.children&.any? %>cursor-pointer<% end %>" <% if message.children&.any? %>data-action="click->thread#toggle"<% end %>> |
| 4 | + <div class="p-5"> |
5 | 5 | <div class="flex items-start justify-between gap-4"> |
6 | 6 | <div class="flex-1 min-w-0"> |
7 | 7 | <h2 class="text-lg font-semibold text-gray-900 dark:text-gray-100 hover:text-red-600 dark:hover:text-red-400 transition-colors mb-2"> |
8 | 8 | <% if message.children&.any? %> |
9 | | - <svg class="w-4 h-4 inline-block transition-transform" data-thread-target="icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 9 | + <svg class="w-4 h-4 inline-block transition-transform cursor-pointer" data-thread-target="icon" data-action="click->thread#toggle" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
10 | 10 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path> |
11 | 11 | </svg> |
12 | 12 | <% end %> |
13 | 13 | <span class="px-0.5">[#<%= message.list_seq %>]</span> |
14 | | - <%= link_to without_list_prefix(message.subject), "/#{list.name}/#{message.list_seq}", data: {action: 'click->thread#toggle:stop'} %> |
| 14 | + <%= link_to without_list_prefix(message.subject), "/#{list.name}/#{message.list_seq}", data: {turbo_frame: 'message_content'} %> |
15 | 15 | <span class="text-sm text-gray-500 dark:text-gray-400 font-normal ml-2">— <%= message.from %></span> |
16 | 16 | </h2> |
17 | 17 | <div class="flex items-center gap-3 text-sm text-gray-600 dark:text-gray-400"> |
|
33 | 33 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"></path> |
34 | 34 | </svg> |
35 | 35 | <div class="flex-1 min-w-0"> |
36 | | - <%= link_to "/#{list.name}/#{message.list_seq}", class: "text-gray-900 dark:text-gray-100 hover:text-red-600 dark:hover:text-red-400 transition-colors" do %> |
| 36 | + <%= link_to "/#{list.name}/#{message.list_seq}", class: 'text-gray-900 dark:text-gray-100 hover:text-red-600 dark:hover:text-red-400 transition-colors', data: {turbo_frame: 'message_content'} do %> |
37 | 37 | <span class="px-0.5">[#<%= message.list_seq %>] <%= without_list_prefix(message.subject) %></span> |
38 | 38 | <% end %> |
39 | 39 | <span class="text-gray-500 dark:text-gray-400">— <%= message.from %></span> |
|
0 commit comments