mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-17 07:52:53 +00:00
48 lines
2.4 KiB
Plaintext
48 lines
2.4 KiB
Plaintext
<nav class="bg-white shadow-lg">
|
|
<div class="container mx-auto px-4">
|
|
<div class="flex justify-between items-center py-4">
|
|
<div class="flex items-center space-x-8">
|
|
<%= link_to "TurboVault", root_path, class: "text-2xl font-bold text-indigo-600" %>
|
|
|
|
<% if user_signed_in? %>
|
|
<div class="hidden md:flex space-x-4">
|
|
<%= link_to "Dashboard", dashboard_path, class: "text-gray-700 hover:text-indigo-600" %>
|
|
<%= link_to "Games", games_path, class: "text-gray-700 hover:text-indigo-600" %>
|
|
<%= link_to "Collections", collections_path, class: "text-gray-700 hover:text-indigo-600" %>
|
|
<% if current_user.igdb_sync_enabled? %>
|
|
<%
|
|
# Count games with pending suggestions (not total suggestions)
|
|
pending_count = current_user.games
|
|
.igdb_unmatched
|
|
.joins(:igdb_match_suggestions)
|
|
.where(igdb_match_suggestions: { status: 'pending' })
|
|
.distinct
|
|
.count
|
|
%>
|
|
<%= link_to igdb_matches_path, class: "text-gray-700 hover:text-indigo-600 relative" do %>
|
|
IGDB
|
|
<% if pending_count > 0 %>
|
|
<span class="absolute -top-2 -right-2 bg-red-500 text-white text-xs rounded-full h-5 w-5 flex items-center justify-center">
|
|
<%= pending_count %>
|
|
</span>
|
|
<% end %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="flex items-center space-x-4">
|
|
<% if user_signed_in? %>
|
|
<%= link_to "Profile", profile_path(current_user.username), class: "text-gray-700 hover:text-indigo-600" %>
|
|
<%= link_to "Settings", settings_path, class: "text-gray-700 hover:text-indigo-600" %>
|
|
<%= button_to "Logout", logout_path, method: :delete, class: "px-4 py-2 bg-gray-200 rounded hover:bg-gray-300" %>
|
|
<% else %>
|
|
<%= link_to "Login", login_path, class: "text-gray-700 hover:text-indigo-600" %>
|
|
<%= link_to "Sign Up", signup_path, class: "px-4 py-2 bg-indigo-600 text-white rounded hover:bg-indigo-700" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|