@page "/git" @inherits GitPage git — mb.bes.is

repositories @Repositories.Count

@if (Repositories.Count == 0) {

Nothing to browse: there are no repositories under @Service.Root.

} else {
@if (Owned) { } @foreach (var repository in Repositories) { @if (Owned) { } }
name description branchowneridle
@repository.DisplayName @(repository.Description ?? "") @(repository.Head ?? "")@(repository.Owner ?? "") @Age(repository.Tip?.Committer.When)
}
@code { private IReadOnlyList Repositories { get; set; } = []; /// /// Owner comes from each repository's gitweb.owner, and most never set it. A column of /// nothing is the opposite of what this page is for, so it only appears once it says something. /// private bool Owned => Repositories.Any(repository => repository.Owner is { Length: > 0 }); protected override void OnParametersSet() => Repositories = Service.ListRepositories(); }