| 1 | <% content_for :title, "Imports" %> |
| 2 | |
| 3 | <div class="max-w-2xl mx-auto px-4 sm:px-6 py-10"> |
| 4 | <div class="flex items-center justify-between mb-6"> |
| 5 | <h1 class="text-xl font-semibold text-gray-100">Imports</h1> |
| 6 | <%= link_to "Import a repo", new_import_path, class: "btn-primary text-xs py-1.5 px-3" %> |
| 7 | </div> |
| 8 | |
| 9 | <% if @imports.empty? %> |
| 10 | <div class="card px-6 py-12 text-center"> |
| 11 | <p class="text-sm text-gray-400 mb-4">You haven't imported anything yet.</p> |
| 12 | <%= link_to "Import from GitHub", new_import_path, class: "btn-primary" %> |
| 13 | </div> |
| 14 | <% else %> |
| 15 | <div class="card divide-y divide-surface-600"> |
| 16 | <% @imports.each do |import| %> |
| 17 | <%= link_to import_path(import), class: "flex items-center justify-between px-4 py-3 hover:bg-surface-600" do %> |
| 18 | <div class="min-w-0"> |
| 19 | <span class="text-sm text-gray-100"><%= import.target_name %></span> |
| 20 | <span class="text-xs text-gray-500 ml-2"><%= import.mirror? ? "mirror" : "migrate" %></span> |
| 21 | <div class="text-xs text-gray-500"><%= time_ago_in_words(import.created_at) %> ago</div> |
| 22 | </div> |
| 23 | <%= render "imports/status_badge", import: import %> |
| 24 | <% end %> |
| 25 | <% end %> |
| 26 | </div> |
| 27 | <% end %> |
| 28 | </div> |