<%= link_to "TurboVault", root_path, class: "text-2xl font-bold text-indigo-600" %> <% if user_signed_in? %>
<%= 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 %> <%= pending_count %> <% end %> <% end %> <% end %>
<% end %>
<% 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 %>