Skip to content

Commit

Permalink
combobox z
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed May 4, 2024
1 parent e279327 commit a5a3236
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
@apply right-3;
}
.hw-combobox__listbox {
@apply rounded-2xl bg-subtle overflow-auto h-48 absolute w-full;
@apply rounded-2xl bg-subtle overflow-auto h-48 absolute w-full z-[500];
}

.hw-combobox__listbox .hw-combobox__option {
Expand Down
1 change: 1 addition & 0 deletions app/controllers/account_connections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def impersonate
else
if session[:parent_user].present?
user = User.find(session[:parent_user])
session[:parent_user] = nil
flash[:notice] = "signed as #{user.username}"
sign_in(:user, user)
redirect_to user_path(user.username)
Expand Down
10 changes: 7 additions & 3 deletions app/views/shared/_user_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<% if session[:parent_user_session] %>
<% if session[:parent_user] %>
<nav class="border-b-muted border-b bg-purple-600 text-white flex justify-center py-1">
<span class="text-xs">
Acting on behalf of <%= current_user.username %>
<%= link_to "back to parent", impersonate_account_connections_path, class: "text-link" %>
Acting on behalf of <span class="font-bold hover:underline">
<%= current_user.username %>
</span>
<span class="font-bold underline">
<%= link_to "back #{User.find(session[:parent_user]).username} label", impersonate_account_connections_path, class: "text-link" %>
</span>
</span>
</nav>
<% end %>
Expand Down

0 comments on commit a5a3236

Please sign in to comment.