-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d89c79
commit 7b92818
Showing
6 changed files
with
97 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,58 @@ | ||
<%= render "nav_conversations" %> | ||
<turbo-frame data-turbo-permanent id="nav-conversations"> | ||
<section | ||
id="search" | ||
class="pt-6 text-gray-950 dark:text-gray-100 select-none" | ||
> | ||
<%= form_with(url: conversations_path, | ||
data: { turbo_frame: "nav_conversations", controller: "search" }, | ||
class: "contents", | ||
method: :get | ||
) do |form| %> | ||
<div class="relative ml-2 mr-5"> | ||
<%= form.text_field :query, | ||
value: @query, | ||
placeholder: "Search", | ||
id: "search-input", | ||
autofocus: @query.nil? ? false : true, | ||
class: %| | ||
w-full | ||
p-2 py-1 | ||
border border-gray-200 rounded-lg | ||
text-black dark:text-gray-800 | ||
|, | ||
data: { | ||
search_target: "input", | ||
turbo_permanent: true, | ||
action: %| | ||
blur->search#unfocus | ||
input->search#search | ||
%| | ||
} | ||
%> | ||
<%= icon "x-circle", | ||
variant: :mini, | ||
size: 18, | ||
class: "cursor-pointer text-gray-800 absolute right-1 top-1/2 transform -translate-y-1/2", | ||
data: { search_target: "clear", action: "click->search#clear" } | ||
%> | ||
</div> | ||
<% end %> | ||
</section> | ||
|
||
<section class="text-gray-950 dark:text-gray-100 select-none"> | ||
<turbo-frame id="conversations" | ||
target="conversation" | ||
data-controller="radio-behavior" | ||
data-radio-behavior-selected-class="relationship" | ||
class="block mb-24" <%# ensures the last conversation's menu has room to open %> | ||
> | ||
<% @nav_conversations.each do |named_time_span, conversations| %> | ||
<header class="mx-2 mt-6 mb-2 text-xs font-semibold text-gray-300 text-opacity-1 dark:text-gray-500"> | ||
<%= named_time_span %> | ||
</header> | ||
|
||
<%= render conversations %> | ||
<% end %> | ||
</turbo-frame> | ||
</section> | ||
</turbo-frame> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters