% # Auto-refresh if user just started a sync or has games being processed has_unmatched = @unmatched_games > 0 && @pending_review_count == 0 just_synced = current_user.igdb_last_synced_at && current_user.igdb_last_synced_at > 5.minutes.ago should_auto_refresh = has_unmatched && just_synced %> <% if should_auto_refresh %>
Last synced: <%= time_ago_in_words(current_user.igdb_last_synced_at) %> ago
No pending matches to review. Click "Sync Now" to search IGDB for your games!
<%= button_to "Sync Now", sync_now_igdb_matches_path, method: :post, class: "px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700" %> <% else %>All your games are matched with IGDB! 🎉
<% end %><%= game.platform.name %> · <%= game.format.titleize %> <% if game.date_added %> · Added <%= game.date_added.strftime("%b %Y") %> <% end %>
None of these match?
<%= button_to "Reject All Suggestions", reject_igdb_match_path(suggestions.first), method: :post, class: "px-4 py-2 bg-red-100 text-red-700 rounded hover:bg-red-200 text-sm font-medium", data: { turbo_confirm: "Reject all #{suggestions.count} suggestions for '#{game.title}'? You can manually match it later if needed." } %>