| 1 | <% content_for :title, @repository.full_name %> |
| 2 | |
| 3 | <div class="mb-4"> |
| 4 | <%= link_to "← All repositories", admin_repositories_path, class: "text-sm text-gray-400 hover:text-gray-200" %> |
| 5 | </div> |
| 6 | |
| 7 | <div class="flex flex-wrap items-start justify-between gap-4 mb-6"> |
| 8 | <div> |
| 9 | <h1 class="text-xl font-semibold text-gray-100"> |
| 10 | <%= link_to @repository.user.username, admin_user_path(@repository.user.username), class: "text-gray-400 hover:text-gray-200" %>/<%= @repository.name %> |
| 11 | <% if @repository.is_private %><span class="ml-1 inline-flex items-center rounded bg-surface-600 text-gray-400 px-2 py-0.5 text-xs align-middle">private</span><% end %> |
| 12 | </h1> |
| 13 | <% if @repository.description.present? %><p class="text-sm text-gray-500 mt-1"><%= @repository.description %></p><% end %> |
| 14 | </div> |
| 15 | <%= link_to "Open on site ↗", @repository.html_url, target: "_blank", rel: "noopener", |
| 16 | class: "text-sm text-brand-400 hover:text-brand-300" %> |
| 17 | </div> |
| 18 | |
| 19 | <div class="grid grid-cols-2 lg:grid-cols-4 gap-3 mb-6"> |
| 20 | <%= render "admin/stat", label: "Kind", value: @repository.kind.capitalize %> |
| 21 | <%= render "admin/stat", label: "Stars", value: number_with_delimiter(@repository.stars_count) %> |
| 22 | <%= render "admin/stat", label: "Downloads", value: number_with_delimiter(@repository.downloads_count) %> |
| 23 | <%= render "admin/stat", label: "Initialized", value: (@repository.initialized? ? "Yes" : "No"), |
| 24 | accent: (@repository.initialized? ? "text-green-300" : "text-gray-300") %> |
| 25 | </div> |
| 26 | |
| 27 | <div class="rounded-lg border border-surface-600 bg-surface-800 divide-y divide-surface-600 text-sm"> |
| 28 | <div class="flex justify-between px-4 py-2.5"><span class="text-gray-500">Default branch</span><span class="text-gray-300 font-mono"><%= @repository.default_branch %></span></div> |
| 29 | <div class="flex justify-between px-4 py-2.5"><span class="text-gray-500">Disk path</span><span class="text-gray-400 font-mono text-xs truncate max-w-xs"><%= @repository.disk_path %></span></div> |
| 30 | <div class="flex justify-between px-4 py-2.5"><span class="text-gray-500">Visibility</span><span class="text-gray-300"><%= @repository.is_private ? "Private" : "Public" %></span></div> |
| 31 | <div class="flex justify-between px-4 py-2.5"><span class="text-gray-500">Created</span><span class="text-gray-300"><%= @repository.created_at.strftime("%b %-d, %Y %H:%M") %></span></div> |
| 32 | <div class="flex justify-between px-4 py-2.5"><span class="text-gray-500">Updated</span><span class="text-gray-300"><%= @repository.updated_at.strftime("%b %-d, %Y %H:%M") %></span></div> |
| 33 | </div> |